Does Masturbation Break Your Fast? The Ramadan Ruling
Does masturbation break the fast? The four schools on deliberate emission, make-up days and kaffarah, what does not break the fast, and a Ramadan plan.
Nafs Team
· 8 min read
Does masturbation break your fast? Yes. Deliberate masturbation that leads to ejaculation during the hours of fasting breaks the fast, according to the four imams: Abu Hanifah, Malik, al-Shafi’i and Ahmad (IslamQA 71213). You must make up that day. Most schools do not require the larger expiation (kaffarah), which they reserve for intercourse; the Maliki school does require it.
Masturbation at night, between Maghrib and Fajr, does not affect the next day’s fast. It is still a sin in its own right, and you need ghusl before you pray.
Nafs does not issue fatwas. This page summarises published rulings, with links, so you can check them. For your own situation, ask a qualified scholar you trust. This page answers the ruling; for the day-to-day routine, read how to quit porn during Ramadan.
Ramadan is easier to protect when the phone is already set up. Put Nafs in front of your trigger apps before the month starts, and keep device-level adult-content filtering in place for broader protection.
Why it breaks the fast
Fasting is not only leaving food and drink. In a hadith qudsi, Allah describes the fasting person as one who leaves his food, his drink and his desire for His sake (Sahih al-Bukhari 1894). Scholars treat deliberately bringing about ejaculation during the day as acting on that desire, so it breaks the fast in the same way that eating does.
The nights are different. Allah made marital relations lawful on the nights of Ramadan (Quran 2:187), and the fasting restrictions apply from Fajr to Maghrib. That is why the timing matters for the fast. It does not change the separate ruling on masturbation itself, covered in is masturbation haram.
The rulings by school
| School | Fast broken? | Make-up (qada) | Expiation (kaffarah) | Source |
|---|---|---|---|---|
| Hanafi | Yes | Yes | No | SeekersGuidance (2024), citing Maraqi al-Falah |
| Maliki | Yes | Yes | Yes, for each day | SeekersGuidance (2013), citing Khalil’s Mukhtasar |
| Shafi’i | Yes | Yes | No | Shafiifiqh.com via IslamQA.org, citing Mughni al-Muhtaj |
| Hanbali | Yes, if ejaculation occurs | Yes | No | Ibn Qudamah’s al-Mughni, quoted by IslamQA 71213 |
The SeekersGuidance Hanafi answer adds that deliberately breaking a fast is a major sin, so repentance is needed as well as the make-up day. The Maliki answer adds that deliberately causing pre-seminal fluid (madhy) also breaks the fast and must be made up.
What kaffarah is, and when it applies
Kaffarah for a Ramadan fast comes from the hadith of the man who had intercourse with his wife while fasting. The Prophet ﷺ asked whether he could free a slave, then whether he could fast two consecutive months, then whether he could feed sixty poor people (Sahih al-Bukhari 1936).
The Hanafi, Shafi’i and Hanbali schools keep that expiation for intercourse, so masturbation needs a make-up day and repentance but not kaffarah. The Maliki school applies kaffarah to any deliberate breaking of a Ramadan fast, including this one. If you follow the Maliki school, or broke several fasts, ask a scholar how it applies to you.
Making up the day
- Make up one day for each day broken, after Ramadan. Many scholars advise doing it soon and before the next Ramadan arrives.
- Keep abstaining for the rest of that day. Scholars say someone who deliberately breaks a Ramadan fast should continue to fast the remainder of the day and then make it up (SeekersGuidance, 2022).
- Repent. The make-up day covers the fast; tawbah covers the sin.
- Make ghusl before your next prayer. The steps are in what to do after masturbation.
What does not break the fast
- A wet dream. It happens without your choice, so the fast is not broken. Ghusl is still required if you see fluid.
- Waking up in janabah. The Prophet ﷺ sometimes reached Fajr in janabah, made ghusl and fasted (Sahih al-Bukhari 1926). Make ghusl and pray Fajr on time.
- Anything at night. Masturbation after Maghrib and before Fajr does not affect the fast. It remains prohibited according to the majority.
- A passing thought. The schools differ on emission caused by deliberately looking or thinking, and the Maliki school is the strictest. If that happened, ask a scholar rather than guessing.
For everything else that can affect a fast, from medication to toothbrushing, see what breaks your fast.
If it happened today
- Stop, and do not tell yourself the rest of the day no longer matters.
- Make ghusl and pray the next prayer.
- Keep fasting until Maghrib.
- Make tawbah and note the date so you remember to make it up.
- If you follow the Maliki school, ask a scholar about kaffarah.
- Change one thing in your setup before tomorrow’s suhoor.
How to stay clean during the fast
The Prophet ﷺ described fasting as a restraint on desire for those who cannot marry (Sahih al-Bukhari 5066). Ramadan gives you that every day for a month. The hours that undo it are usually predictable: lying in bed with the phone after suhoor, scrolling alone before iftar, and the private time after tarawih.
A few fasting-specific steps:
- Decide where the phone sleeps after suhoor. Going back to bed with it is the riskiest hour for many people.
- Fill the hour before iftar with something offline: helping in the kitchen, reading Quran, or making dua.
- Protect the fast from the gaze, not only from the act. Unfollow the accounts and mute the feeds that keep desire switched on during the day.
- Plan for the urge, not only for the month. Write down what you will do in the first ten minutes, then follow the 10-minute urge plan.
The full routine for suhoor, iftar, tarawih and after Eid is in how to quit porn during Ramadan.
Set up Nafs for the hours your fast is most exposed.
How Nafs helps during Ramadan
- Block the apps that start the loop (iPhone and Android). Choose them in the Fortress tab. On iPhone, app blocking uses Screen Time and requires iOS 16 or later.
- Adult-site protection. On Android, Guard can identify and block known adult domains in supported browsers when the Accessibility permission and protection are enabled. On iPhone, Nafs enables Apple’s adult-content filter for Safari and in-app WebKit on iOS 16 or later with the required Screen Time access. Coverage depends on the browser and device, so check it on your phone.
- “I have an urge” (iPhone and Android). On the Today screen or in the Fortress tab, it opens a calm screen that breathes with you, shows your own written intention, and gives you a dua to say.
- Earn time back with Quran and dhikr. Worship earns back screen time for the ordinary apps you choose to allow. Adult content is never something you unlock.
- Iron Intention (Pro). Turning off your guard needs a 24-hour cooling-off.
- Prayer-time lock (Android only). Your locked apps pause for 15 minutes at each prayer, until you log it.
Nafs is a phone tool, not treatment or a guarantee. It is free to download with optional in-app purchases; see how Nafs works for Muslims quitting porn.
Frequently asked questions
Does masturbation at night in Ramadan break the fast?
No. The fast runs from Fajr to Maghrib, so what happens at night does not break the next day’s fast. It is still prohibited according to the majority of scholars, and ghusl is needed before Fajr prayer.
Does masturbation without ejaculation break the fast?
In the Hanbali school, as quoted from Ibn Qudamah, the fast is not broken unless ejaculation occurs, though the act is still haram (IslamQA 71213). The Maliki school also counts deliberately causing pre-seminal fluid. Ask a scholar from your school.
Do I have to pay kaffarah?
In the Hanafi, Shafi’i and Hanbali schools, no: you make up the day and repent. In the Maliki school, yes, for each day broken this way. Ask a scholar how to fulfil it.
What if it happened on several days?
Each day broken must be made up separately. If you follow the Maliki school, ask a scholar about kaffarah for each day.
Some people call it “PMO”. Does the same ruling apply?
PMO is a term some readers use for the porn-masturbation-orgasm cycle. The fasting ruling above concerns the ejaculation. Watching pornography is a separate sin, and sins harm the fast even when they do not break it: the Prophet ﷺ said that Allah has no need of the fast of someone who does not give up false speech and wrong actions (Sahih al-Bukhari 1903). See is watching porn haram in Islam.
Related guides
Put a barrier between the urge and the next tap.
Use Nafs to block selected trigger apps and redirect the interruption into Quran, dhikr, dua, or salah. Pair it with device-level filtering and accountability for broader adult-content protection.
Set up Nafs for your trigger appsNafs supports habit change; it is not treatment, and website coverage varies by platform, browser, permissions, and current app release.