Short answer
Yes, in the Hanafi school and most scholars, the fast of someone who misses prayers is valid and is not repeated, but leaving the prayer is a major sin, worse than missing a fast. The Hanbali school holds that someone who abandons prayer completely has left Islam, so his fast does not count.
Prayer is not a condition of the fast, so a fast kept by someone who misses one prayer or many is valid. Deliberately leaving a fard prayer is a major sin, and each missed prayer must be made up. Missing a prayer does not break the fast.
Other madhhabs
- Hanbali
- The relied-upon Hanbali view is that someone who abandons prayer altogether, even out of laziness, has left Islam, so his fasting and other deeds are not valid until he repents and prays.
Explanation
The fast has its own conditions: being Muslim, the intention, and for women being free of menstruation and postnatal bleeding. Praying is not one of them. So in the Hanafi school, and in the Shafi'i and Maliki schools too, if you fasted all day but missed Dhuhr or Asr, the fast still counts and you do not repeat it.
But do not take comfort in that. The prayer is the second pillar of Islam and the first deed you will be asked about. The Prophet ﷺ said that between a man and shirk and kufr is leaving the prayer. Many people fast in Ramadan who do not pray the rest of the year. The fast is meant to bring them back to Allah, not to stand in for the prayer.
The Hanbali view. Based on that hadith and others, the Hanbali school holds that a person who abandons the prayer completely is no longer a Muslim, and on that view his fast is not valid at all. The other schools read the hadith as a severe warning and say he is a sinful Muslim whose fast counts.
What to do:
- Keep fasting, and start praying today, even if you are not perfect.
- Make up the prayers you missed. The qada calculator helps you count them.
- Oversleeping a prayer does not break the fast: pray as soon as you wake.
- Repent sincerely. See how to repent.
The evidence
Quran, Surah Maryam 19:59
۞ فَخَلَفَ مِنۢ بَعْدِهِمْ خَلْفٌ أَضَاعُوا۟ ٱلصَّلَوٰةَ وَٱتَّبَعُوا۟ ٱلشَّهَوَٰتِ ۖ فَسَوْفَ يَلْقَوْنَ غَيًّا ﴿٥٩﴾
But there came after them successors who neglected prayer and pursued desires; so they are going to meet evil -
Neglecting the prayer is condemned in the strongest terms.
Sahih Muslim 82
Sahih... إن بين الرجل وبين الشرك والكفر ترك الصلاة ...
"Between a man and shirk and kufr is the abandoning of prayer."
Leaving the prayer is among the gravest sins; the Hanbali school takes it literally.
Where the ruling is recorded
- Radd al-Muhtar (Ibn Abidin), Kitab al-Sawm, opening section on the conditions of the fast. The conditions of a valid fast are Islam, intention, and freedom from menstruation and postnatal bleeding.
- Kashshaf al-Qina', Kitab al-Salah, ruling on one who abandons the prayer. The Hanbali ruling that one who abandons prayer entirely has left Islam.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.