Narrated Jabir bin 'Abdullah :The Prophet (Sallal Laho Alaihi Wasallam) used to teach us the way of doing Istikhara, in all matters as he taught us the Suras of the Quran. He said, "If anyone of you thinks of doing any job he should offer a two Rakat prayer other than the compulsory ones and say (after the prayer):
It depends. Sometimes it takes only once to get the answer and sometimes it takes longer. It is better to do istakhara seven (7) times. If you have received an answer as explained in the section below, stop doing istikhara. You do not have to continue to do isitkhara for 7 days. It is better that right after reciting the supplication, given above, sleep with ablution (people who cannot keep the ablution for longer times due to health problems do not have to worry about ablution before falling asleep) facing the direction of the Qibla (facing the Qibla is not required but it is a Sunnat of our beloved Prophet Peace Be Upon Him). It is better to recite salutations (durood/ salawat) on the Prophet Allah's Grace and Peace be upon him before and after the above Dua (supplication).