It was narrated that Jabir bin ‘Abdullah said:
“The Messenger of Allah (ﷺ) used to teach us Istikharah, just as he used to teach us a Surah of the Qur’an. He said: ‘If anyone of you is deliberating about a decision he has to make, then let him pray two Rak’ah of non- obligatory prayer, then say: Allahumma inni astakhiruka bi ‘ilmika wa astaqdiruka bi qudratika wa as’aluka min fadlikal-‘azim, fa innaka taqdiru wa la aqdir, wa ta’lamu wa la a’lam, wa Anta ‘allamul-ghuyub. Allahumma in kunta ta’lamu hadhal-amra (then the matter should be mentioned by name) ma kan min shay’in khairan li fi dini wa ma’ashi wa ‘aqibati amri, aw khairanli fi ‘ajili amri wa ajilihi, faqdurhu li wa yassirhu li wa barik li fihi. Wa in kunta ta’lamu [O Allah, I seek Your guidance (in making a choice) by virtue of Your knowledge, and I seek ability by virtue of Your power, and I ask You of Your great bounty. You have power, I have none. And You know, I know not. You are the Knower of hidden things. O Allah, if in Your knowledge, this matter (then it should be mentioned by name) is good for me in my religion, my livelihood and my affairs, or both in this world and in the Hereafter then ordain it for me, make it easy for me, and bless it for me. And if in Your knowledge]. Then saying similar to what he said the first time, except: Wa in kana sharran li fasrifhu ‘anni wasrifni ‘anhu waqdur li al-khair haithuma kana thumma raddini bihi (If it is bad for me then turn it away from me and turn me away from it, and ordain for me the good wherever it may be and make me pleased with it).’”