Salah Rak'ah Calculator

Choose a prayer and a school and this breaks the rak’ahs down into fard, confirmed sunnah, unconfirmed sunnah, nafl and Witr. The four schools agree on every fard count and differ genuinely on the rest, so each school is given its own figures rather than one set being presented as the answer.

Work out a prayer

School

The fard count is the same whichever you pick. Everything around it is what changes.

Prayer

BreakdownFajr · Hanafi

Ruling: Fard
PartRak’ahs
Sunnah mu'akkadah before2
The prayer itself — Fard2
Total rak’ahs4

Of which obligatory

2

Of which voluntary

2

Recitation: Recited aloud

What this school holds

The two rak’ahs before Fajr are the most emphasised of all the confirmed sunnah prayers. If the fard was joined in progress, the Hanafi school allows them to be prayed after sunrise, before Dhuhr.

Test yourself

Ten questions on rak’ah counts, drawn from the school selected above. Your score is kept in this browser only.

This round

0

Best round

0

Rounds played

0

Scores are stored in this browser and are never sent anywhere. Clearing your browser data removes them.

Every prayer in all four schools

Read a row across to compare the schools, or down a column to see one school’s day. The Isha row includes Witr, because Witr is prayed after Isha.

Prints the full chart on one sheet — every prayer, every school. Choose "Save as PDF" in the print dialog to keep a copy.

Twelve confirmed rak’ahs, or ten

Adding up the confirmed sunnah rak’ahs of the five daily prayers is the difference people run into first, and it is a real one.

Hanafi

12 rak’ahs

Two before Fajr, four before Dhuhr, two after Dhuhr, two after Maghrib and two after Isha — twelve.

Shafi'i

10 rak’ahs

Two before Fajr, two before Dhuhr, two after Dhuhr, two after Maghrib and two after Isha — ten. A further two before Dhuhr, two after it, four before Asr, two before Maghrib and two before Isha are encouraged without being confirmed.

Maliki

2 rak’ahs

The Maliki school does not keep a list of confirmed rawatib at all, so the figure here is not a smaller version of the other schools’ list. Only the two rak’ahs before Fajr are singled out, as a raghiba — the highest rank of voluntary prayer in the school. Everything else around the fard is encouraged voluntary prayer with no fixed count.

Hanbali

10 rak’ahs

Two before Fajr, two before Dhuhr, two after Dhuhr, two after Maghrib and two after Isha — ten, the same list as the Shafi’i school. Four before Asr, two before Maghrib, two before Isha and two more on each side of Dhuhr are encouraged without being confirmed.

Witr: the sharpest disagreement

Witr is where the schools part company completely — not only on how many rak’ahs, but on whether leaving it is a sin.

Hanafi

Wajib3 rak’ahs

Wajib — an obligation just below fard, which must be made up if missed. Three rak’ahs joined with a single salam and one final sitting, with Du’a al-Qunut recited standing in the third rak’ah before the ruku, after a takbir with the hands raised.

Shafi'i

Sunnah mu'akkadah3 rak’ahs

Sunnah mu’akkadah, never wajib. One rak’ah at the least and eleven at the most; three is the common practice, prayed as two with a salam and then one. Qunut is recited after the ruku of the last rak’ah in the second half of Ramadan.

Maliki

Sunnah mu'akkadah3 rak’ahs

Sunnah mu’akkadah, and one rak’ah only. It is preceded by the shaf’ — two rak’ahs with their own salam — so three are prayed in total, but as two prayers rather than one. There is no qunut in Witr in this school; qunut belongs to Fajr.

Hanbali

Sunnah mu'akkadah3 rak’ahs

Sunnah mu’akkadah, and the most emphasised of the voluntary prayers. One rak’ah is enough and three is the usual practice, prayed as two and then one. Qunut is recited after the ruku of the last rak’ah throughout the year.

Taraweeh: eight or twenty

Twenty rak’ahs is the transmitted figure in all four schools. It rests on the practice established under Umar ibn al-Khattab in the mosque of Madinah and continued there and in the Haramayn for centuries. The Maliki books also record the later Madinan practice of thirty-six.

Eight rak’ahs followed by Witr is argued from Aisha’s report that the Prophet did not exceed eleven rak’ahs at night in Ramadan or outside it. It is the practice of a great many mosques today and has been defended by qualified scholars.

Both are defended by people who know the evidence, and neither is an innovation. Taraweeh is a voluntary prayer in every school, so the number is not something a person is held to: length and concentration matter more than the count. Pray with the congregation you are in.

What is said in each rak’ah

Every rak’ah of every prayer runs through the same positions in the same order. Only the recitation after al-Fatiha and the sittings change.

PositionWhat is said
1.Standing (qiyam)The intention is settled in the heart. No formula has to be spoken.
2.Takbirat al-Ihram“Allahu akbar”, with the hands raised. The prayer has now begun.
3.Opening supplicationThe istiftah — “Subhanaka Allahumma…” or “Wajjahtu wajhiya…”, said quietly. The Maliki school leaves it out.
4.Seeking refuge and the basmala“A’udhu billahi min ash-shaytan ir-rajim”, then “Bismillah ir-Rahman ir-Rahim”.
5.Al-FatihaRecited in every single rak’ah, without exception.
6.A surah or some versesAdded in the first two rak’ahs only. Any part of the Qur’an may be used.
7.Ruku“Allahu akbar”, then bowing: “Subhana Rabbiyal Azim”, three times.
8.Rising from ruku“Sami’a Allahu liman hamidah” while rising, then “Rabbana wa lakal hamd” standing.
9.First prostration“Allahu akbar”, then in sujud: “Subhana Rabbiyal A’la”, three times.
10.Sitting between the prostrations“Allahu akbar”, then “Rabbighfir li” — my Lord, forgive me.
11.Second prostration“Allahu akbar”, then “Subhana Rabbiyal A’la”, three times.
12.Rising“Allahu akbar”, and stand for the next rak’ah — or sit, if this was the second or the last.

The sittings and the ending

  • After the second rak’ahSit and recite the tashahhud — “At-tahiyyatu lillahi…”.
  • A prayer of two rak’ahsAdd the salawat on the Prophet and a supplication, then give the salam.
  • Third and fourth rak’ahsAl-Fatiha alone, with no surah after it. Every other position is unchanged.
  • The final sittingTashahhud, the salawat, a supplication, then “As-salamu alaykum wa rahmatullah” to the right and to the left.

Where the schools differ in the details

  • Raising the hands: the Shafi’i and Hanbali schools raise them again when going into ruku and when rising from it. The Hanafi and Maliki schools raise them at the opening takbir only.
  • Qunut in Fajr: the Shafi’i school recites it after the ruku of the second rak’ah and the Maliki school before the ruku. The Hanafi and Hanbali schools do not recite it in Fajr except at a time of general calamity.
  • The basmala: said quietly in the Hanafi and Hanbali schools, aloud in the Shafi’i school as part of al-Fatiha, and left out in the Maliki school in the obligatory prayers.
  • The sittings: the Shafi’i and Hanbali schools sit differently in the final tashahhud, bringing the left foot through and the hip to the floor. The Hanafi school sits the same way in both sittings.

This is the shape of the prayer, not a substitute for being taught it. Learn the recitations from someone who can correct your pronunciation.

What every school agrees on

Fajr is two fard rak’ahs, Dhuhr four, Asr four, Maghrib three and Isha four. Jumu’ah is two and Eid is two. No school disputes any of this, and no school considers another’s practice invalid over the voluntary prayers. The disagreements on this page are about what is added around the fard and about Witr, and each of them is old, well documented and settled within its own school.

Follow the imam where you pray

Mosque practice varies with the school the community follows and with local custom, and the numbers on this page describe schools rather than any particular mosque. In congregation you follow the imam. If your mosque prays eight rak’ahs of Taraweeh and this page shows twenty, the mosque is not wrong — it is following a different, defensible position. Ask your local imam before changing what you do.

Common questions

How many rakats are in Fajr?

Two fard rak’ahs, in all four schools. Two confirmed sunnah rak’ahs are prayed before them, which makes four in total. Those two are the most emphasised voluntary rak’ahs of the day in every school, and the Hanafi school allows them to be made up after sunrise if the fard was joined in progress.

How many rakats are in Dhuhr?

Four fard rak’ahs, in all four schools. The total including the voluntary prayers comes to twelve in each school, but the composition differs: the Hanafi school prays four confirmed before and two after, then two nafl, while the Shafi’i and Hanbali schools count two confirmed before and two after with a further two on each side as encouraged. The Maliki school fixes no binding number.

How many rakats are in Asr?

Four fard rak’ahs, in all four schools. Four rak’ahs before it are encouraged in all four but confirmed in none, so nothing is owed if they are left, giving eight in total. Nothing is prayed after Asr: voluntary prayer is held back until the sun has set.

How many rakats are in Maghrib?

Three fard rak’ahs, in all four schools — the only prayer with an odd number of obligatory rak’ahs during the day. Two confirmed sunnah rak’ahs follow it everywhere. The Hanafi total is seven, counting two further nafl; the Shafi’i and Hanbali totals are also seven, counting two light rak’ahs between the adhan and the iqamah, which the Hanafi school does not pray.

How many rakats are in Isha?

Four fard rak’ahs, in all four schools. Totals differ widely because Witr is prayed afterwards and the schools rank it differently: seventeen in the standard Hanafi chart, eleven in the Shafi’i and Hanbali, nine in the Maliki. Strip the voluntary prayers away and the obligation is four rak’ahs everywhere, with three more that are wajib in the Hanafi school only.

How many rakats are in Witr?

Three in the Hanafi school, joined with a single salam and one final sitting, and wajib — an obligation just below fard that must be made up if missed. The other three schools call it sunnah mu’akkadah. The Maliki school prays one rak’ah of Witr after a separate two-rak’ah shaf’, so three are prayed but as two prayers. The Shafi’i and Hanbali schools accept one rak’ah as sufficient and eleven as the most, with three the common practice.

On the numbers

The counts here follow the standard manuals of each school. Where a school records more than one figure — the Hanafi difference over Jumu’ah, the Maliki thirty-six for Taraweeh — both are shown rather than one being chosen. No hadith numbers are quoted on this page: a wrong reference is worse than none, and every count here is checkable in the school’s own books.

Read next