What each prayer time means
Islamic prayer times are defined by what happens in the sky, so they can be calculated for any place on Earth once we know the Sun's position. Three angles do almost all the work: the observer's latitude φ, the Sun's declination δ (how far north or south of the equator it is overhead today), and thehour angle H (how far the Earth has turned since the Sun crossed the local meridian).
| Time | Sky event | Sun's altitude h |
|---|---|---|
| Fajr | True dawn: first light along the eastern horizon | −15° to −19.5° (by method) |
| Sunrise | Upper edge of the Sun appears | −0.833° |
| Dhuhr | Sun crosses the meridian (highest point) | maximum |
| Asr | Shadow reaches a set length | arccot(k + tan|φ − δ|) |
| Maghrib | Sunset: upper edge disappears | −0.833° |
| Isha | Evening twilight ends | −15° to −18° (by method), or a fixed interval |
Sunrise and sunset use −0.833° rather than 0° because the atmosphere bends sunlight by about 34′ at the horizon, and we see the Sun's upper edge, which is 16′ above its centre: 34′ + 16′ = 50′ = 0.833°.
Step 1: where the Sun is today
We follow Jean Meeus, Astronomical Algorithms (2nd ed., 1998), the standard reference used by the adhan library that powers this site. First, count days on a continuous scale, the Julian Day (JD) for 0h UT on the date (year Y, month M, day D; January and February count as months 13 and 14 of the previous year):
with B = 2 − ⌊Y/100⌋ + ⌊Y/400⌋. Time is then measured in Julian centuries since 1 January 2000, 12h:
From T we get the Sun's mean longitude L₀, its mean anomaly M (where it is on its elliptical orbit) and the equation of the centre C, which corrects for the orbit not being a circle:
The Sun's apparent longitude along the ecliptic is λ = L₀ + C − 0.00569 − 0.00478 sin Ω (a small correction for aberration and nutation, Ω = 125.04 − 1934.136T). The Earth's axis is tilted by the obliquity ε ≈ 23.44°, and projecting the Sun's position onto the celestial equator gives its declination and right ascension:
| Quantity | Symbol | Value |
|---|---|---|
| Julian Day (0h UT) | JD | 2461310.5 |
| Julian centuries since J2000 | T | 0.26736482 |
| Mean longitude | L₀ | 185.8058° |
| Mean anomaly | M | 262.4087° |
| Equation of the centre | C | -1.8910° |
| Apparent longitude | λ | 183.9116° |
| Obliquity of the ecliptic | ε | 23.4380° |
| Declination | δ | -1.5548° |
| Right ascension | α | 183.5897° |
| Apparent sidereal time at 0h UT | Θ₀ | 5.8022° |
Step 2: solar noon and Dhuhr
The Sun crosses the local meridian when the Earth has rotated so that the local sidereal time equals the Sun's right ascension. For longitude L (east positive), the transit, as a fraction m of the UT day, is:
For New York today (L = -74.00597°) that gives 16:47 UT. Dhuhr starts at transit; many methods add a minute or more so that the Sun's disc has fully passed the meridian. adhan then refines m by interpolating α and δ between yesterday, today and tomorrow, which moves the result by seconds.
Step 3: the hour-angle equation
In the spherical triangle formed by the celestial pole, the zenith and the Sun, the Sun's altitude his linked to latitude, declination and hour angle by the cosine rule of spherical trigonometry:
Solving for the hour angle at which the Sun reaches a chosen altitude h₀:
The Earth turns 15° per hour, so the event happens H/15 hours before transit (morning) or after it (evening):
Sunrise and Maghrib use h₀ = −0.833°. If the right-hand side is greater than 1 or less than −1 there is no solution: the Sun never gets that low (or high) that day. That is exactly what happens to Fajr and Isha in summer at high latitudes, covered below.
Step 4: Asr and the shadow rule
Asr is defined by shadows. At noon a vertical stick of length 1 casts a shadow of length tan|φ − δ|. Asr begins when the shadow has grown by k stick lengths beyond that: k = 1 for the Standard (Shafi, Maliki, Hanbali) opinion and k = 2 for the Hanafi opinion. A shadow of length smeans the Sun's altitude is arccot s, so:
That altitude goes into the hour-angle equation of Step 3 (afternoon side). In New York today,hAsr = 27.65° for Standard and 18.97° for Hanafi.
Step 5: from angles to your clock
Steps 2–4 give times in Universal Time. We convert them to local time with the IANA time-zone database (e.g. Europe/London, America/New_York), which knows every daylight-saving change, so a timetable crossing a clock change is correct on both sides. Finally each method may add fixed minutes (for example Moonsighting Committee adds 5 minutes to Dhuhr and 3 to Maghrib) and every time is rounded to the nearest minute.
New York is currently UTC−4, so transit at 16:47 UT is 12:47 local time.
Worked example: New York today
Sunday, 27 September 2026, latitude φ = 40.71427°, longitude -74.00597°, ISNA method (Fajr and Isha at 15°), Standard Asr, declination δ = -1.555°. The "formula" column applies Steps 2–4 directly; the "published" column is what the New York City page shows after adhan's refinements, method adjustment and rounding.
| Time | Definition | Hour angle H | Formula (UT) | Formula (local) | Published |
|---|---|---|---|---|---|
| Fajr | Sun 15° below the horizon, before transit | 108.556° | 09:33 UT | 05:32 | 05:33 |
| Sunrise | Upper limb on the horizon (h₀ = −0.833°) | 89.761° | 10:48 UT | 06:48 | 06:49 |
| Dhuhr | Solar transit +1 min (ISNA) | 0° | 16:47 UT | 12:47 | 12:48 |
| Asr | Shadow = noon shadow + 1× length (h = 27.65°) | 50.521° | 20:09 UT | 16:09 | 16:07 |
| Maghrib | Sunset (h₀ = −0.833°) | 89.761° | 22:46 UT | 18:46 | 18:45 |
| Isha | Sun 15° below the horizon, after transit | 108.556° | 00:01 UT | 20:01 | 20:00 |
The two columns agree to within about two minutes. The small differences are the refinement step: the simple formula uses the Sun's position at 0h UT, while adhan recomputes the declination and right ascension at the moment of each event (interpolating between yesterday, today and tomorrow) and then applies the method's fixed adjustments and rounding. A unit test in the project checks the agreement every build.
Calculation methods compared
Authorities differ mainly in the twilight angles chosen for Fajr and Isha, which come from different observations of when dawn begins and dusk ends. Our defaults: United Kingdom: Moonsighting Committee; United States: ISNA (North America); Canada: ISNA (North America); Australia: Muslim World League.
| Method | Fajr | Isha | Fixed adjustments |
|---|---|---|---|
| Muslim World League | 18° | 17° | Dhuhr +1 min |
| ISNA (North America) | 15° | 15° | Dhuhr +1 min |
| Moonsighting Committee | 18° with seasonal limit | 18° with seasonal limit | Dhuhr +5, Maghrib +3 min |
| Egyptian General Authority | 19.5° | 17.5° | Dhuhr +1 min |
| Karachi | 18° | 18° | Dhuhr +1 min |
| Umm al-Qura | 18.5° | 90 min after Maghrib | — |
| Dubai | 18.2° | 18.2° | Sunrise −3, Dhuhr/Asr/Maghrib +3 min |
| Kuwait | 18° | 17.5° | — |
| Qatar | 18° | 90 min after Maghrib | — |
| Singapore (MUIS) | 20° | 18° | Dhuhr +1 min, rounded up |
| Tehran | 17.7° | 14° | Maghrib at 4.5° |
| Diyanet (Turkey) | 18° | 17° | Sunrise −7, Dhuhr +5, Asr +4, Maghrib +7 min |
| UOIF (France) | 12° | 12° | — |
High latitudes
In summer at high latitudes the Sun never sinks 15–18° below the horizon, so the hour-angle equation for Fajr and Isha has no solution, or gives an impractical time. Every method therefore limits Fajr and Isha by a share of the night N, the time from sunset to the next sunrise:
- Seventh of the night, p = 1/7. We use this above 48° latitude.
- Middle of the night, p = 1/2. We use this below 48°, where it only matters in rare cases.
- Moonsighting Committee (the UK default) uses its own seasonal limit instead: a number of minutes before sunrise (Fajr) or after sunset (Isha) that depends on latitude and on the days since the winter solstice. For Fajr the limit moves linearly between four values,a = 75 + 28.65·|φ|/55, b = 75 + 19.44·|φ|/55, c = 75 + 32.74·|φ|/55 and d = 75 + 48.1·|φ|/55 minutes, over the seasons. Above 55° latitude it switches to one-seventh of the night.
London (51.5° N) on 21 June is the classic case: at 18° there would be no Fajr or Isha at all, but the seasonal limit gives valid times, which the site's tests check every build.
The qibla: spherical geometry
The qibla is the direction of the Kaaba in Makkah (21.4225° N, 39.8262° E) along the shortest path over the Earth's surface, a great circle. It is not the straight line on a flat map, which is why the qibla from North America points north-east rather than south-east.
Applying the four-part formula of spherical trigonometry to that triangle, with ΔL = LK − L:
London example (φ = 51.50853°, L = -0.12574°): ΔL = 39.9519°, numerator sin ΔL = 0.64214, denominator = -0.35581, so q = atan2(0.64214, -0.35581) = 118.99°, a little south of east (ESE). See the London qibla page.
The distance uses the haversine formula with Earth's mean radius R = 6,371 km:
For London, d = 4,794 km. The line drawn on our qibla maps is the same great circle, plotted by interpolating points along it with spherical linear interpolation. Phone compasses measure magnetic north; the qibla bearing is from true north, and most phones convert automatically.
The Hijri date
Hijri dates on this site use the Umm al-Qura calendar of Saudi Arabia, a calculated lunar calendar. Months begin based on the astronomical new moon and moonset, so local moon sighting can start a month a day later. That is why Ramadan and Eid dates here are marked "expected, subject to moon sighting".
Sources
- Jean Meeus, Astronomical Algorithms, 2nd edition, Willmann-Bell, 1998 (chapters 7, 12, 15, 22, 25).
- adhan-js: the open-source (MIT) library that computes every time on this site.
- Khalid Shaukat, Moonsighting Committee Worldwide: seasonal Fajr and Isha limits for high latitudes.
- City coordinates and time zones: GeoNames (CC BY 4.0); time-zone rules: IANA tz database.
Questions or corrections: awais.yousaf@iub.edu.pk. See also our About page and Disclaimer.
Quick answers
How is Fajr time calculated?
Fajr begins when the Sun is a fixed angle below the eastern horizon before sunrise: 15° for ISNA, 18° for the Muslim World League and Karachi, 18.5° for Umm al-Qura and 19.5° for the Egyptian method. The time is found by solving the hour-angle equation cos H = (sin h − sin φ sin δ) / (cos φ cos δ) for that angle.
How is Asr time calculated?
Asr begins when an object's shadow equals its noon shadow plus once its length (Standard: Shafi, Maliki, Hanbali) or twice its length (Hanafi). The Sun's altitude at that moment is arccot(k + tan|φ − δ|), with k = 1 or 2.
How is the qibla direction calculated?
The qibla is the initial great-circle bearing from your location to the Kaaba (21.4225° N, 39.8262° E): q = atan2(sin ΔL, cos φ · tan φK − sin φ · cos ΔL), measured clockwise from true north.