The short version
- It all starts with the Sun. Knowing where you are and the date, we can work out exactly where the Sun will be in your sky at any moment. Its path shifts a little every day with the seasons.
- Each prayer is a moment on that path. Fajr when the Sun is still a set angle below the horizon and dawn appears; Dhuhr just after it passes its highest point; Asr when a shadow reaches a set length; Maghrib when it sets; Isha when it is deep enough below the horizon for dusk to end.
- Why two timetables can differ. Scholars chose slightly different angles for dawn and dusk (from 15° to 19.5° below the horizon), and some add a few minutes for caution. So Fajr and Isha can differ by 10–20 minutes between methods, and both can be right. Follow the one your community uses.
- Asr has two views. Standard (Shafi, Maliki, Hanbali): a shadow as long as the object. Hanafi: twice as long, so Hanafi Asr is always later. We show both.
- Far north in summer, the sky may never get fully dark, so we use a fair share of the night instead.
- The qibla follows the shortest path over the globe to the Kaaba, the way a plane would fly.
- The new crescent: we predict how high and how wide it will be after sunset, and compare that with hundreds of recorded sightings to say whether it will be easy to see, need binoculars, or not be visible.
If you only wanted the idea, you can stop here. The rest of the page is the full working, step by step.
What each prayer time means
Each prayer time is a moment in the Sun's daily journey across your sky. To find those moments for any place we need just three things: how far north or south you are (your latitude φ), how far north or south of the equator the Sun is overhead today (its declination δ, which changes with the seasons), and how far the Earth has turned since the Sun was at its highest (the hour angle H, 15° for every hour).
| 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 |
Why −0.833° and not 0°? Two small effects. The air bends sunlight, so we see the Sun about 34′ before it has really cleared the horizon; and sunrise counts from the Sun's top edge, which is 16′ above its centre. Together that makes 50′, or 0.833°.
Step 1: where the Sun is today
In plain words: first we find where the Sun sits in the sky today. The method comes from Jean Meeus, Astronomical Algorithms (2nd ed., 1998), the standard book on the subject, which the adhan library behind this site follows. It starts by counting days on one 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 | 2461358.5 |
| Julian centuries since J2000 | T | 0.26867899 |
| Mean longitude | L₀ | 233.1168° |
| Mean anomaly | M | 309.7175° |
| Equation of the centre | C | -1.4915° |
| Apparent longitude | λ | 231.6224° |
| Obliquity of the ecliptic | ε | 23.4379° |
| Declination | δ | -18.1686° |
| Right ascension | α | 229.2001° |
| Apparent sidereal time at 0h UT | Θ₀ | 53.1132° |
Step 2: solar noon and Dhuhr
In plain words: Dhuhr starts just after the Sun passes its highest point in your sky, called solar noon. It depends on how far east or west you are, not on your watch, which is why solar noon is rarely exactly 12:00. Formally, 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:40 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: one equation for most times
In plain words: this one equation answers the question “at what time will the Sun be at this height?”. Give it the angle for dawn and it returns Fajr; give it the angle for sunset and it returns Maghrib. It comes from the triangle formed in the sky by the celestial pole, the point straight above you and the Sun, which links the Sun's altitude h to latitude, declination and hour angle:
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
In plain words: picture a stick standing in the ground. At midday its shadow is at its shortest. Asr begins once that shadow has grown by the stick's own length (Standard) or by twice its length (Hanafi). In numbers: 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 s means 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 = 20.63° for Standard and 15.30° for Hanafi.
Step 5: from angles to your clock
In plain words: the maths gives world time (UT), and we turn it into your local clock time,
summer time included. 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−5, so transit at 16:40 UT is 11:40 local time.
Worked example: New York today
Here is everything above applied to one real place, recalculated every day. Saturday, 14 November 2026, latitude φ = 40.71427°, longitude -74.00597°, ISNA method (Fajr and Isha at 15°), Standard Asr, declination δ = -18.169°. 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 | 94.414° | 10:23 UT | 05:22 | 05:23 |
| Sunrise | Upper limb on the horizon (h₀ = −0.833°) | 74.798° | 11:41 UT | 06:41 | 06:42 |
| Dhuhr | Solar transit +1 min (ISNA) | 0° | 16:40 UT | 11:40 | 11:41 |
| Asr | Shadow = noon shadow + 1× length (h = 20.63°) | 39.504° | 19:18 UT | 14:18 | 14:17 |
| Maghrib | Sunset (h₀ = −0.833°) | 74.798° | 21:40 UT | 16:39 | 16:39 |
| Isha | Sun 15° below the horizon, after transit | 94.414° | 22:58 UT | 17:58 | 17:57 |
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.
Why timetables differ: the methods compared
Timetables differ mostly because scholars and authorities chose different angles for dawn and dusk, each based on their own careful observations of the sky. A difference of a few degrees moves Fajr or Isha by 10–20 minutes. None of these is “wrong”: follow the one your mosque or community uses. Our defaults: United Kingdom: Moonsighting Committee; United States: ISNA (North America); Canada: ISNA (North America); Australia: Muslim World League; France: UOIF (France, 12°); Belgium: Muslim World League; Netherlands: Muslim World League; Germany: Diyanet (Turkey); Austria: Diyanet (Turkey); Switzerland: Muslim World League; Sweden: Muslim World League; Denmark: Muslim World League; Norway: Muslim World League; Finland: Muslim World League; Ireland: Muslim World League; Spain: Muslim World League; Italy: Muslim World League; Turkey: Diyanet İşleri Başkanlığı method (Turkey); United Arab Emirates: Dubai; Saudi Arabia: Umm al-Qura, Makkah; Qatar: Qatar; Kuwait: Kuwait; Bahrain: Umm al-Qura, Makkah; Oman: Muslim World League; Pakistan: University of Islamic Sciences, Karachi; India: University of Islamic Sciences, Karachi; Bangladesh: University of Islamic Sciences, Karachi; Indonesia: Kemenag (Indonesia); Malaysia: JAKIM zone method (Malaysia); Egypt: Egyptian General Authority; Morocco: Ministry of Habous (Morocco); Nigeria: Muslim World League; South Africa: 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), adhan version | 18° | 17° | Sunrise −7, Dhuhr +5, Asr +4, Maghrib +7 min (used in Germany and Austria) |
| Diyanet official timetable (Turkey) | 18° (İmsak) | 17° (Yatsı) | Same temkin, with the Sun’s position taken at 0h UT as in Diyanet’s tables (used in Turkey) |
| UOIF (France) | 12° | 12° | — |
Turkey: matching Diyanet’s official timetable
Turkish users compare every site with the timetable of the Presidency of Religious Affairs (Diyanet İşleri Başkanlığı). Diyanet works out İmsak (the start of the fast, equal to Fajr here) at 18° and Yatsı (Isha) at 17°, and then adds fixed temkin minutes as a precaution: Güneş (sunrise) −7, Öğle (Dhuhr) +5, İkindi (Asr) +4, Akşam (Maghrib) +7. Its İkindi uses the Standard (one shadow length) Asr.
Our first version used these numbers with adhan’s normal calculation, and it was one or two minutes off Diyanet’s published times for İkindi, Akşam and Yatsı on most days. Comparing all of 2027 for eight cities (Istanbul, Ankara, İzmir, Erzurum, Van, Trabzon, Gaziantep, Edirne) showed why: Diyanet’s tables take the Sun’s position once, at 0h UT of the date, instead of recomputing it for each event. With that one change every prayer is within a minute of Diyanet’s table and about 93 % of the minutes are identical; where we are a minute off, Diyanet’s reference coordinates for a town differ slightly from ours. The comparison runs as a unit test on every build.
Places far from the equator
In plain words: in summer, far north, the sky never gets fully dark, so “the Sun 18° below the horizon” simply never happens, and the equation of Step 3 has no answer for Fajr and Isha (or an impractical one). 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: the shortest path to the Kaaba
In plain words: the qibla follows the shortest path over the globe to the Kaaba in Makkah (21.4225° N, 39.8262° E), the way a plane would fly. That path is a “great circle”, and on a flat map it looks curved, which is why from North America the qibla 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 qibla finder set to London.
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, while the qibla bearing is from true north. The angle between the two (the magnetic declination) is under 3° in Pakistan and the Gulf but reaches about 13° in Sydney and 15° in Seattle, so our compass and Moon camera add it for your position from the World Magnetic Model 2025 (NOAA / British Geological Survey).
The new crescent: will it be seen?
In plain words: an Islamic month begins when the thin new crescent (hilal) is seen just after sunset. Whether it can be seen depends on how high the Moon stands above the setting Sun and how wide and bright the crescent is. We calculate both, and compare them with recorded sightings to say whether it will be easy to see, need binoculars, or not be visible at all. The same astronomy as for the Sun applies, with three extra ingredients: the Moon's far more complicated orbit, its parallax (it is close enough that your position on the Earth shifts it), and a visibility criterion fitted to real observations. Our moon sighting tool uses exactly the steps below.
1. Where the Moon is
The Moon's orbit is disturbed by the Sun so strongly that its longitude needs hundreds of periodic terms. They are all functions of four angles that grow steadily with the time T from Step 1 (Meeus, chapter 47): the Moon's mean longitude L′, its mean elongation from the Sun D, its mean anomaly M′ and its argument of latitude F:
The largest terms give the Moon's ecliptic longitude λ☾ and latitude β☾ to within a few tenths of a degree (M is the Sun's mean anomaly from Step 1):
The 1.274° term (the evection) and the 0.658° term (the variation) are the Sun's pull on the Moon, known since Ptolemy and Tycho Brahe. We do not stop at the leading terms: the site uses Astronomy Engine, which evaluates the full series of the Improved Lunar Ephemeris (derived from E. W. Brown's lunar theory) and is accurate to about one arc-minute. Latitude and longitude are then turned into right ascension and declination with the same rotation by the obliquity ε as the Sun in Step 1, and into altitude h and azimuth A with the hour-angle equation of Step 3.
2. New moon, age and phase
The new moon (conjunction) is the instant when the Moon and the Sun have the same ecliptic longitude. It has no closed form; it is found numerically, by searching for the root of
The Moon's age is the time since that instant. The angle between Sun and Moon seen from the Earth, the elongation ψ, and the lit fraction of the disc k follow from spherical trigonometry (Meeus, chapter 48; the phase angle i ≈ 180° − ψ):
Right now the Moon is 24.5% lit and 5.38 days old. Because the Moon's latitude β can reach ±5°, the Moon usually passes just above or below the Sun at new moon, and only rarely in front of it (a solar eclipse).
3. Parallax: the Moon seen from your place
The Sun is so far away that it looks the same from anywhere on the Earth. The Moon, at about 384,000 km, does not: seen from your place rather than from the Earth's centre, it sits lower in the sky by up to its horizontal parallax π, about 0.95°, almost two Moon diameters. Its apparent size, the semi-diameter SD, also depends on its distance Δ:
(R⊕ = 6,378 km, R☾ = 1,737 km.) We apply parallax exactly, by computing the Moon's direction from the observer's own position (topocentric coordinates). Sunset uses the Sun's upper limb with refraction (h₀ = −0.833°, as for Maghrib); moonset uses the Moon's upper limb with refraction and parallax, h₀ = 0.7275π − 0.567° (Meeus, chapter 15). The difference is the lag, the time the Moon stays up after the Sun.
4. The crescent at the best time
B. D. Yallop of HM Nautical Almanac Office (1997) showed from F. Bruin's model of the twilight sky that the crescent is best seen at the best time, 4/9 of the lag after sunset: late enough for the sky to darken, early enough for the Moon to still be well above the horizon.
At Tb we compute three angles between the Moon and the Sun as seen by the observer, without refraction: the arc of vision ARCV (difference in altitude), the relative azimuth DAZ, and the arc of light ARCL (their angular distance), linked by the cosine rule of spherical trigonometry:
The crescent's width W, in arc-minutes, is the Moon's diameter minus the dark part: the terminator is an ellipse whose half-width is SD cos ARCL, so
A thin crescent needs a darker sky, so it must stand higher above the Sun. Yallop expressed the minimum ARCV for a crescent of width W as a cubic in W, and measures every case against it in units of ten degrees. He calibrated the result on a standard list of recorded first sightings, and failed attempts, compiled by B. E. Schaefer and by L. E. Doggett and Schaefer:
A positive q means the crescent is higher than it needs to be. If the Moon sets before the Sun, or the new moon happens after sunset, there is nothing to see and no q is computed. The value of q places the crescent in a zone. Yallop's original limits are in the first column; we use limits re-calibrated by Khalid Shaukat against observation reports collected by moonsighting.com, which show the crescent being seen somewhat earlier than Yallop's 1997 limits suggest:
| Zone | Meaning | Yallop (1997) | Calibrated (used) |
|---|---|---|---|
| A | Easily visible by eye | q > 0.216 | q ≥ 0.1716 |
| B | Visible by eye in perfect conditions | q > -0.014 | q ≥ -0.1388 |
| C | Optical aid needed to find it, then maybe by eye | q > -0.16 | q ≥ -0.3456 |
| D | Visible with a telescope only | q > -0.232 | q ≥ -0.5816 |
| – | Not visible | below | below |
5. From zones to a map and a month
Repeating the calculation for every 2° square of the Earth at its own local sunset gives the world map on the moon sighting page, about 11,700 squares per evening. The pattern is always a curved band moving west: the further west you are, the later your sunset, the older and higher the Moon, so the Americas often see the crescent an evening before Asia. Your own zone is calculated in your browser for your exact coordinates.
For the start of the month we use one reference place, Najaf (32° N, 44.33° E): the month begins the day after the first evening on which q ≥ −0.30 there, meaning the crescent can be sighted (by eye, or found with optical aid and then seen). This is a calculation. The actual start of a month is decided by a real sighting and your local authority, so it can be a day later.
Worked example: the coming month's new moon is at 00:52 UT on Wed, 9 Dec 2026. These are the calculated values at Najaf for three evenings:
| Evening | Sunset | Moonset | Lag | Best time | Age | ARCV | DAZ | ARCL | SD | W | q | Zone |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Wed, 9 Dec 2026 | 13:58 UT | 14:03 UT | 5 min | 14:00 UT | 13.1 h | 0.92° | 7.16° | 7.21° | 14.73′ | 0.117′ | −1.019 | not visible |
| Thu, 10 Dec 2026 | 13:58 UT | 14:56 UT | 58 min | 14:24 UT | 37.1 h | 10.41° | 13.26° | 16.85° | 14.70′ | 0.631′ | 0.230 | A: easily visible by eye |
| Fri, 11 Dec 2026 | 13:58 UT | 15:52 UT | 114 min | 14:49 UT | 61.1 h | 20.54° | 18.37° | 27.49° | 14.70′ | 1.660′ | 1.765 | A: easily visible by eye |
Calculated evening: Thu, 10 Dec 2026; the month begins on Fri, 11 Dec 2026. Times are UT; Najaf is UT+3.
6. How we check it
We compare our results with the moonsighting.com-calibrated data published by TheShia.org for 1446–1450 AH. Over the 42 months it calculates, our month start agreed 41 times, and the new moon within 1.8 minutes. On 336,960 map squares the verdict "visible by eye or not" agreed in 98.82%, the exact zone in 96.88% and to within one zone in 99.3%; the q values of ten cities differ by 0.042 on average (RMS). The remaining differences sit on zone boundaries, where a few hundredths in q change the zone.
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". The crescent calculation above shows when a sighting-based month is likely to begin.
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, and the calibration of crescent visibility against moonsighting.com reports.
- B. D. Yallop, A Method for Predicting the First Sighting of the New Crescent Moon, NAO Technical Note 69, HM Nautical Almanac Office, 1997.
- Astronomy Engine (MIT): the Moon's position (Improved Lunar Ephemeris, after Montenbruck and Pfleger, Astronomy on the Personal Computer), new moons, moonrise and moonset.
- 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 with the first light of dawn, while the Sun is still below the eastern horizon. Each method fixes how far below: 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 then found from the hour-angle equation cos H = (sin h − sin φ sin δ) / (cos φ cos δ).
How is Asr time calculated?
Asr begins when shadows have grown long: an object's shadow equals its midday shadow plus once its own length (Standard: Shafi, Maliki, Hanbali) or twice its length (Hanafi), so Hanafi Asr is always later. In numbers, the Sun's height at that moment is arccot(k + tan|φ − δ|), with k = 1 or 2.
How is the visibility of the new crescent (hilal) calculated?
We look at the moment the crescent is easiest to see, a little after sunset (sunset plus 4/9 of the time until moonset). There we work out how high the Moon stands above the Sun (ARCV) and how wide the crescent is (W). Yallop's test value q = (ARCV − (11.8371 − 6.3226W + 0.7319W² − 0.1018W³)) / 10 then says whether it is easily visible, visible in perfect conditions, needs binoculars or a telescope, or cannot be seen.
How is the qibla direction calculated?
The qibla is the direction of the shortest path over the globe from where you are to the Kaaba (21.4225° N, 39.8262° E), measured clockwise from true north: q = atan2(sin ΔL, cos φ · tan φK − sin φ · cos ΔL).