Short answer
Yes. Exercise does not break the fast, and the four schools agree. In the Hanafi school, though, effort that weakens you so much that you might have to break the fast is makruh, so keep daytime workouts light and save hard training for after iftar or before suhoor.
Exercising, running or lifting while fasting is permissible and does not break the fast. Heavy exertion that you fear will force you to break the fast is makruh. If you become genuinely ill or dehydrated and fear harm, you may break the fast and make up one day, with no kaffarah.
The four schools agree on this.
Explanation
Sweat leaves the body and nothing enters it, so a workout has no effect on the fast. The concern is practical: you cannot drink, so hard effort in the heat of the day can lead to dehydration, dizziness or fainting.
The Hanafi principle. The scholars dislike anything that weakens the fasting person to the point where he might have to break the fast, such as cupping or giving a large amount of blood. Very hard training in the afternoon falls under the same rule. Light activity, a walk or stretching is fine at any time.
Better times to train:
- Shortly before iftar, so you can drink straight after.
- After iftar and Maghrib, once you have eaten lightly and rehydrated.
- After taraweeh, or before suhoor if you are an early riser.
- Drink steadily between iftar and suhoor, and eat suhoor late.
If you push too far. If you feel faint, badly dehydrated or unwell and fear real harm, you may break the fast and make up the day later, with no kaffarah. But planning a workout you know will force you to break the fast is not a valid excuse. The Prophet ﷺ reminded a Companion who overdid his worship that your body has a right over you. Athletes with matches in Ramadan can read skipping a fast for work, since the same rules apply.
The evidence
Quran, Surah Al-Baqara 2:195
وَأَنفِقُوا۟ فِى سَبِيلِ ٱللَّهِ وَلَا تُلْقُوا۟ بِأَيْدِيكُمْ إِلَى ٱلتَّهْلُكَةِ ۛ وَأَحْسِنُوٓا۟ ۛ إِنَّ ٱللَّهَ يُحِبُّ ٱلْمُحْسِنِينَ ﴿١٩٥﴾
And spend in the way of Allah and do not throw [yourselves] with your [own] hands into destruction [by refraining]. And do good; indeed, Allah loves the doers of good.
You must not push your body into harm, including while fasting.
Sahih al-Bukhari 1975
Sahih... فإن لجسدك عليك حقا وإن لعينك عليك حقا ...
"Your body has a right over you, and your eyes have a right over you."
Worship and effort should not wear the body down to the point of harm.
Where the ruling is recorded
- Radd al-Muhtar (Ibn Abidin), Kitab al-Sawm, chapter on what is disliked for the fasting person. Whatever weakens the fasting person so that he fears breaking the fast is disliked.
- al-Fatawa al-Hindiyya, Kitab al-Sawm, chapter on excuses for breaking the fast. Someone who fears real harm from thirst or hunger may break the fast and make it up.
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.