How Many Rakats in Maghrib Prayer?

Maghrib has 3 fard rakats, followed by 2 confirmed sunnah rakats: 5 rakats in total.

Last updated:

Maghrib Rakats at a Glance

Table of rakats in Maghrib prayer: sunnah before, fard, sunnah after and total
PartRakatsStatus
Sunnah before Maghrib2 (optional)Recommended, light rakats between the adhan and iqamah (Bukhari).
Maghrib fard3Obligatory. The first two rakats are aloud, the third is silent.
Sunnah after Maghrib2Confirmed.
Total53 fard + 2 sunnah (7 with the optional 2 before)

How the Maghrib Rakats Are Prayed

Maghrib is the only daily prayer with an odd number of fard rakats. You recite Al-Fatiha and a surah aloud in the first two rakats, sit for the first tashahhud after the second, then stand for a third rakah with Al-Fatiha alone, recited silently, and finish with the final tashahhud and the salam.

When Is Maghrib Prayed?

Maghrib begins at sunset and lasts until the red glow of twilight leaves the sky, when Isha begins. Its window is the shortest of the five, so pray it promptly. The Prophet ﷺ used to pray Maghrib right after the sun set (Bukhari, Muslim).

Praying While Travelling

Maghrib is not shortened when you travel: it stays 3 rakats.

Where the Madhhabs Differ

The 2 sunnah rakats after Maghrib are confirmed in all four schools. The 2 light rakats before the fard are recommended: the Prophet ﷺ said, “Pray before Maghrib,” repeating it and adding on the third time, “for whoever wishes” (Bukhari). The Hanafi school does not count them as a regular sunnah, while the Shafi’i and Hanbali schools do recommend them.

Keep Count in Maghrib

If you lose count mid-prayer, build on the number you are sure of and finish with sajdah sahw; the forgetting during prayer guide covers each case. Prayer Memory can keep the count for you: a silent haptic tap on Apple Watch, or a manual counter on iPhone and Android. Get it on the App Store or Google Play. All the counts side by side: rakat guide.

Sources

  • General guidance from widely cited hadith; where the schools differ, follow a scholar you trust.
  • Sahih al-Bukhari: “Pray before Maghrib … for whoever wishes.”
  • Sahih al-Bukhari and Sahih Muslim: praying Maghrib at sunset.

Frequently Asked Questions

Never lose count in salah again

Prayer Memory keeps the count for you, silently, so you can give your attention to the prayer. Free to download, with an optional Pro upgrade inside the app.