How Prayer Times Are Calculated — The Math Behind Every Adhan
How Are Prayer Times Calculated? The Complete Mathematical Explanation
Prayer times are calculated using astronomical formulas based on the sun's position relative to a specific geographic location. Each of the five daily prayers — Fajr, Dhuhr, Asr, Maghrib, and Isha — corresponds to a specific solar angle or event. Fajr begins at true dawn when the sun is 15–18 degrees below the horizon. Dhuhr starts when the sun passes its zenith (highest point). Asr begins when an object's shadow equals its length (Hanafi: twice its length) plus the noon shadow. Maghrib starts at sunset when the sun's disk disappears below the horizon. Isha begins when twilight disappears, typically when the sun is 15–18 degrees below the horizon. Every prayer app, mosque timetable, and website uses these same core formulas — the differences come down to which calculation angles and conventions they adopt.
Why Do Prayer Times Differ Between Apps and Mosques?
If you have ever compared prayer times on your phone with your local mosque's timetable and found a 5–15 minute difference, you are not imagining things. The variation comes from several legitimate factors:
- Calculation method: Different organizations use different sun angles for Fajr and Isha. The Muslim World League uses 18° for Fajr and 17° for Isha. ISNA (North America) uses 15° for both. Umm al-Qura (Makkah) uses a fixed 90-minute offset from Maghrib for Isha. Egypt uses 19.5° for Fajr and 17.5° for Isha.
- Asr school of thought: The Hanafi school calculates Asr when an object's shadow is twice its own length plus the noon shadow. The Shafi'i, Maliki, and Hanbali schools use once the length. This can create a difference of 30–60 minutes.
- Geographic coordinates: Even a small error in latitude/longitude can shift prayer times by several minutes, especially at higher latitudes.
- Altitude and terrain: Mosques in valleys or high-altitude cities may adjust times based on actual visible sunset vs. calculated sunset.
- Seasonal adjustments: Some mosques round times slightly for community convenience, especially in summer when days are extremely long.
None of these approaches is "wrong" — they represent different scholarly interpretations and practical considerations. The key is consistency and following a reliable method.
The Five Prayers: Exact Calculation for Each
How Is Fajr Time Calculated?
Fajr begins at Subul-Sadiq (true dawn) — the horizontal spread of light across the eastern horizon, as opposed to the vertical glow of false dawn (Fajr al-Kadhib) that appears earlier. Astronomically, this corresponds to when the center of the sun is at a specific angle below the horizon.
The most commonly used angles are:
- 18 degrees: Used by the Muslim World League, most of the Middle East, and many South Asian countries. This produces an earlier Fajr time.
- 15 degrees: Used by ISNA (Islamic Society of North America). This produces a later Fajr time, which some scholars prefer for safety.
- 19.5 degrees: Used by the Egyptian General Survey Authority. This produces the earliest Fajr time among major methods.
The formula calculates the time when the sun's geometric center reaches the chosen angle below the horizon, then adjusts for atmospheric refraction (which bends sunlight and makes the sun appear slightly higher than it actually is). At higher latitudes (above 55°N), these angles can produce Fajr times that are extremely early or do not exist at all during certain weeks in summer — which is why special "high-latitude" rules were developed.
How Is Dhuhr Time Calculated?
Dhuhr is the simplest prayer to calculate. It begins when the sun crosses the local meridian — its highest point in the sky for that day. This is essentially solar noon, though it rarely matches exactly 12:00 on your clock.
The formula accounts for three factors:
- Longitude correction: Every degree of longitude away from your time zone's reference meridian shifts solar noon by 4 minutes. If you live 5 degrees east of the reference, solar noon occurs 20 minutes before noon. If 5 degrees west, 20 minutes after.
- Equation of time: Earth's elliptical orbit and axial tilt cause solar noon to vary by up to ±16 minutes throughout the year compared to clock noon.
- Daylight saving time: If your region observes DST, the clock shifts forward by 1 hour, pushing Dhuhr later on the clock.
In practice, Dhuhr on your clock might fall anywhere from 11:30 AM to 1:30 PM depending on your location and time of year. Most apps add a small buffer (1–3 minutes) after the exact meridian crossing to ensure the sun has definitively passed its zenith.
How Is Asr Time Calculated?
Asr begins when the shadow of any vertical object equals a specific multiple of the object's height plus the shadow length at solar noon. This is where the major scholarly difference exists:
- Shafi'i, Maliki, and Hanbali (Standard): Shadow = object height + noon shadow. This is the most common method worldwide and produces an earlier Asr time.
- Hanafi: Shadow = 2 × object height + noon shadow. This produces a later Asr time, typically 30–60 minutes after the standard method.
The astronomical formula converts this shadow ratio into a solar elevation angle. For the standard method, the sun angle at Asr varies throughout the year (since the noon shadow length changes with the seasons). In winter, when the sun is lower, Asr starts earlier. In summer, when the sun is higher, Asr starts later.
Practical example: In Riyadh on June 21 (summer solstice), standard Asr might begin around 3:15 PM, while Hanafi Asr would begin around 4:00 PM. On December 21 (winter solstice), standard Asr might begin around 2:45 PM, and Hanafi around 3:30 PM.
How Is Maghrib Time Calculated?
Maghrib begins at sunset — when the upper edge of the sun's disk disappears below the horizon. The calculation accounts for:
- Solar angle: The standard is 0.833° below the horizon (accounting for the sun's apparent radius of 0.267° and average atmospheric refraction of 0.566°).
- Altitude adjustment: If you are on a mountain or in a high-rise building, you can see the sun set later than someone at sea level. Some apps allow you to input your altitude for precision.
- Terrain: Mountains to the west can block the sun earlier than the calculated time. Some mosques in mountainous areas adjust Maghrib slightly earlier based on actual observation.
Maghrib is unique because it is the only prayer that is traditionally tied to actual visual observation of the sunset. The Prophet Muhammad (peace be upon him) said: "Prayer time is from when this twilight (Fajr) appears until the shadow becomes equal to the object (Asr)... Maghrib time remains as long as twilight has not disappeared." This is why some scholars emphasize that Maghrib should be prayed promptly — within 15–30 minutes of sunset.
How Is Isha Time Calculated?
Isha begins when complete darkness arrives — when the twilight glow disappears from the western horizon. Like Fajr, this is defined by the sun's angle below the horizon:
- 17 degrees: Muslim World League. This is the most widely used angle globally.
- 15 degrees: ISNA. Produces a later Isha time.
- 18 degrees: Used by some South Asian countries. Produces an earlier Isha time.
- Fixed time (Umm al-Qura): Isha is set at exactly 90 minutes after Maghrib (or 120 minutes during Ramadan). This method is used in Makkah and some Gulf countries.
- 14 degrees: Used by the University of Islamic Sciences, Karachi. Produces a later Isha time.
At extreme latitudes (above approximately 55°N), the sun may never reach 17° below the horizon during summer months. This creates a period where "true night" never arrives. Scholars have proposed several solutions: using the nearest day when Isha is calculable, using the nearest city at a normal latitude, or using a fixed proportion of the night. Most major apps implement one of these high-latitude adjustments.
What Are the Major Prayer Time Calculation Methods?
Different regions and organizations have standardized specific parameter sets. Here are the most widely used methods:
Muslim World League (MWL)
Used across Europe, the Middle East, and parts of Africa. Fajr angle: 18°. Isha angle: 17°. Asr: standard (shadow = 1× height). This is the default method in many popular apps including Muslim Pro and PrayTimes.org.
ISNA (Islamic Society of North America)
Used across the United States and Canada. Fajr angle: 15°. Isha angle: 15°. Asr: standard. Designed for North American latitudes with slightly more conservative angles.
Egyptian General Survey Authority (EGA)
Used in Egypt and parts of North Africa. Fajr angle: 19.5°. Isha angle: 17.5°. Asr: standard. Produces the earliest Fajr among major methods.
University of Islamic Sciences, Karachi (UISK)
Used in Pakistan, Bangladesh, and parts of India. Fajr angle: 18°. Isha angle: 18°. Asr: standard. Produces an earlier Isha time.
Umm al-Qura University (Makkah)
Used in Saudi Arabia. Fajr angle: 18.5°. Isha: fixed 90 minutes after Maghrib (120 minutes in Ramadan). Asr: standard. The fixed Isha time is unique to this method.
Dubai
Used in the UAE. Fajr angle: 18.2°. Isha angle: 18.2°. Asr: standard. Very similar to MWL but with slight adjustments.
Qatar
Similar to Umm al-Qura but with Fajr at 18° and Isha as a fixed 90 minutes after Maghrib.
Kuwait
Fajr angle: 18°. Isha angle: 17.5°. Asr: standard.
Moonsighting Committee
Fajr angle: 18°. Isha angle: 18°. Asr: standard. This method also incorporates moon sighting for Ramadan and Eid determinations.
Diyanet (Turkey)
Used in Turkey and the Balkans. Fajr angle: 18°. Isha angle: 17°. Asr: standard. Turkey uses the standard European time zone system with these angles.
Singapore
Fajr angle: 20°. Isha angle: 18°. Asr: standard. The higher Fajr angle (20°) produces a later Fajr time, which is common in Southeast Asian countries.
How Do Prayer Apps Handle High Latitude Locations?
In cities like London, Oslo, Stockholm, and Anchorage, the sun's behavior in summer and winter creates extreme prayer time challenges. In summer, Fajr can begin at 1:00 AM and Isha may not start until 1:00 AM the next day — leaving almost no night. In winter, the opposite occurs with very short days.
Scholars and developers have developed several approaches:
- Angle-based division: The night is divided into sevenths, and Fajr/Isha are assigned to specific portions. This is the "one-seventh" rule used by some scholars.
- Nearest city rule: Use the prayer times of the nearest city at a "normal" latitude (below 48°) where standard angles work.
- Nearest day rule: Use the last day when standard angles produced valid results.
- Fixed interval: Set Fajr at a fixed time before sunrise (e.g., 90 minutes) and Isha at a fixed time after Maghrib (e.g., 90 minutes).
- Combination: Most apps use a hybrid approach, switching between methods depending on the severity of the latitude issue.
If you live at a high latitude, consult your local mosque or Islamic center for their recommended approach. Many communities in Scandinavia and northern Canada have established local conventions.
How to Verify Your Prayer Times Are Accurate
Here is a practical checklist to ensure your prayer times are correct:
- Check your coordinates: Open your prayer app settings and verify your latitude and longitude. An error of 0.5° can shift times by 2–5 minutes.
- Confirm the calculation method: Make sure your app uses the method recommended by your local mosque or country. In Saudi Arabia, use Umm al-Qura. In Egypt, use EGA. In the US, ISNA or MWL are common.
- Check Asr setting: If you follow the Hanafi school, ensure your app is set to Hanafi Asr. Most apps default to the standard (Shafi'i) method.
- Account for altitude: If you live in a high-rise building or mountainous area, adjust accordingly. Higher altitude = later sunset = later Maghrib.
- Cross-reference: Compare your app with at least two other sources — your local mosque timetable, another app, and our Prayer Times tool at Adwatak.
- Seasonal awareness: Prayer times shift by 30–90 minutes over the course of a year in most locations. Do not rely on a printed timetable from last year.
How Qibla Direction Relates to Prayer Time Calculations
The same astronomical formulas used to calculate prayer times are also used to determine the Qibla direction (direction of the Kaaba in Makkah). Both calculations require knowing your exact latitude and longitude, and both use spherical trigonometry to determine the relationship between your location and a reference point.
The Qibla calculation uses the great circle formula — the shortest path between two points on a sphere. This is why the Qibla direction from North America is northeast (not east, as many people assume), and from Japan it is west-northwest. If you want to find the Qibla direction from your city, use our Qibla Direction tool for an accurate, instant result.
Common Mistakes People Make with Prayer Times
Mistake 1: Using the Wrong Calculation Method
Many Muslims download a prayer app and never check which calculation method it uses. If you live in Saudi Arabia but your app is set to ISNA (North American) settings, your Fajr could be off by 15–20 minutes. Always verify the method matches your region.
Mistake 2: Ignoring Hanafi Asr
Hanafi Muslims who do not change their app's Asr setting will pray Asr 30–60 minutes too early. This is one of the most common errors. Go into your app's settings and select "Hanafi" for Asr if that is your madhab.
Mistake 3: Relying on Outdated Printed Timetables
Paper timetables are often printed for an entire month using a single calculation. But prayer times shift by 1–2 minutes per day. Over a month, this accumulates to 30–60 minutes of drift. Always use a live digital source for accuracy.
Mistake 4: Not Accounting for Daylight Saving Time
When clocks spring forward or fall back, your prayer times shift by a full hour. Some apps handle this automatically; others do not. If you notice a sudden 1-hour jump in your prayer times, check your DST settings.
Mistake 5: Confusing Solar Noon with 12:00 PM
Dhuhr is based on solar noon, not clock noon. In some cities, solar noon occurs at 11:45 AM or 1:15 PM on your clock. If you assume Dhuhr is always at 12:15, you could be praying outside the valid time.
Practical Example: Calculating Prayer Times for Riyadh on June 4, 2026
Here is how the math works for a real location. Riyadh, Saudi Arabia (latitude 24.7136°N, longitude 46.6753°E) on June 4, 2026:
- Sunrise: Calculated at approximately 5:05 AM. The sun's center crosses the horizon (adjusted for refraction at 0.833°).
- Solar noon: Calculated at approximately 11:53 AM (accounting for Riyadh's longitude offset from the time zone meridian and the equation of time).
- Dhuhr: 11:53 AM + 2 minute buffer = 11:55 AM
- Asr (standard): When shadow = object height + noon shadow. Calculated at approximately 3:25 PM
- Asr (Hanafi): When shadow = 2× object height + noon shadow. Calculated at approximately 4:10 PM
- Sunset: Calculated at approximately 6:38 PM.
- Maghrib: 6:38 PM + 2 minute buffer = 6:40 PM
- Isha (Umm al-Qura): Maghrib + 90 minutes = 8:10 PM
- Isha (MWL 17°): When sun reaches 17° below horizon = approximately 8:05 PM
- Fajr (Umm al-Qura 18.5°): When sun reaches 18.5° below horizon = approximately 3:55 AM
Notice how the different methods produce slightly different times. The Umm al-Qura fixed Isha (8:10 PM) is close to the MWL angle-based Isha (8:05 PM), but they are calculated using completely different approaches.
Frequently Asked Questions (FAQ)
Why Do Different Prayer Apps Show Different Times for the Same Location?
Different apps use different calculation methods, sun angles, and rounding conventions. For example, one app might use the Muslim World League method (Fajr at 18°) while another uses ISNA (Fajr at 15°), creating a 10–15 minute difference in Fajr. Additionally, some apps round times to the nearest 5 minutes for simplicity, while others show exact minutes. The app's geocoding accuracy also matters — if your coordinates are slightly off, the times will shift. To get the most accurate times, use an app that lets you select your preferred calculation method and verify your coordinates.
What Is the Correct Angle for Fajr — 15°, 18°, or 19.5°?
There is scholarly debate on this question. The 18° angle is the most widely accepted and is used by the Muslim World League, which represents scholars from over 200 countries. The 15° angle (used by ISNA) is considered more conservative by some scholars because it produces a later Fajr, ensuring you do not start fasting or praying too early. The 19.5° angle (Egyptian method) produces the earliest Fajr. All three are legitimate scholarly positions. The safest approach is to follow the method used by your local mosque or country's official religious authority.
How Is Asr Time Different in the Hanafi School?
In the Hanafi school, Asr begins when the shadow of an object is equal to twice the object's height plus the shadow at solar noon. In the Shafi'i, Maliki, and Hanbali schools, it is once the object's height plus the noon shadow. This means Hanafi Asr starts later — typically 30 to 60 minutes after the standard Asr time, depending on the season and latitude. If you are Hanafi, make sure your prayer app has a "Hanafi Asr" setting. Most major apps including Muslim Pro, Athan, and PrayTimes offer this option in their settings.
Can I Pray Isha Right After Maghrib?
Technically, yes — Isha begins when twilight disappears, which happens at a specific sun angle below the horizon. However, it is recommended (Mustahabb) to delay Isha slightly. The Prophet Muhammad (peace be upon him) said: "If it were not a hardship for my Ummah, I would have delayed this prayer to the middle of the night." Most scholars recommend praying Isha within the first third of the night, and some prefer the first half. In summer at high latitudes, when Isha may start very late, many scholars permit praying Isha earlier for convenience.
What Happens to Prayer Times in Places Like Norway or Alaska in Summer?
In extreme northern latitudes, the sun may not dip far enough below the horizon for Fajr and Isha to be calculated using standard angles. During certain weeks in summer, there may be no true night — the sun barely sets and immediately rises again. Scholars have ruled that Muslims in these locations should use alternative methods: either the nearest day when normal times are possible, the nearest city at a normal latitude, or divide the night into portions and assign Fajr and Isha to specific segments. Many mosques in Scandinavia and northern Canada have established local conventions — consult your local Islamic center for guidance.
How Accurate Are Phone Compass Apps for Qibla Direction?
Phone compass apps can be accurate to within 2–5 degrees if properly calibrated, but they are susceptible to magnetic interference from metal objects, electronics, and building structures. For the most accurate Qibla direction, use a dedicated tool like our Qibla Direction Calculator at Adwatak, which uses your GPS coordinates and spherical trigonometry to calculate the exact great-circle direction to the Kaaba. This method is more reliable than a magnetic compass, especially indoors.
Why Does My Mosque's Fajr Time Differ from My App by 10 Minutes?
This is extremely common and usually has a simple explanation. Your mosque may use a different calculation method, a different Fajr angle, or may add a safety buffer to ensure Fajr is not prayed too early. Some mosques also use actual moon sighting and visual dawn observation rather than purely astronomical calculations. Additionally, if your mosque is in a different part of the city or at a different altitude, the times will naturally differ slightly. A 5–10 minute difference is normal and does not mean either source is wrong.
How Do I Calculate Prayer Times Manually Without an App?
You can calculate approximate prayer times using basic astronomical data. For any location, you need: (1) your latitude and longitude, (2) the date, and (3) the sun's declination for that day (available in astronomical almanacs or online). Using the formula: cos(H) = [sin(−0.833°) − sin(lat) × sin(dec)] / [cos(lat) × cos(dec)], where H is the hour angle, you can calculate sunrise and sunset. From there, Dhuhr is solar noon, Asr uses the shadow ratio formula, and Fajr/Isha use their respective angles. However, this requires trigonometry and is time-consuming — which is why most people use apps or our Prayer Times tool for instant, accurate results.
Is It Permissible to Combine Prayers to Avoid Difficult Times?
Combining prayers (Jam') is permitted in specific circumstances according to most scholars. The Hanafi school generally only permits combining at Arafah and Muzdalifah during Hajj. The Shafi'i and Hanbali schools permit combining due to rain, illness, or travel. Some scholars also permit combining for genuine hardship, such as extreme prayer times at high latitudes. If you face genuinely difficult prayer times (e.g., Fajr at 2:00 AM and Isha at 1:00 AM with only 1 hour of sleep), consult a knowledgeable scholar about your specific situation.
How Does the Equation of Time Affect Prayer Times?
The equation of time accounts for the fact that Earth's orbit is elliptical (not perfectly circular) and its axis is tilted. This means the sun does not cross the meridian at exactly 12:00 clock time every day. The difference ranges from about −14 minutes (in November) to +16 minutes (in February). This affects Dhuhr time directly — solar noon might occur at 11:46 AM or 12:14 PM on your clock. All accurate prayer time calculators account for this. If you are calculating manually, you can find the equation of time value for any date in astronomical tables.
What Is the Best Prayer Time App to Use?
The best app is one that: (1) uses the calculation method recommended in your country, (2) allows you to select your Asr school (Hanafi vs. standard), (3) updates automatically for daylight saving time, (4) uses accurate GPS coordinates, and (5) is regularly updated. Popular options include Muslim Pro, Athan, PrayTimes, and the built-in prayer time features on most smartphones. You can also use our Prayer Times tool at Adwatak for a quick, accurate reference without installing anything.
Summary
Prayer times are not arbitrary — they are calculated using precise astronomical formulas based on the sun's position relative to your exact location. The five daily prayers correspond to specific solar angles and events: Fajr at dawn (sun 15–18° below horizon), Dhuhr at solar noon, Asr when shadows reach a specific ratio, Maghrib at sunset, and Isha at complete darkness (sun 15–18° below horizon). Differences between apps and mosques come from legitimate variations in calculation methods, Fajr/Isha angles, Asr school of thought, and geographic precision. Understanding these formulas helps you verify your times, choose the right settings, and appreciate the remarkable precision built into every adhan. For accurate prayer times and Qibla direction, visit Adwatak.cloud — your free, privacy-first Islamic tools platform.