0
Ramadan

Solat Tarawih: 8 or 20 Rakaat, the Niat and How to Pray It

A Shafi'i-based guide for Singapore that settles the number of rakaat, the niat for each role, and how to pray Tarawih and Witir at home or behind an imam.

By SedekahSG Team
11 min read
Three men in white baju Melayu and songkok stand in one row for solat tarawih at night in a Singapore mosque prayer hall
Short answer

Solat Tarawih is a sunnah prayer of Ramadan nights, prayed after Isyak and before Subuh in sets of two rakaat. The Shafi'i school holds 20 rakaat with 10 salam, and Muslim.sg (MUIS) says praying 8 also has a valid basis.

On this page 8 sections

Key takeaways

  • Niat: made again for every set of two rakaat, as imam, makmum or alone
  • Fewer rakaat: stopping at 8 is valid and rewarded for the rakaat you pray
  • Salam: four rakaat with one salam is invalid in the mu'tamad Shafi'i view
  • Witir: usually 3 rakaat after Tarawih, as 2 + 1 or all 3 with one salam
  • At home: a family jemaah is allowed, a video-call jemaah is not

Solat Tarawih is the sunnah night prayer of Ramadan, prayed in sets of two rakaat after Isyak and before Subuh. This guide follows Shafi'i practice as taught in Singapore and settles the points people raise most: the ruling, the hadith behind the prayer, whether to pray 8 or 20 rakaat, the niat for each role, the steps, praying at home, and closing the night with Witir. To plan your nights around the fast, see our Ramadan 2027 timetable of imsak and iftar times in Singapore.

What is solat Tarawih and what is its ruling?

Solat Tarawih is a sunnah prayer prescribed only on the nights of Ramadan, and scholars agree on its sunnah status rather than treating it as obligatory.

Muslim.sg, which is part of MUIS1, describes Tarawih as a sunnah prayer done only in Ramadan, at any time between the Isyak and Subuh prayers4. The name means rest. Those who prayed it would stand for a long time and then rest after every four rakaat, which is where the name comes from13.

On the ruling, scholars agreed that Tarawih is sunnah. Where they differed was whether it is better prayed in congregation at the mosque or at home14. Imam al-Syafi'e, Abu Hanifah, Imam Ahmad and some Maliki scholars held that it is sunnah to pray it in congregation at the mosque14. Tarawih is therefore a recommended act of worship, not an obligation like the five daily prayers. For another sunnah prayer, see our guide to how to pray solat hajat.

The sunnah after Isyak comes first

Imam al-Nawawi reports that the ashab agreed the sunnah rawatib prayers take priority over Tarawih, because rawatib are prayed all year and Tarawih is not14. On this view, the sunnah after Isyak is prayed before the first set of Tarawih.

What hadith is Tarawih based on?

Tarawih goes back to the Prophet ﷺ praying the night prayer in the mosque with men praying behind him, and to Umar later gathering the people behind one imam.

In Sahih al-Bukhari 2012, Aisha reports that the Prophet went out in the middle of the night and prayed in the mosque, and some men prayed behind him9. After the morning prayer, he addressed the people and explained that their presence had not been hidden from him, but he feared the night prayer would be made compulsory for them and that they would not be able to keep it up9.

In Sahih al-Bukhari 2009, the Prophet says that whoever prays at night through the whole of Ramadan out of sincere faith and hoping for reward from Allah will have all previous sins pardoned10. The sub-narrator Ibn Shihab adds that after the Prophet died, people kept praying it individually rather than in congregation, through the caliphate of Abu Bakr and into the early days of Umar's10.

Sahih al-Bukhari 2010 records the change. Umar said it would be better to gather the people under the leadership of one reciter, and he decided to congregate them behind Ubai bin Ka'b11. MUIS explains that the companions kept the Prophet's way of praying Tarawih until Umar's time, when he united the community to pray it in congregation behind a single imam7. The congregational Tarawih you join in a mosque traces back to that decision.

Is Tarawih 8 or 20 rakaat?

Both are accepted. The Shafi'i school holds 20 rakaat, and Muslim.sg (MUIS) says whoever chooses 8, 20 or even more may do so.

In the Shafi'i school and for most scholars, Tarawih is 20 rakaat with ten salam, not counting Witir13. MUIS links the 20 rakaat to Umar, who brought the community together behind one imam praying that number7. Muslim.sg adds that the narrations differ, some giving twenty rakaat and others twenty-one or twenty-three, and that Umar increased the number mainly so that Muslims would spend their Ramadan time and effort in worship2.

The 8-rakaat practice comes from the Prophet's own night prayer. Sahih al-Bukhari 2013 reports that he did not pray more than eleven rakaat in Ramadan or in any other month: four, then four, then three (Witir)8. Muslim.sg reads this as eleven rakaat that include three of Witir2, which leaves 8 rakaat before Witir.

20 rakaatthe Shafi'i count, with 10 salam
11 rakaatthe Prophet's night prayer, including 3 of Witir
2 rakaatin every set, whichever total you pray

Ustaz Imran, head of the Office of Imam at Al-Ansar Mosque, sets out both views on Muslim.sg and concludes that whoever chooses to pray eight rakaat may do so, and whoever wants to pray twenty or more may do so too2. Whichever count your mosque follows, every set is still two rakaat closed with salam1.

Respect the other count

Muslim.sg calls 8 versus 20 a long-running debate in which both sides have valid bases, and warns against arguing over it to wrong others or judge them as sinning2. MUIS describes Tarawih as highly encouraged either way, at the mosque or at home7.

What is the niat for solat Tarawih?

The niat names the prayer as sunnah Tarawih of two rakaat for Allah; in congregation you add whether you pray as the imam or as the makmum.

Muslim.sg (MUIS) gives three English wordings, one for each role1:

  • Praying alone: "I intend to pray the Sunnah prayer of tarawih two raka'at for Allah ta'ala"
  • Leading as imam: "I intend to pray the Sunnah prayer of tarawih as the Imam two raka'at for Allah ta'ala"
  • Following as makmum: "I intend to pray the Sunnah prayer of tarawih as the Makmum two raka'at for Allah ta'ala"

For a Malay wording, a Malaysian government page citing JAKIM gives the meaning of the niat for praying alone as "Sahaja aku solat sunat tarawih dua rakaat kerana Allah SWT."20

Because each Tarawih prayer is two rakaat, the niat is made afresh at the start of every set: 4 times for 8 rakaat and 10 times for 2014. When you pray alone, the plain wording is enough. When a family member leads at home, they use the imam wording and everyone behind them uses the makmum wording.

How do you pray Tarawih step by step?

Pray each set as a two-rakaat sunnah prayer that ends with the final tasyahhud and salam, then stand for the next set until you reach your total.

  1. Make the niat for your role. Use the alone, imam or makmum wording above for this set of two rakaat.
  2. Say Takbiratul Ihram. Raise your hands so your thumbs are level with your earlobes and your palms level with your shoulders, and say "Allahu Akbar" to enter the prayer.
  3. Recite Al-Fatihah and a surah. Then perform ruku', i'tidal and the two sujud as in any prayer.
  4. Rise for the second rakaat. Say the takbir as you return to standing and repeat the recitation, ruku', i'tidal and two sujud.
  5. Sit for the final tasyahhud. Sit on your left leg with your left foot showing below your right leg, keep your right foot upright, and recite the final tasyahhud.
  6. Close with salam. Turn your head to the right, then the left, far enough that anyone behind you can see your cheek. That salam completes one set.
  7. Repeat the set. Continue set by set until you reach 8 or 20 rakaat, then pray Witir.

These steps follow Muslim.sg's guide, first published on 25 February 2025 and updated on 13 February 20261.

"Prayer during the night should consist of pairs of rak'ahs, but if one of you fears morning is near, he should pray one rak'ah which will make his prayer an odd number for him."

Sahih Muslim 749a

That hadith is why night prayer is offered in pairs, with a single rakaat allowed to make the total odd when dawn is near12. Tarawih follows the pairs, and Witir supplies the odd number at the end of the night.

Tarawih and Witir sets of two rakaat, by total
Tarawih total Sets of 2 rakaat Tarawih salam Witir (2 + 1) Rakaat in the night
8 rakaat 4 4 3 11
20 rakaat 10 10 3 23

Counting the whole night, 8 rakaat of Tarawih plus 3 of Witir makes 11, the number in Sahih al-Bukhari 20138. Twenty plus 3 makes 23, one of the counts Muslim.sg mentions from the narrations about Umar's increase2. The ten salam for 20 rakaat match the Shafi'i description13, and the 2 + 1 Witir follows Muslim.sg's method1.

SedekahSGRamadan AppealIftar and suhoor for Hafiz students, iftar for Palestinian refugees and Ramadan food packs for families.Support now

How do you pray Tarawih at home alone or with family?

Tarawih can be prayed at home alone or in congregation with your family, using the same sets of two rakaat and any surahs you can recite well.

Muslim.sg (MUIS) says Tarawih may be prayed in congregation or alone, and that praying it in congregation is preferred (mustahab) without being required3. It also states that Tarawih can still be prayed in congregation at home3. That guide was written for Ramadan 2021/1442H, when Covid-19 changed how many families observed the month3.

A simple family arrangement works well. One family member leads as imam with the imam niat, everyone else stands behind and uses the makmum niat, and you pray the number of sets you agreed on before starting4.

The worry that stops many families is the reading. Muslim.sg says anyone unsure of other surahs, especially when praying alone or leading as imam, may recite surahs within their ability, such as Al-Ikhlas, even repeatedly3. A parent who knows only the short surahs can still lead a full Tarawih.

A video call is not a jemaah

Scholars and religious authorities do not approve of praying in congregation virtually3. Relatives who live apart should each pray at home rather than follow one imam over a screen.

If you are also planning your Ramadan giving, SedekahSG's Ramadan appeal includes iftar and suhoor for 50 hafiz students and the Ramadan food pack (sembako). You can read how the iftar and suhoor programmes are run before choosing. Families working through the Quran this month may also like the Khataman Al-Qur'an project.

How is Witir prayed after Tarawih?

Witir closes the night after Tarawih and is usually 3 rakaat, prayed either as two rakaat with salam followed by one rakaat with salam, or as all three with one salam.

Muslim.sg (MUIS) says we are encouraged to end the night prayer with Witir after Tarawih4, so it is recommended rather than required. Witir is prayed in an odd number of rakaat, usually 3, and its maximum is 11 rakaat1. One rakaat is the minimum, but Muslim.sg advises against making a single rakaat your habit; Imam An-Nawawi notes in Al-Majmu' that three is the "complete" minimum5.

Muslim.sg describes two ways to pray three rakaat of Witir5:

  • Disconnected (fasl): two rakaat ending with salam, then one rakaat with another salam. This is the method Muslim.sg's step-by-step guide teaches1.
  • Connected (wasl): all three rakaat together with one salam at the third rakaat. Muslim.sg says a person who intends three rakaat of Witir may pray them this way5.

With the disconnected method, each part uses the same steps as a Tarawih set, so a 3-rakaat Witir adds two more salam to your night. If you lead your family, choose one method before you begin so that everyone behind you ends together.

Qunut in the second half of Ramadan

In the Syafi'i mazhab, you may recite dua Qunut in Witir from the second half of Ramadan, in the last rakaat5.

Questions people also ask

When does the time for Tarawih begin and end?

Tarawih takes its time from Witir: from after you have prayed Isyak, even when Isyak is combined early by jamak taqdim, until true dawn (fajar sadiq) rises. Scholars recommend delaying it a little, and Imam Syihabuddin al-Ramli said its preferred time is once a quarter of the night has passed.

Can you pray four rakaat of Tarawih with one salam?

Not in the mu'tamad Shafi'i view that Malaysia's Federal Territory Mufti Office prefers: Imam al-Nawawi held four rakaat with one salam invalid, and Imam Ramli added that this applies when done on purpose, otherwise the prayer counts as a general sunnah prayer (sunat mutlaq). Hanafi scholars hold that even praying all of Tarawih with a single salam is valid, but makruh if deliberate, and the Mufti's Office says those following another school's recognised view must not be stopped.

Can women pray Tarawih at the mosque in Singapore?

Yes. For Ramadan 1445H, MUIS announced Tarawih at 69 mosques with 110,000 spaces a night and dedicated spaces for female jemaah at all mosques, with female spaces also made available for qiyamullail in the last 10 days. Arrangements for the coming Ramadan had not been published in the sources this guide uses.

Is it valid to leave after 8 rakaat when the mosque prays 20?

Yes. The Shafi'i school counts 20 rakaat, but praying fewer is still valid and accepted, and the reward follows the number of rakaat you pray. A text of Imam al-Syarwani cited by Malaysia's Federal Territory Mufti Office says this holds even if you intended from the start to stop at 8.

Can you read the Quran from a mushaf or phone while praying Tarawih?

In the Shafi'i school and for Imam Ahmad, reciting from a mushaf in prayer is permissible, and Malaysia's Federal Territory Mufti Office allows an imam to read from a mushaf in Tarawih and a makmum to hold a translated mushaf behind the imam, though it prefers not looking at one without need. The Hanafi school holds that an imam who reads from a mushaf invalidates his prayer. The sources do not address phones, so consult your own ustaz.

Feed someone at iftar

Our Ramadan Appeal funds iftar and suhoor for Hafiz students, iftar for Palestinian refugees in Lebanon and Egypt, and Ramadan food packs for families.

  • Photo & video update from S$100 per name
  • Certificate from S$1,000
Support now
Written by the SedekahSG Team

SedekahSG is based in Singapore. We check every rule, rate and date against its original source before we publish, and update this guide when the rules change.

Sources (20)
  1. Muslim.sg (MUIS), How to perform solat Tarawih: step-by-step guide.Used in: 1. Meaning and ruling · 3. 8 or 20 rakaat · 4. NiatAs of February 2026
  2. Muslim.sg (MUIS), 5 things you need to know about Tarawih prayers.Used in: 3. 8 or 20 rakaat · 5. Step by stepAs of February 2026
  3. Muslim.sg (MUIS), Panduan solat Terawih di rumah.Used in: 6. Praying at homeAs of 2021/1442H
  4. Muslim.sg (MUIS), Cara melaksanakan solat Terawih di rumah: panduan langkah demi langkah.Used in: 1. Meaning and ruling · 4. Niat · 6. Praying at homeAs of April 2021
  5. Muslim.sg (MUIS), Guide to Witr prayer: what, how and when to perform it.Used in: 7. Witir after TarawihAs of February 2026
  6. MUIS, Prayer arrangement for Ramadan 1445H.Background reading for this guide
  7. MUIS (gov.sg), MUIS reply on Tarawih: mosque or home, 8 or 20 rakaat.Used in: 2. Hadith basis · 3. 8 or 20 rakaat
  8. Sunnah.com, Sahih al-Bukhari 2013.Used in: 3. 8 or 20 rakaat · 5. Step by step
  9. Sunnah.com, Sahih al-Bukhari 2012.Used in: 2. Hadith basis
  10. Sunnah.com, Sahih al-Bukhari 2009.Used in: 2. Hadith basis
  11. Sunnah.com, Sahih al-Bukhari 2010.Used in: 2. Hadith basis
  12. Sunnah.com, Sahih Muslim 749a.Used in: 5. Step by step
  13. Federal Territory Mufti Office, Malaysia, Irsyad Fatwa Ramadan series 219: Tarawih of fewer than 20 rakaat.Used in: 1. Meaning and ruling · 3. 8 or 20 rakaat · 5. Step by stepAs of March 2023
  14. Federal Territory Mufti Office, Malaysia, Irsyad al-Fatwa Ramadan series 143: ba'diyah Isyak or Tarawih first.Used in: 1. Meaning and ruling
  15. Federal Territory Mufti Office, Malaysia, Irsyad Hukum 104: Tarawih of 4 rakaat with one salam.Background reading for this guideAs of 25 Mei 2018
  16. Federal Territory Mufti Office, Malaysia, Irsyad al-Fatwa Ramadan series 108: Tarawih and Witir after jamak taqdim.Background reading for this guideAs of June 2018
  17. Federal Territory Mufti Office, Malaysia, Irsyad al-Fatwa 303: looking at the mushaf during prayer.Background reading for this guide
  18. Federal Territory Mufti Office, Malaysia, Al-Kafi 307: Tarawih while holding and reading a mushaf.Background reading for this guideAs of June 2016
  19. Federal Territory Mufti Office, Malaysia, Al-Kafi 1706: Tarawih at home with family.Background reading for this guide
  20. mkn.gov.my, Niat solat sunat Tarawih.Used in: 4. NiatAs of 28 Februari 2025
Was this helpful?
Share
Support now
0 itemsS$0