Fasting Hours Calculator
Calculate fasting hours from Fajr to Maghrib for any city or coordinates, with calculation methods, sunrise and sunset times, and date selection. All processing runs in your browser.
What the Fasting Hours Calculator Does
The Fasting Hours Calculator works out how long the daily fast lasts between Fajr, the moment the sky first shows light and suhoor ends, and Maghrib, the sunset moment when iftar begins. Pick one of the preset cities or enter your own latitude and longitude, choose a date, select the Fajr angle used by your community, and the tool shows Fajr, sunrise, sunset, Maghrib, and the full fasting duration for that location and day.
Everything is computed from the position of the sun using the same astronomy that powers prayer time tables. The calculation runs entirely in your browser, so no location or date information is ever sent to a server.
How Fasting Hours Are Calculated
Fajr is defined as the moment the sun sits a fixed number of degrees below the eastern horizon before sunrise. That angle is called the Fajr angle, and different scholarly authorities use different values: 18 degrees for the Muslim World League, 15 degrees for ISNA in North America, 19.5 degrees for Umm al-Qura in Makkah, and 17.7 degrees for the Egyptian General Authority. The tool uses the angle you select to find the exact minute Fajr begins, then pairs it with the astronomical sunset for Maghrib.
Because the sun's path changes with latitude and season, the fasting duration is different almost every day. Near the equator the change is small, while in cities such as London or Stockholm the difference between a December fast and a June fast can be many hours. This is why a calculator that uses the actual coordinates and date is more reliable than a fixed table.
Calculation Methods at a Glance
| Method | Fajr Angle | Commonly Used In |
|---|---|---|
| Muslim World League | 18° | Europe, Far East, parts of the Middle East |
| ISNA | 15° | North America |
| Umm al-Qura | 19.5° | Saudi Arabia |
| Egyptian General Authority | 17.7° | Egypt, Africa, parts of the Middle East |
For dates near the summer solstice at high latitudes, the sun may never reach the Fajr angle below the horizon. In those cases the tool reports that the time is not available and you should follow the ruling of your local mosque or community for those days.
How to Use the Calculator
- Select a city from the list, or choose Custom coordinates and enter a latitude and longitude.
- Pick the date you want to check.
- Choose the Fajr angle that matches your calculation method.
- Read the fasting duration, Fajr, sunrise, sunset, and Maghrib times in the location's local time zone.
- Copy the timing details if you want to keep a record for suhoor and iftar planning.
Getting the Most Accurate Result
- Use precise coordinates: a fraction of a degree changes sunrise by seconds, but a wrong city can shift times by many minutes.
- Match your mosque's method: if your community follows a specific Fajr angle, choose that option so suhoor ends at the same time as the local timetable.
- Account for daylight saving: the displayed times automatically follow the time zone rules of the location on the selected date.
- Add a safety margin: many people stop eating a few minutes before Fajr and break the fast a minute or two after Maghrib as a precaution.
Related Tools
To plan giving during Ramadan, the Zakat Calculator works out zakat on savings, gold, and investments. The Hijri Calendar Converter converts between Hijri and Gregorian dates. To compare daylight length across the year, the Daylight Calculator shows sunrise, sunset, and the length of the day. For general time spans, the Time Duration Calculator finds the difference between two clock times.
Frequently Asked Questions
Which calculation method should I choose?
Use the method your local mosque or community follows. The Muslim World League angle of 18 degrees is the most common default, while communities in North America often use ISNA at 15 degrees and communities in Saudi Arabia use Umm al-Qura.
Why is my fasting duration different from a nearby city?
Fasting length depends on latitude, longitude, and time of year. Two cities on the same latitude can still differ slightly because of the exact coordinate, and cities at different latitudes can differ by a lot, especially in summer and winter.
What time zone are the results shown in?
The results are shown in the local time zone of the selected location, including any daylight saving adjustment that applies on that date. The time zone name is displayed with the results so you can verify it.
What happens in places where the sun does not set or rise?
Near the poles, the sun's angle may never reach the Fajr threshold. In that case the tool reports that the time is not available. Follow your local mosque or the nearest city with a normal day and night cycle.
Is my location data stored?
No. The entire calculation happens in your browser using JavaScript. Your coordinates, date, and results are never uploaded, logged, or stored on a server.