Acts That Nullify the Fast

Fasting requires abstaining from specific acts from dawn (Fajr) till sunset (Maghrib). There are certain actions that can invalidate the fast. Before delving deeper into the core of this topic it seems appropriate to mention three points as principles. There are three specific conditions that must be met for an act to nullify fasting:
Knowledge (E'lm):
The person must be aware that the action breaks the fast. If a person acts out of ignorance, their fast remains valid. Allah says:
قُلْ هَلْ يَسْتَوِي ٱلَّذِينَ يَعْلَمُونَ وَٱلَّذِينَ لَا يَعْلَمُونَ
(Surah Zumar: 39:9)
"Say, are those who know equal to those who do not know?" know?"
A person who is ignorant of a ruling is not equal to someone who knowingly violates it. If an individual who is unaware, commits an act that nullifies fasting in general, his fast remains valid due to his ignorance.
Remembrance (Tazakkur):
The person must remember that they are fasting. Forgetfulness is an excuse, and Allah does not hold a person accountable for something done absentmindedly. The Prophet Muhammad (Sallallahu Alaihi Wasallam) said:
مَنْ أَفْطَرَ فِي رَمَضَانَ نَاسِيًا فَلَا قَضَاءَ عَلَيْهِ وَلَا كَفَّارَةَ
(Sahih Ibn Khuzaima: 1990)
"Whoever breaks their fast in Ramadan due to forgetfulness, there is no need for them to make up (Qadha) the fast or give expiation (Kaffara)."
If a person eats or drinks intentionally, their fast becomes invalid. However, forgetfulness is forbidden.
Intention (Qasd):
The act must be done deliberately and willingly. The Prophet Muhammad (Sallallahu Alaihi Wasallam) said:
إِنَّمَا الْأَعْمَالُ بِالنِّيَّاتِ وَإِنَّمَا لِكُلِّ امْرِئٍ مَا نَوَى
(Sahih Bukhari: 1, Sahih Muslim: 1907)
"Actions are judged by intentions, and each person will be rewarded according to what they intended."
If a fasting person is forced to eat or drink under duress, their fast remains valid.
Now, about the acts that nullify the fast:
Sexual Intercourse during the Daytime in the month of Ramadan
Of all the nullifiers of fasting, sexual intercourse is the most serious one, as it necessitates makeup (Qadha), repentance (Tauba) and expiation (Kaffara). This is the only nullifier which requires expiation (Kaffarah). The Qur'an permits intimacy only at night during Ramadan:
أُحِلَّ لَكُمْ لَيْلَةَ ٱلصِّيَامِ ٱلرَّفَثُ إِلَىٰ نِسَآئِكُمْ
(Surah Al-Baqarah: 2:187)
"It has been made permissible for you to be intimate with your wives during the nights of fasting."
If a fasting person engages in intercourse during the daytime of Ramadan, he must fast a makeup day and also fulfill the required expiation, as recorded in the Hadith of Abu Hurairah (Radhi Allahu Anhu):
جَاءَ رَجُلٌ إِلَىٰ ٱلنَّبِيِّ ﷺ فَقَالَ: هَلَكْتُ يَا رَسُولَ ٱللَّهِ! قَالَ: وَمَا أَهْلَكْكَ؟ قَالَ: وَقَعْتُ عَلَىٰ ٱمْرَأَتِي فِي نَهَارِ رَمَضَانَ. قَالَ: هَلْ تَجِدُ رَقَبَةً تُعْتِقُهَا؟ قَالَ: لَا. قَالَ: فَهَلْ تَسْتَطِيعُ أَنْ تَصُومَ شَهْرَيْنِ مُتَتَابِعَيْنِ؟ قَالَ: لَا. قَالَ: فَهَلْ تَجِدُ إِطْعَامَ سِتِّينَ مِسْكِينًا؟ قَالَ: لَا.
(Sahih Bukhari: 1936, Sahih Muslim: 1111)
"A man came to the Prophet (Sallallahu Alaihi Wasallam) and said, 'O Messenger of Allah, I am ruined!' The Prophet asked, 'What has ruined you?' He said, 'I had intercourse with my wife during Ramadan.' The Prophet said, 'Can you free a slave?' The man replied, 'No.' The Prophet then asked, 'Can you fast for two consecutive months?' He said, 'No.' The Prophet then asked, 'Can you feed sixty poor people?' He said, 'No.'"
The expiation for sexual intercourse follows a sequence: first, freeing a slave; if unable, then fasting two consecutive months; if still unable, then feeding sixty needy individuals. Following this order is obligatory.
Menstruation (Haydh) and Postnatal Bleeding (Nifaas)
The fast of a woman is invalidated when she menstruates (Haydh) or suffers from postnatal bleeding (Nifaas), even if these occur moments before sunset. In such cases, she is required only to make up (Qadha) the missed fasts. Aishah (Radhi Allahu Anha) narrated:
كنا نُؤمرُ بقضاءِ الصومِ ولا نُؤمرُ بقضاءِ الصلاةِ
(Sahih Muslim: 335)
"We were commanded to make up the fasts (missed due to menstruation), but not the prayers."
Eating or Drinking
Among the most direct nullifiers of the fast are the deliberate acts of eating and drinking during the fasting hours. If a person intentionally consumes food or drink, his fast is broken, and he must repent immediately while making up (Qadha) the missed day after Ramadan. Allah states in the Qur'an:
وَكُلُوا وَاشْرَبُوا حَتَّىٰ يَتَبَيَّنَ لَكُمُ ٱلْخَيْطُ ٱلْأَبْيَضُ مِنَ ٱلْخَيْطِ ٱلْأَسْوَدِ مِنَ ٱلْفَجْرِ ۖ ثُمَّ أَتِمُّوا ٱلصِّيَامَ إِلَى ٱلَّلَّيْلِ
(Surah Baqarah: 2:187)
"And eat and drink until the white thread of dawn becomes distinct to you from the black thread [of night]. Then complete the fast until the night."
Smoking
Smoking, similarly, falls under the category of consumption because the inhaled smoke reaches the throat and lungs and in turn invalidates the fast.
Masturbation
Among the actions that invalidate the fast are those that take the same ruling as eating and drinking. One such act is masturbation. The person who does so must sincerely repent, refrain from eating or drinking for the rest of the day, and make up the fast later. If he begins the act but stops before ejaculating, his fast remains valid, though he should seek forgiveness. This ruling is taken from the Hadith of Abu Zar (Radhi Allahu Anhu), in which the Prophet (Sallallahu Alaihi Wasallam) said:
"وفي بُضْعِ أحدِكُم صدقةٌ"، قالوا: يا رسولَ اللهِ! أيأتي أحدُنا شهوتَه ويكونُ له فيها أجرٌ؟! قال: "أرأيتم لو وضَعَها في حرامٍ، أكان عليه فيها وزرٌ؟ فكذلك إذا وضَعَها في الحلالِ كان له أجرٌ"
(Sahih Muslim: 1006)
"In the sexual act of one of you there is charity." The Sahaba said, "O Messenger of Allah! If one of us fulfills his desire, will he have a reward for that?" He replied, "Do you not see that if he were to fulfill it unlawfully, he would bear a burden of sin? Likewise, if he fulfills it lawfully, he will have a reward."
On the other hand, pre-seminal fluid (Mazi) does not break the fast according to the strongest opinion of Ulama, as it is distinct from complete ejaculation. One important point to be noted here is that wet dreams (Ehtelaam) do not nullify the fast. Since they occur outside a person's control, they carry no consequence upon the validity of one's fasting.
Vomiting Intentionally
The Prophet (Sallallahu Alaihi Wasallam) said:
مَنْ ذَرَعَهُ ٱلْقَيْءُ فَلَا قَضَاءَ عَلَيْهِ، وَمَنْ ٱسْتَقَاءَ فَعَلَيْهِ ٱلْقَضَاءُ
(Sunan Abu Daud: 2380)
"Whoever is overcome by vomiting, there is no makeup upon him. But whoever vomits intentionally must make up (that day)."
He should make up that day by Qadha after the Ramadan and he should strive to not repeat such acts in the future, while also refraining from anything that could lead to it.