The obligatory rak'ahs
So these are the numbers every Muslim prays, whichever school they follow. If you add them up, it's 17 rak'ahs of obligatory prayer a day.
| Prayer | Fard rak'ahs | Travelling (if shortening) |
|---|---|---|
| Fajr | 2 | 2 |
| Dhuhr | 4 | 2 |
| Asr | 4 | 2 |
| Maghrib | 3 | 3 |
| Isha | 4 | 2 |
Where the numbers come from
There's a narration from 'Aisha in Sahih al-Bukhari 350. She said that when Allah first made the prayer obligatory, it was two rak'ahs, whether someone was at home or travelling. Then the travelling prayer stayed as it was, and the prayer for people at home was increased.
Ibn 'Abbas puts it in numbers in Sahih Muslim 687. He said Allah prescribed the prayer through the words of the Prophet ﷺ as four rak'ahs when resident, two when travelling, and one in a state of fear.
Maghrib is the one that doesn't change. In Sahih al-Bukhari 1109, Salim describes 'Abdullah bin 'Umar combining Maghrib and Isha on a trip, and praying three rak'ahs for Maghrib even then, following what he'd seen the Prophet ﷺ do.
The exact conditions for shortening, how far counts as travel and for how long, are where scholars differ. The page on combining prayers when travelling goes into that.
The sunnah prayers around them
On top of the obligatory prayers, there are the regular sunnah prayers, sometimes called the rawatib. The best-known hadith on these is from Umm Habibah in Jami' at-Tirmidhi 415. The Prophet ﷺ said that whoever prays twelve rak'ahs in a day and night will have a house built for him in Paradise, and listed them. Sahih Muslim 728 has the same promise, and Umm Habibah said she never left them after hearing it.
Ibn 'Umar's count in Sahih al-Bukhari 1180 is ten, with two before Dhuhr where Umm Habibah's has four. Both are authentic, and a lot of people simply aim for the twelve.
| Prayer | Before | After | Source |
|---|---|---|---|
| Fajr | 2 | None | Tirmidhi 415, Bukhari 1180 |
| Dhuhr | 4 (or 2) | 2 | Tirmidhi 415, Bukhari 1180 |
| Asr | None in this list | None | Tirmidhi 415 |
| Maghrib | None in this list | 2 | Tirmidhi 415, Bukhari 1180 |
| Isha | None in this list | 2 | Tirmidhi 415, Bukhari 1180 |
Witr
Witr is the odd-numbered prayer at the end of the night's prayers, usually after Isha. In Sahih al-Bukhari 990, a man asked about the night prayer, and the Prophet ﷺ said it's two rak'ahs followed by two, and if you're worried about dawn coming, pray one rak'ah to make what you've prayed odd.
The narrations show more than one way of doing it. In Sahih al-Bukhari 1147, 'Aisha describes the Prophet ﷺ praying four, then four, then three. How many rak'ahs witr should be, and how strongly it's required, are points the schools discuss in detail, so if you follow a school, go with your local imam's guidance.
If you're just getting back into praying
A lot of people who've drifted away from praying come back and feel like they need to do everything at once, all the sunnah, witr and the rest. What ends up happening is they do it for a week and then burn out.
If that's you, I'd start with the 17 and get them consistent first. There's a hadith from 'Aisha in Sahih al-Bukhari 6464 that the deeds most loved by Allah are the most regular, even if small. Once the obligatory ones are steady, the sunnah prayers are much easier to add one at a time.
Questions people ask
How many rak'ahs are there in a day?
17 obligatory rak'ahs: Fajr 2, Dhuhr 4, Asr 4, Maghrib 3 and Isha 4. With the twelve sunnah rak'ahs from Jami' at-Tirmidhi 415, it's 29, plus witr.
Why is Maghrib three rak'ahs?
It stays at three both at home and when travelling, as in Sahih al-Bukhari 1109, where Ibn 'Umar prays three for Maghrib on a trip following the Prophet's ﷺ practice.
How many rak'ahs is Jumu'ah?
Two rak'ahs, prayed with the khutbah in place of Dhuhr. 'Umar said Jumu'ah is two rak'ahs, complete and not shortened, in Sunan an-Nasa'i 1420. Our page on Jumu'ah times covers when it's prayed.
Do I have to pray the sunnah rak'ahs?
They're voluntary, and the reward for keeping them is described in Sahih Muslim 728. The obligatory 17 are the ones you're required to pray.
How many rak'ahs is witr?
It's an odd number. Sahih al-Bukhari 990 mentions a single rak'ah to end the night prayer, and Sahih al-Bukhari 1147 describes three at the end. Follow your imam's guidance on which to pray.
Sources
- Sahih al-Bukhari 350Prayer first enjoined as two rak'ahs, increased for residentsChecked 4 December 2026
- Sahih Muslim 687Four rak'ahs resident, two travelling, one in fearChecked 4 December 2026
- Sahih al-Bukhari 1109Maghrib prayed as three rak'ahs while travellingChecked 4 December 2026
- Jami' at-Tirmidhi 415The twelve sunnah rak'ahsChecked 4 December 2026
- Sahih Muslim 728House in Paradise for twelve rak'ahsChecked 4 December 2026
- Sahih al-Bukhari 1180Ibn 'Umar's ten rak'ahsChecked 4 December 2026
- Sahih al-Bukhari 990Night prayer two by two, one rak'ah witrChecked 4 December 2026
- Sahih al-Bukhari 6464Most beloved deeds are the most regularChecked 4 December 2026
- Sahih al-Bukhari 1147Four, four, then three rak'ahs at nightChecked 4 December 2026
- Sunan an-Nasa'i 1420Jumu'ah is two rak'ahsChecked 4 December 2026