Back to Journal
Science

How Prayer Times Are Calculated: The Science Behind Salah Timings

Author

Syed Mohsin Ali Shah

Published

February 24, 2026

Read Time

10 min

How Prayer Times Are Calculated: The Science Behind Salah Timings

Prayer times are not scheduled — they are computed from the position of the sun relative to your exact latitude and longitude. Every one of the five prayers is defined by a solar event: a sun angle below the horizon, a zenith crossing, or a shadow length, which is why the timetable changes every single day and differs between two cities in the same time zone.

The Quran ties the obligation to timing itself: "Indeed, prayer has been decreed upon the believers a decree of specified times" (Quran 4:103). The rest is astronomy.

The Two Numbers Everything Depends On

Two solar quantities drive the entire calculation, and both change daily.

Solar declination (δ) is the angle between the sun's rays and the plane of Earth's equator. Because the Earth's axis is tilted about 23.44°, declination swings from +23.44° at the June solstice to −23.44° in December, passing through zero at the equinoxes. Declination is what makes days long in summer and short in winter, and it is why Fajr can arrive at 3:00 a.m. in June and 6:30 a.m. in December at the same address.

The equation of time (EoT) is the difference between apparent solar time — where the sun actually is — and mean solar time, the uniform clock time we use. Earth's orbit is elliptical and its axis tilted, so the sun runs ahead of or behind the clock by up to about +16 minutes in early November and −14 minutes in mid-February. Solar noon is therefore almost never at 12:00.

From these, solar noon at your location is:

Solar noon = 12:00 − (longitude ÷ 15) − EoT + time zone offset

Every other prayer is derived by solving for the moment the sun sits at a required angle relative to your horizon — a standard spherical-trigonometry hour-angle calculation using your latitude and the day's declination.

How Each Prayer Is Defined

| Prayer | Astronomical definition | | --- | --- | | Fajr | Sun reaches a set angle below the horizon before sunrise (15°–19.5° depending on method) | | Sunrise | Upper limb of the sun crosses the horizon, accounting for refraction and elevation | | Dhuhr | Sun crosses the local meridian (solar noon), plus a small margin | | Asr | An object's shadow equals its noon shadow plus 1× (or 2×) its height | | Maghrib | Sun's upper limb disappears below the horizon (sunset) | | Isha | Sun reaches a set angle below the horizon after sunset (15°–18°), or a fixed interval after Maghrib |

Two of these deserve a closer look.

Dhuhr. The prayer begins after the sun passes its zenith — praying exactly at the meridian crossing is avoided, so timetables add a short buffer, typically one to a few minutes.

Asr. This is the one genuine juristic split in the calculation. The majority of scholars (Shafi'i, Maliki, Hanbali) hold that Asr begins when an object's shadow equals its own length plus the shadow it cast at noon — a shadow factor of 1. The Hanafi school holds it begins at twice the object's length plus the noon shadow — a shadow factor of 2. Both derive from authentic narrations describing Jibril leading the Prophet ﷺ in prayer on two consecutive days at the beginning and end of each window (Tirmidhi 149); the difference is which of those two days anchors the start of Asr. A Hanafi Asr typically falls 30 to 70 minutes later than the majority's, widening with latitude and season.

The classical narration of Abdullah ibn Amr describes the same boundaries in plain language — Dhuhr's window running until a man's shadow equals his height, and so on through the day (Muslim 612). Modern computation reproduces these definitions; it does not replace them.

Calculation Methods: The Angles That Differ

Sunrise, Dhuhr, Asr and Maghrib are essentially fixed once you pick a shadow factor. Fajr and Isha are where methods diverge, because "dawn" and "nightfall" were described visually and different authorities calibrated those descriptions to different depression angles for their own climates and latitudes.

| Method | Fajr angle | Isha angle | Typically used in | | --- | --- | --- | --- | | Muslim World League (MWL) | 18° | 17° | Europe, Far East, general default | | ISNA (North America) | 15° | 15° | USA, Canada | | Umm al-Qura (Makkah) | 18.5° | 90 min after Maghrib | Saudi Arabia, Gulf | | University of Islamic Sciences, Karachi | 18° | 18° | Pakistan, India, Bangladesh, Afghanistan | | Egyptian General Authority of Survey | 19.5° | 17.5° | Egypt, Syria, Iraq, parts of Africa | | Institute of Geophysics, Tehran | 17.7° | 14° | Iran, Shia communities |

Two things to notice. First, Umm al-Qura does not use an Isha angle at all — it fixes Isha at 90 minutes after Maghrib (extended to 120 minutes during Ramadan), a fixed-interval convention that behaves very differently from an angle-based one as you move away from Makkah's latitude. Second, the spread between the ISNA 15° Fajr and the Egyptian 19.5° Fajr is substantial: at mid-latitude in summer it can exceed half an hour.

Why Two Apps Show Different Times

When timetables disagree, the cause is almost always one of these:

  1. Different calculation method — the single biggest factor, worth up to 30+ minutes on Fajr and Isha.
  2. Different Asr madhab setting — shadow factor 1 versus 2, worth 30–70 minutes on Asr alone.
  3. Different coordinates — a city is not a point. Moving 25 km east or west shifts every time by roughly one minute; longitude, not just city name, matters.
  4. Elevation handling — altitude advances sunrise and delays sunset. Ignoring it in a mountain city introduces a few minutes of error.
  5. High-latitude rule — which fallback the app applies when angles fail (see below).
  6. Rounding and safety margins — some publishers round Fajr down and Maghrib up by a minute or two as precaution, others report the raw computed value.

None of these makes one timetable fraudulent. They are different defensible settings. The practical advice is simply to match the method your local mosque uses and stay with it. NamazZone's methodology page documents exactly which angles, shadow factors and adjustments are applied, and the same astronomical machinery drives qibla direction calculation — that one being spherical geometry rather than solar position.

When the Angles Never Happen

Above roughly 48.5° latitude in midsummer, the sun never descends a full 18° below the horizon. Astronomical night does not occur, so an angle-based Fajr or Isha has no solution — the equation simply returns no result. This affects London, Amsterdam, Hamburg and Warsaw for several weeks a year, not only the Arctic.

Calculation engines therefore implement recognised fallback rules: middle of the night (splitting sunset-to-sunrise in half), one-seventh of the night (Isha after the first seventh, Fajr at the start of the last), nearest latitude (borrowing the timetable of a lower latitude, commonly 45° or 48°), or an angle-based fraction of the twilight period. Which one an app applies by default explains most of the wild disagreements users in northern Europe report. The fiqh behind these conventions is covered in prayer times at extreme latitudes.

The Short Version

Prayer times are a solved astronomical problem wrapped around an unsolved-by-design juristic one. The sun's position is computable to the second; the visual thresholds the Sharia describes — the horizontal spread of light at dawn, the disappearance of the red glow at night — are what qualified scholars have translated into degrees, and they translated them differently. Pick a recognised method, set the Asr madhab you follow, verify your coordinates, and the arithmetic will be right every day of the year.

The NamazZone Journal

Stay Optimized.

Our mission is to provide the global Ummah with the most precise tools and insights for a modern spiritual life.

Journal Index