Skip to main content

Ramadan Fasting Hours Calculator

Calculate fasting hours from dawn to sunset for any location and date during Ramadan. Enter values for instant results with step-by-step formulas.

Skip to calculator
Islamic & Regional

Ramadan Fasting Hours Calculator

Calculate fasting hours from dawn (Fajr) to sunset (Maghrib) for any location and date during Ramadan based on latitude and astronomical calculations.

Last updated: December 2025

Calculator

Adjust values & calculate
Day 15
Fasting Duration - Day 15
13h 14m
Kabul (33.9N, 67.7E)
Fajr (Begin Fast)
4:42 AM
Maghrib (Break Fast)
5:55 PM
Sunrise
6:05 AM
Daylight Hours
11h 51m
Ramadan Overview
Shortest Day
Day 1
12h 44m
Average
13h 15m
Longest Day
Day 30
13h 47m

Daily Fasting Schedule

Day 1
4:56 AM - 5:41 PM12h 44m
Day 6
4:51 AM - 5:46 PM12h 54m
Day 11
4:46 AM - 5:51 PM13h 5m
Day 16
4:41 AM - 5:56 PM13h 16m
Day 21
4:35 AM - 6:02 PM13h 27m
Day 26
4:29 AM - 6:07 PM13h 38m
Day 30
4:24 AM - 6:12 PM13h 47m
Note: These are estimated times based on astronomical calculations. Actual times may vary by a few minutes. Always confirm with your local mosque or Islamic authority for official prayer and fasting times.
Your Result
Day 15: 13h 14m fasting (Kabul) | Fajr: 4:42 AM | Maghrib: 5:55 PM
Share Your Result
Understand the Math

Formula

Fasting Hours = Maghrib Time - Fajr Time

Where Fajr is calculated as the time when the sun is 15 to 19 degrees below the horizon (depending on method) before sunrise, and Maghrib is the time of sunset. The solar hour angle formula uses latitude, solar declination, and the relevant twilight angle to determine exact times.

Last reviewed: December 2025

Worked Examples

Example 1: Fasting Hours in Kabul (Mid-Ramadan 2025)

Calculate fasting hours for Kabul, Afghanistan (latitude 33.9 N) on the 15th day of Ramadan 2025 using the standard 18-degree method.
Solution:
Solar declination for day 73 of year: approximately 3.5 degrees Fajr (18 degrees below horizon): approximately 4:15 AM Maghrib (sunset): approximately 6:15 PM Fasting duration: 6:15 PM - 4:15 AM = 14 hours 0 minutes Daylight hours (sunrise to sunset): approximately 12h 10m
Result: Fasting hours: approximately 14 hours | Fajr: ~4:15 AM | Maghrib: ~6:15 PM

Example 2: Comparison: Makkah vs London (Summer Ramadan)

Compare fasting hours between Makkah (21.4 N) and London (51.5 N) when Ramadan falls in late June.
Solution:
Makkah (21.4 N, summer solstice area): Solar declination: ~23.4 degrees Fasting duration: approximately 15 hours London (51.5 N, near summer solstice): Solar declination: ~23.4 degrees Fasting duration: approximately 18-19 hours Difference: London fasts 3-4 hours longer due to higher latitude
Result: Makkah: ~15 hours | London: ~18-19 hours | Difference: ~3-4 hours longer in London
Expert Insights

Background & Theory

The Ramadan Fasting Hours Calculator applies the following established principles and formulas. Islamic financial and religious calculations operate within a framework that integrates theological principles with precise mathematical methodology. Zakat, one of the five pillars of Islam, requires payment of 2.5% of qualifying wealth held above the nisab threshold for a complete lunar year. The nisab is pegged to the value of 85 grams of gold or 595 grams of silver, whichever provides the lower threshold, and must be recalculated against current market prices. Qualifying wealth includes cash, savings, business inventory, and investment assets, but excludes primary residence, personal-use items, and tools of trade. Hijri calendar conversion is essential for determining Ramadan dates, Zakat anniversaries, and contract terms expressed in lunar months. The Hijri calendar contains 12 lunar months totalling approximately 354.37 days, making it roughly 11 days shorter than the Gregorian year. Converting between calendars requires accounting for the accumulated drift: since the Hijri epoch of 622 CE (the Prophet's migration from Mecca to Medina), the difference compounds annually. Qibla direction calculation employs spherical trigonometry to determine the great-circle bearing from any point on Earth toward the Kaaba in Mecca (coordinates 21.4225ยฐN, 39.8262ยฐE). The formula accounts for the curvature of the Earth, meaning the bearing from New York to Mecca is approximately northeast rather than the intuitive eastward direction seen on flat maps. Prayer times are determined by solar angles: Fajr begins when the sun is 15-18 degrees below the horizon before dawn; Dhuhr at solar noon; Asr when shadow length equals object height plus its shadow at noon; Maghrib at sunset; and Isha when twilight disappears. These calculations vary by latitude and season, requiring location-specific algorithms. Islamic finance prohibits riba (interest), requiring profit-sharing structures such as Mudarabah (capital provider and entrepreneur share profits at a pre-agreed ratio) and Musharakah (joint venture with proportional profit and loss sharing).

History

The history behind the Ramadan Fasting Hours Calculator traces back through the following developments. Islamic civilisation made foundational contributions to mathematics and astronomy that underpin many of the calculation methods still used today. Muhammad ibn Musa al-Khwarizmi, working at the House of Wisdom in Baghdad in the 9th century, authored Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the work from whose title the word algebra derives. His systematic approach to equation solving provided tools directly applicable to financial and calendar calculations. Al-Biruni in the 11th century developed sophisticated methods for calculating geographic coordinates and direction, including early formulations of what became the qibla calculation. The Hijri calendar was formally established by Caliph Umar ibn al-Khattab in 638 CE, fixing the Prophet Muhammad's migration (Hijra) from Mecca to Medina in 622 CE as the epoch. This calendar standardised religious observances across the expanding Muslim world. Islamic inheritance law (Faraid) was codified from Quranic verses and Hadith during the early Islamic period, establishing precise fractional shares for defined classes of heirs. The complexity of multi-heir scenarios drove development of sophisticated fraction arithmetic among early Islamic jurists and mathematicians. The Ottoman Empire administered Zakat as a state function for centuries, integrating it with broader fiscal policy until the empire's dissolution after World War I. The 20th century saw Islamic finance principles largely dormant in formal banking until the resurgence of Islamic banking in Egypt (Mit Ghamr Savings Bank, 1963) and the Gulf states following the 1973 oil boom provided capital for institution-building. The Accounting and Auditing Organization for Islamic Financial Institutions (AAOIFI), established in Bahrain in 1991, and the Islamic Financial Services Board (IFSB), established in Kuala Lumpur in 2002, created the standards infrastructure for modern Islamic finance. The global Islamic finance industry has grown to approximately three trillion US dollars in assets, spanning banking, takaful insurance, sukuk bonds, and Islamic funds across over 80 countries.

Share this calculator

Explore More

Frequently Asked Questions

Ramadan fasting hours are calculated using astronomical formulas based on the position of the sun relative to a specific location on Earth. The fasting period begins at Fajr (true dawn), when the sun is approximately 18 degrees below the horizon before sunrise, and ends at Maghrib (sunset), when the sun dips below the horizon. The calculation requires knowing the geographic latitude and longitude of the location, the day of the year (which determines solar declination), and the chosen calculation method for Fajr angle. The solar declination changes throughout the year as the Earth orbits the sun with its tilted axis, which is why fasting hours vary dramatically between summer and winter Ramadan and between different latitudes. Locations closer to the equator experience relatively consistent fasting hours year-round.
The variation in fasting hours between countries is primarily driven by differences in geographic latitude, which determines how long the sun takes to travel across the sky. Countries near the equator, such as Indonesia, Malaysia, and equatorial African nations, experience relatively consistent fasting hours of approximately 12 to 13 hours regardless of when Ramadan falls in the Gregorian calendar. Countries at higher latitudes experience extreme variations depending on the season. When Ramadan falls in summer, Scandinavian countries can experience fasting periods of 20 to 22 hours, while the same countries might fast only 8 to 10 hours during a winter Ramadan. This latitude effect also explains why cities like Makkah and Medina, located near the Tropic of Cancer, have moderate fasting hours typically ranging from 13 to 15 hours throughout the year.
The Islamic (Hijri) calendar is a purely lunar calendar consisting of 12 lunar months that total approximately 354 days, which is about 11 days shorter than the 365-day Gregorian solar calendar. This means Ramadan begins approximately 11 days earlier each Gregorian year, cycling through all seasons over a period of roughly 33 years. A Muslim born in a year when Ramadan falls in summer will experience Ramadan in every season throughout their lifetime, ensuring equitable distribution of longer and shorter fasting days across different regions. This lunar cycle has significant practical implications: Muslims in northern latitudes will experience both the challenge of 18-hour summer fasts and the ease of 8-hour winter fasts, while equatorial Muslims fast consistently similar hours regardless of the seasonal position of Ramadan.
The shortest and longest fasting periods during Ramadan depend on the latitude and the time of year when Ramadan falls. At the equator, fasting hours remain relatively constant at approximately 12 hours and 30 minutes to 13 hours throughout the year, making equatorial regions the most consistent for fasting duration. The shortest fasts experienced by major Muslim populations occur when Ramadan falls in winter at moderate latitudes, with cities like Istanbul, London, and New York experiencing fasting periods as short as 8 to 10 hours. The longest regular fasts occur when Ramadan falls in summer at high latitudes, with cities like Stockholm, Oslo, and Reykjavik potentially reaching 20 to 22 hours of fasting. In truly extreme cases above the Arctic Circle during summer, the sun may not set at all, necessitating alternative scholarly methods for determining fasting times.
Time zones affect the display of fasting times but do not change the actual fasting duration, which is determined purely by the sun position relative to the observer location. Solar noon (when the sun is at its highest point) occurs at different clock times depending on where within a time zone a location sits. A city on the eastern edge of a time zone may experience solar noon at 11:30 AM local time, while a city on the western edge of the same zone may have solar noon at 12:30 PM. This means that two cities in the same time zone can have significantly different fasting start and end times on the clock, even if their latitudes are similar. Daylight saving time adds another layer of complexity, shifting clock times by one hour without changing the actual solar position.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

Fasting Hours = Maghrib Time - Fajr Time

Where Fajr is calculated as the time when the sun is 15 to 19 degrees below the horizon (depending on method) before sunrise, and Maghrib is the time of sunset. The solar hour angle formula uses latitude, solar declination, and the relevant twilight angle to determine exact times.

Worked Examples

Example 1: Fasting Hours in Kabul (Mid-Ramadan 2025)

Problem: Calculate fasting hours for Kabul, Afghanistan (latitude 33.9 N) on the 15th day of Ramadan 2025 using the standard 18-degree method.

Solution: Solar declination for day 73 of year: approximately 3.5 degrees\nFajr (18 degrees below horizon): approximately 4:15 AM\nMaghrib (sunset): approximately 6:15 PM\nFasting duration: 6:15 PM - 4:15 AM = 14 hours 0 minutes\nDaylight hours (sunrise to sunset): approximately 12h 10m

Result: Fasting hours: approximately 14 hours | Fajr: ~4:15 AM | Maghrib: ~6:15 PM

Example 2: Comparison: Makkah vs London (Summer Ramadan)

Problem: Compare fasting hours between Makkah (21.4 N) and London (51.5 N) when Ramadan falls in late June.

Solution: Makkah (21.4 N, summer solstice area):\nSolar declination: ~23.4 degrees\nFasting duration: approximately 15 hours\n\nLondon (51.5 N, near summer solstice):\nSolar declination: ~23.4 degrees\nFasting duration: approximately 18-19 hours\n\nDifference: London fasts 3-4 hours longer due to higher latitude

Result: Makkah: ~15 hours | London: ~18-19 hours | Difference: ~3-4 hours longer in London

Frequently Asked Questions

How are Ramadan fasting hours calculated from a scientific perspective?

Ramadan fasting hours are calculated using astronomical formulas based on the position of the sun relative to a specific location on Earth. The fasting period begins at Fajr (true dawn), when the sun is approximately 18 degrees below the horizon before sunrise, and ends at Maghrib (sunset), when the sun dips below the horizon. The calculation requires knowing the geographic latitude and longitude of the location, the day of the year (which determines solar declination), and the chosen calculation method for Fajr angle. The solar declination changes throughout the year as the Earth orbits the sun with its tilted axis, which is why fasting hours vary dramatically between summer and winter Ramadan and between different latitudes. Locations closer to the equator experience relatively consistent fasting hours year-round.

Why do fasting hours vary so much between different countries?

The variation in fasting hours between countries is primarily driven by differences in geographic latitude, which determines how long the sun takes to travel across the sky. Countries near the equator, such as Indonesia, Malaysia, and equatorial African nations, experience relatively consistent fasting hours of approximately 12 to 13 hours regardless of when Ramadan falls in the Gregorian calendar. Countries at higher latitudes experience extreme variations depending on the season. When Ramadan falls in summer, Scandinavian countries can experience fasting periods of 20 to 22 hours, while the same countries might fast only 8 to 10 hours during a winter Ramadan. This latitude effect also explains why cities like Makkah and Medina, located near the Tropic of Cancer, have moderate fasting hours typically ranging from 13 to 15 hours throughout the year.

How does the Islamic calendar cause Ramadan to shift each year?

The Islamic (Hijri) calendar is a purely lunar calendar consisting of 12 lunar months that total approximately 354 days, which is about 11 days shorter than the 365-day Gregorian solar calendar. This means Ramadan begins approximately 11 days earlier each Gregorian year, cycling through all seasons over a period of roughly 33 years. A Muslim born in a year when Ramadan falls in summer will experience Ramadan in every season throughout their lifetime, ensuring equitable distribution of longer and shorter fasting days across different regions. This lunar cycle has significant practical implications: Muslims in northern latitudes will experience both the challenge of 18-hour summer fasts and the ease of 8-hour winter fasts, while equatorial Muslims fast consistently similar hours regardless of the seasonal position of Ramadan.

What is the shortest and longest possible fasting period during Ramadan?

The shortest and longest fasting periods during Ramadan depend on the latitude and the time of year when Ramadan falls. At the equator, fasting hours remain relatively constant at approximately 12 hours and 30 minutes to 13 hours throughout the year, making equatorial regions the most consistent for fasting duration. The shortest fasts experienced by major Muslim populations occur when Ramadan falls in winter at moderate latitudes, with cities like Istanbul, London, and New York experiencing fasting periods as short as 8 to 10 hours. The longest regular fasts occur when Ramadan falls in summer at high latitudes, with cities like Stockholm, Oslo, and Reykjavik potentially reaching 20 to 22 hours of fasting. In truly extreme cases above the Arctic Circle during summer, the sun may not set at all, necessitating alternative scholarly methods for determining fasting times.

How do time zones affect Ramadan fasting calculations?

Time zones affect the display of fasting times but do not change the actual fasting duration, which is determined purely by the sun position relative to the observer location. Solar noon (when the sun is at its highest point) occurs at different clock times depending on where within a time zone a location sits. A city on the eastern edge of a time zone may experience solar noon at 11:30 AM local time, while a city on the western edge of the same zone may have solar noon at 12:30 PM. This means that two cities in the same time zone can have significantly different fasting start and end times on the clock, even if their latitudes are similar. Daylight saving time adds another layer of complexity, shifting clock times by one hour without changing the actual solar position.

Is my data stored or sent to a server?

No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.

References

Reviewed by Daniel Agrici, Founder & Lead Developer ยท Editorial policy