Skip to content
All projects

Article & application

Tawqit — the science of prayer times

An article on ʿilm al-mīqāt: how astronomy determines prayer times — and the app I built to implement it.

ʿilm al-mīqātAstronomieHeures de prièreFlutterMobile & web

Linking the sky to prayer: such is the aim of a discreet yet remarkably deep science. Determining prayer times sits at the crossroads of theology, geography and spherical astronomy. Known as ʿilm al-mīqāt or tawqīt, it is defined by scholars as "the knowledge of the rules and methods for arriving at the times of the obligatory prayers" (al-ʿAlamī, d. 1373 AH / 1953). While a single tap on an app is enough for today's believer, these times in fact rest on centuries of observation and mathematics.

Introduction. This first part surveys the discipline — its history, instruments, debates and challenges. The following chapters (I, II, …) develop each of these points in detail.

Sun positions and prayer times on the celestial dome Sun positions and prayer times on the celestial dome

The times are read off the Sun's course. Below the eastern horizon, Fajr (dawn, 18-18^\circ); at rising, sunrise; at the meridian crossing, Dhuhr; in the afternoon, Asr; at setting, Maghrib; then, below the western horizon, the end of twilight marks ʿIshāʾ (18-18^\circ). The whole science of tawqīt is turning these positions into clock times.

1. The Muwaqqitūn: astronomy in the service of worship

Within Muslim civilization, the measurement of liturgical time fell to the muwaqqitūn (sing. muwaqqit, "the one who fixes the time"). Unlike the astronomer who studies the heavens for their own sake, the muwaqqit puts astronomy at the service of religious ends — the very subject of tawqīt. The office became formalized chiefly in the Mamluk era (13ᵗʰ–14ᵗʰ century), often attached to a mosque — though this did not prevent some muwaqqits, such as Ibn al-Shāṭir in Damascus, from doing first-rate theoretical astronomy.

In the 9ᵗʰ–10ᵗʰ centuries the Muslim world was the nerve center of astronomy. Al-Battānī (d. 317 AH / 929), whose zīj (astronomical tables) is authoritative, is among the scholars who laid the markers of this science. It was in fact the Muslim astronomers — not the European observatories alone — who fixed the angular values (such as the famous 18° we will meet again), and it is from them that the Europeans took them. Their tools made it possible to convert the visual signs described by the Law into precise angular data.

2. The instruments of old

Before algorithms, scholars relied on a rich toolkit:

  • The astrolabe (al-asṭurlāb, الأسطرلاب) — the foremost instrument: it measures the altitude of celestial bodies and converts it into local time.
  • The sundial and gnomon (al-mizwala, al-miqyās; medieval planar dials were also called basīṭa) — essential for Ẓuhr and ʿAṣr, computed from the cast shadow.
  • The azyāj (sing. zīj) — true astronomical handbooks gathering tables of the positions of the heavenly bodies (Sun, Moon, planets), parameters and computation methods.

These instruments were also subject to legal scrutiny: the Maliki jurist al-Burzulī lists among the licit tools the ramliyyāt and the mijānāt — old terms rendered as sundials and astrolabes.

3. From the signs of the Law to the degrees of the sky

The heart of the scientific debate is the translation of the visual signs of the Sharīʿa into angles of depression of the Sun below the horizon. The dominant view of the ancients (mutaqaddimūn), observed from the 3ʳᵈ century AH (al-Nayrīzī, al-Battānī, Ibn al-Zarqālluh) and reported notably by al-Bīrūnī (d. 440 AH) and al-Ṭūsī (d. 672 AH), sets the Fajr at 18° below the horizon. For ʿIshāʾ, the muwaqqitūn proposed three main positions:

OpinionFajrEnd of twilight (ʿIshāʾ)
Ancients (mutaqaddimūn), symmetric18°white — 18°
al-Murrākuchī (d. 660 AH)20°red — 16°
Later scholars (mutaʾakhkhirūn)19°red — 17°

Note that 19° denotes the Fajr of the later scholars, not the whiteness of ʿIshāʾ: in the ancients' symmetric view, the whiteness (the Hanafi position) corresponds to 18°.

4. The physics at play: refraction and Tamkīn

The atmosphere acts as a lens: refraction makes the Sun appear above the horizon while it is physically below it (≈ 34′ at the horizon). This is why standard sunset is taken at a depression of

hsunset0.833=34refraction16solar semi-diameterh_{\text{sunset}} \approx -0.833^\circ = -\underbrace{34'}_{\text{refraction}} - \underbrace{16'}_{\text{solar semi-diameter}}

To absorb these gaps and the varying altitudes, the muwaqqitūn introduced Tamkīn (precautionary time) — e.g. ≈ 8 minutes for Fez (al-ʿAlamī).

5. Modern challenges: high latitudes and light pollution

Beyond roughly 48° N, in summer the Sun may never descend low enough (below 17°–19°): the signs of Fajr and ʿIshāʾ become unobservable, and one resorts to Takdīr (estimation: the nearest city, or division of the night). Moreover, since the 1970s, urban light pollution has masked the faintest signs — making the rigorous computations of the muwaqqitūn more valuable than ever.


I. The foundations of tawqīt: legal signs and expertise

To understand this discipline, one must first grasp the central figure of the muwaqqit and the nature of the visual signs he must interpret, before seeing why pure calculation is not enough — the role of Tamkīn.

1. The muwaqqit versus the modern astronomer

Physical astronomy and the science of tawqīt share the same mathematical tools but pursue different ends:

  • The astronomer studies the heavens for physical, chemical or cosmological reasons. He generally does not master the legal (sharʿī) meaning of the phenomena tied to prayer, since these matters are not taught in astronomy curricula.
  • The muwaqqit studies astronomy solely to apply it to religious ends. He has a twofold expertise: celestial mechanics and the legal definitions of the sacred texts. As prayer is a daily act, the muwaqqitūn tested these times constantly over the centuries.

2. The visual and legal signs

The whole computation aims to translate into clock times the precise light phenomena described by the Law.

The Fajr ṣādiq (true dawn). It marks the start of the morning prayer (Ṣubḥ) and of the fast. It is a horizontal whiteness spreading along the eastern horizon — a definition agreed by consensus (ijmāʿ) — that grows with time. It must not be confused with the Fajr kādhib (false dawn): a vertical, conical glow that appears before true dawn and then fades. Astronomers identify it with the zodiacal light (interplanetary dust scattering sunlight along the ecliptic), best seen at low latitudes — hence its easy observation in the Arabian Peninsula.

The Maghrib (sunset). It corresponds to the complete disappearance of the solar disk — upper limb included — below the visible horizon in the West.

The legal night, not the astronomical one. The legal night (sharʿī) extends from sunset to the appearance of the fajr ṣādiq (al-Nasafī, d. 710 AH) — to be distinguished from the astronomical night, between dusk at 18° and astronomical dawn at 18°. In classical jurisprudence, it is this legal night that serves to divide the night into portions (third, half) to set the end of the ʿIshāʾ time. (In practical computation and at high latitudes, other methods instead divide the astronomical night or the sunset → sunrise span — more on this later.)

3. Tamkīn (precautionary time)

The computation cannot be purely geometric. The astronomical time (ḥaqīqī, "real"), based on a perfect Earth and a theoretical horizon, must be corrected into legal time (sharʿī), the one matching what is actually perceptible to the eye. Three main factors widen the gap: atmospheric refraction (which makes the Sun appear higher than it is), the altitude of the observation site, and the radius of the solar disk.

To absorb these gaps and remove any doubt (shakk) about the true entry of the time, the muwaqqitūn add a safety margin, the Tamkīn. Al-ʿAlamī gives the example of Fez: about five minutes tied to altitude, plus three minutes "to remove any doubt", i.e. eight minutes — a delay he holds to be obligatory. It is this correction that takes us from the astronomer's ḥaqīqī time to the sharʿī time of the prayer calendar.


II. Celestial mechanics and computation data

To turn the visual signs — dawn, nightfall — into precise times, the modern muwaqqit relies on celestial mechanics: geographic coordinates, changing astronomical variables and spherical trigonometry.

1. The essential coordinates

Computing times at a point on the globe rests on three quantities:

  • Latitude φ\varphi — position north/south of the equator (the altitude of the celestial pole above the horizon equals the local latitude).
  • Longitude λ\lambda — needed to relate local time to the reference meridian (Greenwich).
  • Solar declination δ\delta — the angle of the Sun's rays with the equatorial plane. Owing to the tilt of the Earth's axis, it varies daily, oscillating between +2326+23^\circ 26' (summer solstice) and 2326-23^\circ 26' (winter solstice).
Solar declination over the year Solar declination over the year

The declination δ\delta varies almost sinusoidally over the year: zero at the equinoxes, maximal at the summer solstice (+23.44+23.44^\circ), minimal at the winter solstice (23.44-23.44^\circ). It governs the Sun's altitude and the length of the day.

What are ε\varepsilon and λ\lambda? The obliquity ε23.44\varepsilon \approx 23.44^\circ is the tilt of the Earth's rotation axis — the cause of the seasons. The ecliptic longitude λ\lambda locates the Sun on its orbit (hence the season): at λ=90\lambda = 90^\circ it climbs very high in the northern hemisphere (summer). The declination δ\delta tells which side of the equator the Sun lights — hence an earlier or later Fajr depending on the season.

Derivation. The Sun lies on the ecliptic: its unit position vector (r=1r = 1, ecliptic latitude β=0\beta = 0) is, in ecliptic coordinates,

re=[XeYeZe]=[rcosβcosλrcosβsinλrsinβ]   β=0, r=1   [cosλsinλ0]\mathbf{r}_e = \begin{bmatrix} X_e \\ Y_e \\ Z_e \end{bmatrix} = \begin{bmatrix} r\cos\beta\cos\lambda \\ r\cos\beta\sin\lambda \\ r\sin\beta \end{bmatrix} \;\xrightarrow{\ \beta=0,\ r=1\ }\; \begin{bmatrix} \cos\lambda \\ \sin\lambda \\ 0 \end{bmatrix}

We move to the equatorial frame by a rotation through the obliquity ε\varepsilon about the equinox axis (the xx axis):

req=Rx(ε)re,Rx(ε)=[1000cosεsinε0sinεcosε]\mathbf{r}_{eq} = R_x(\varepsilon)\,\mathbf{r}_e, \qquad R_x(\varepsilon) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos\varepsilon & -\sin\varepsilon \\ 0 & \sin\varepsilon & \cos\varepsilon \end{bmatrix}

which gives

req=[cosλcosεsinλsinεsinλ]\mathbf{r}_{eq} = \begin{bmatrix} \cos\lambda \\ \cos\varepsilon\,\sin\lambda \\ \sin\varepsilon\,\sin\lambda \end{bmatrix}

By definition of the declination, the third equatorial component is zeq=sinδz_{eq} = \sin\delta. Therefore

sinδ=sinεsinλ    δ=arcsin ⁣(sinεsinλ)\sin\delta = \sin\varepsilon\,\sin\lambda \;\Longrightarrow\; \delta = \arcsin\!\big(\sin\varepsilon\,\sin\lambda\big)

Near the equinoxes, λ360365(n81)\lambda \approx \tfrac{360^\circ}{365}(n-81), giving the usual approximation δ23.44sin ⁣(360365(n81))\delta \approx 23.44^\circ\,\sin\!\big(\tfrac{360^\circ}{365}(n-81)\big) — the sine curve plotted above.

2. Timekeeping and the equation of time

Our clocks do not exactly follow the Sun. We distinguish:

  • Apparent solar time — defined by the real position of the Sun; true solar noon is the instant the Sun crosses the meridian (its highest point).
  • Mean solar time — a fictitious time assuming perfectly uniform motion.
  • The equation of time EE — the gap (in minutes) between the two, due to the eccentricity of the orbit and the obliquity of the ecliptic. It corrects the passage from the real Sun to our clock time.
Equation of time over the year Equation of time over the year

The equation of time EE: the gap (in minutes) between true and mean solar noon, oscillating from about 14-14 to +16+16 min. Its two-humped shape results from combining the orbit's eccentricity and the obliquity of the ecliptic.

Formally, E=4(Lα)E = 4\,(L - \alpha) minutes. Here LL is the mean longitude of the Sun — its average position along its yearly path, corrected for aberration (where the Sun is actually seen, not where it "should" be) — and α\alpha is its right ascension, its position measured along the celestial equator, in a sense the "longitude" of the Sun on the celestial sphere. A classic approximation, with B=360365(n81)B = \tfrac{360^\circ}{365}(n - 81), reproduces the curve directly:

E9.87sin2B7.53cosB1.5sinB(min)E \approx 9.87\,\sin 2B - 7.53\,\cos B - 1.5\,\sin B \quad(\text{min})

the first two terms reflecting the obliquity, the last the eccentricity.

3. Spherical astronomy and the hour-angle formula

The engine of the computation is spherical trigonometry, applied to the astronomical triangle linking the celestial pole PP, the observer's zenith ZZ and the Sun SS.

Spherical triangle Pole–Zenith–Sun Spherical triangle Pole–Zenith–Sun

The astronomical triangle PZSPZS drawn on the celestial sphere. Its three sides are great-circle arcs; the angle at the pole PP is the hour angle HH we seek.

The three sides of this triangle are great-circle arcs whose lengths (in degrees) read off directly from the coordinates:

PZ^=90φ,PS^=90δ,ZS^=90h,\widehat{PZ} = 90^\circ - \varphi, \qquad \widehat{PS} = 90^\circ - \delta, \qquad \widehat{ZS} = 90^\circ - h,

where φ\varphi is the latitude, δ\delta the Sun's declination (§1) and hh its altitude above the horizon. The angle at vertex PP, between the meridian direction (PZPZ) and the Sun's direction (PSPS), is precisely the hour angle HH we are after.

The spherical law of cosines relates one side of a spherical triangle to the other two and the angle they enclose. Applied to side ZS^\widehat{ZS}, which is opposite vertex PP:

cosZS^=cosPZ^cosPS^+sinPZ^sinPS^cosH.\cos\widehat{ZS} = \cos\widehat{PZ}\,\cos\widehat{PS} + \sin\widehat{PZ}\,\sin\widehat{PS}\,\cos H.

Substituting the three arcs and using the identities cos(90x)=sinx\cos(90^\circ - x) = \sin x and sin(90x)=cosx\sin(90^\circ - x) = \cos x gives:

sinh=sinφsinδ+cosφcosδcosH.\sin h = \sin\varphi\,\sin\delta + \cos\varphi\,\cos\delta\,\cos H.

It only remains to isolate cosH\cos H to obtain the master formula, which gives the hour angle at which the Sun reaches a fixed altitude hh:

cosH=sinhsinφsinδcosφcosδH=arccos ⁣(sinhsinφsinδcosφcosδ)\cos H = \frac{\sin h - \sin\varphi\,\sin\delta}{\cos\varphi\,\cos\delta} \quad\Longrightarrow\quad H = \arccos\!\left(\frac{\sin h - \sin\varphi\,\sin\delta}{\cos\varphi\,\cos\delta}\right)

where hh is the Sun's altitude (negative below the horizon, for Fajr and ʿIshāʾ). One then converts HH to time at 15=115^\circ = 1 hour:

tprayer=tẒuhrH15( morning, + afternoon)t_{\text{prayer}} = t_{\text{Ẓuhr}} \mp \frac{H}{15} \qquad(-\ \text{morning},\ +\ \text{afternoon})

Ẓuhr is the simple case: the Sun is on the meridian (H=0H = 0), hence

tẒuhr=12+TZλ15E60t_{\text{Ẓuhr}} = 12 + \mathrm{TZ} - \frac{\lambda}{15} - \frac{E}{60}

(TZ = time-zone offset in hours, λ\lambda taken positive eastward, EE in minutes).

One then isolates the hour angle by H=arccos()H = \arccos(\cdot). But arccos\arccos is defined only on [1,1][-1, 1]: the formula has a solution only if its argument (sinhsinφsinδ)/(cosφcosδ)(\sin h - \sin\varphi\sin\delta)/(\cos\varphi\cos\delta) stays there. Beyond it, the Sun never reaches the target altitude hh — the prayer then has no computable time that day (the high-latitude case, treated in §5).

Function H = arccos and its domain Function H = arccos and its domain

The hour angle H=arccos()H = \arccos(\cdot) as a function of its argument: defined only on [1,1][-1, 1] (from 180180^\circ to 00^\circ). As soon as the argument leaves this band, there is no solution — the mathematical signature of polar days and nights.

4. How Tawqit computes it

The app applies these principles step by step. First the Sun's position at Julian Day JD\mathrm{JD}, via the low-precision formulas of the Astronomical Almanac (with n=JD2451545n = \mathrm{JD} - 2\,451\,545):

L=280.466+0.9856474n(mod360)(mean longitude)g=357.528+0.9856003n(mod360)(mean anomaly)λ=L+1.915sing+0.020sin2g,ε=23.44δ=arcsin(sinεsinλ),E=4(Lα)\begin{aligned} L &= 280.466 + 0.985\,647\,4\,n \pmod{360} && \text{(mean longitude)}\\ g &= 357.528 + 0.985\,600\,3\,n \pmod{360} && \text{(mean anomaly)}\\ \lambda &= L + 1.915\sin g + 0.020\sin 2g, \quad \varepsilon = 23.44^\circ\\ \delta &= \arcsin(\sin\varepsilon\,\sin\lambda), \quad E = 4\,(L - \alpha) \end{aligned}

with α=atan2(cosεsinλ, cosλ)\alpha = \operatorname{atan2}(\cos\varepsilon\sin\lambda,\ \cos\lambda). Each prayer then follows by feeding its altitude hh into the hour angle H(h)=arccos ⁣[(sinhsinφsinδ)/(cosφcosδ)]H(h) = \arccos\!\big[(\sin h - \sin\varphi\sin\delta)/(\cos\varphi\cos\delta)\big] and converting to time around solar noon. The six times each have an explicit formula:

Ẓuhr — the Sun crosses the meridian (H=0H = 0), the pivot of the day: tẒuhr=12+TZλ15E60.t_{\text{Ẓuhr}} = 12 + \mathrm{TZ} - \frac{\lambda}{15} - \frac{E}{60}.

Fajr — astronomical dawn, the Sun h=18h = -18^\circ below the horizon: tFajr=tẒuhrH(18)15.t_{\text{Fajr}} = t_{\text{Ẓuhr}} - \frac{H(-18^\circ)}{15}.

Shurūq (sunrise) — the first part of the Sun's upper limb appears at the visible horizon, h=h0h = h_0: tShuruˉq=tẒuhrH(h0)15.t_{\text{Shurūq}} = t_{\text{Ẓuhr}} - \frac{H(h_0)}{15}.

ʿAṣr — the altitude is set by the shadow length, t=1t = 1 (majority) or 22 (Hanafi): hʿAṣr=arccot ⁣(t+tanφδ),tʿAṣr=tẒuhr+H(hʿAṣr)15.h_{\text{ʿAṣr}} = \operatorname{arccot}\!\big(t + \tan|\varphi - \delta|\big),\qquad t_{\text{ʿAṣr}} = t_{\text{Ẓuhr}} + \frac{H(h_{\text{ʿAṣr}})}{15}.

Maghrib (sunset) — the whole disk disappears below the visible horizon, h=h0h = h_0, plus two precautionary minutes: tMaghrib=tẒuhr+H(h0)15+260.t_{\text{Maghrib}} = t_{\text{Ẓuhr}} + \frac{H(h_0)}{15} + \frac{2}{60}.

ʿIshāʾ — astronomical twilight, the Sun again at h=18h = -18^\circ: tʿIshaˉʾ=tẒuhr+H(18)15.t_{\text{ʿIshāʾ}} = t_{\text{Ẓuhr}} + \frac{H(-18^\circ)}{15}.

For sunrise and sunset, Tawqit does not stop at h=0h = 0: it refines the horizon to h00.833h_0 \approx -0.833^\circ by combining atmospheric refraction (from pressure and temperature), the solar semi-diameter, parallax and the horizon dip due to the site's altitude — the Tamkīn turned into equations. At very high latitudes, when the angle is never reached, the app switches to the Takdīr rules (nearest city, division of the night).

A full worked example: Makkah, 15 June 2025

Let us run the whole calculation for Makkah (φ=21.42\varphi = 21.42^\circ N, λ=39.83\lambda = 39.83^\circ E, UTC+3, altitude 300300 m).

1) Sun's position. The Julian Day at noon is JD=2460842\mathrm{JD} = 2\,460\,842, so n=JD2451545=9297n = \mathrm{JD} - 2\,451\,545 = 9297. The low-precision formulas give the mean longitude L=84.03L = 84.03^\circ, the anomaly g=160.65g = 160.65^\circ, hence the ecliptic longitude λ=84.65\lambda = 84.65^\circ, and then

δ=arcsin ⁣(sin23.44sin84.65)=23.33,E=0.58 min.\delta = \arcsin\!\big(\sin 23.44^\circ \cdot \sin 84.65^\circ\big) = 23.33^\circ, \qquad E = -0.58\ \text{min}.

2) Solar noon (Ẓuhr).

tẒuhr=12+339.83150.5860=12.35 h    12:21.t_{\text{Ẓuhr}} = 12 + 3 - \frac{39.83}{15} - \frac{-0.58}{60} = 12.35\ \text{h} \;\to\; 12\text{:}21.

3) The other prayers. Compute the hour angle H(h)H(h) for each altitude, then t=tẒuhrH/15t = t_{\text{Ẓuhr}} \mp H/15. For sunrise and sunset the corrected horizon combines refraction (R=0.54R = 0.54^\circ), semi-diameter (0.260.26^\circ) and horizon dip (D=0.61D = 0.61^\circ for 300300 m), i.e. h0=1.41h_0 = -1.41^\circ.

Prayeraltitude hHtime
Fajr−18°122.1°04:13
Shurūq−1.41°101.4°05:36
ẒuhrH = 012:21
ʿAṣr44.1°49.9°15:41
Maghrib−1.41°101.4°19:09
ʿIshāʾ−18°122.1°20:29

(ʿAṣr uses h=arccot(1+tanφδ)=44.1h = \operatorname{arccot}(1 + \tan|\varphi-\delta|) = 44.1^\circ, and Maghrib gets its two precautionary minutes.) These are one day's six times; repeated over the whole year, they give:

The six daily times over the year at Makkah The six daily times over the year at Makkah

The six times computed day by day at Makkah (UTC+3, no daylight saving). Dhuhr barely moves (equation of time); Fajr/sunrise and Maghrib/ʿIshāʾ drift from noon with the seasons, following the declination.

5. Polar days and polar nights

At high latitudes the Sun may never cross certain altitudes. In summer it does not descend to 1818^\circ below the horizon: astronomical dawn never comes — this is the polar day, and Fajr and ʿIshāʾ have no time. In winter, farther north, it may not rise at all: that is the polar night.

It all comes down to the sign of x=cosHx = \cos H (the argument from §3):

  • x<1x < -1 → polar day. The Sun stays always above the target altitude. At sunset (h0h \approx 0) this is the midnight Sun; for Fajr/ʿIshāʾ (h=18h = -18^\circ), it never sinks low enough for full darkness — the white nights.
  • x>1x > 1 → polar night. The Sun stays always below the target altitude. At sunrise (h0h \approx 0), it never crosses the horizon.

The thresholds (northern hemisphere): the Sun is circumpolar (always visible) if δ>90φ\delta > 90^\circ - \varphi, and never visible if δ<φ90\delta < \varphi - 90^\circ.

The same place may see both, depending on the season. At Tromsø (Norway, ~6969^\circ N), the Sun does not set from mid-May to late July (polar day), and does not rise from late November to mid-January (polar night). The higher the latitude, the longer the period with no computable Fajr — hence the recourse to Takdīr.

Fajr time by latitude Fajr time by latitude

Fajr time (1818^\circ) over the year, at fixed longitude, for several latitudes. At 4545^\circ N it stays continuous; but from ~5555^\circ N the curve breaks off in summer (no more Fajr), and this gap widens toward the north.


III. The debate over the degrees (Fajr and ʿIshāʾ)

The most delicate point of tawqīt is determining the exact depression angle of the Sun corresponding to dawn (Fajr) and the end of twilight (ʿIshāʾ). The texts describe colours — whiteness, redness; scholars had to translate them into astronomical degrees.

The depression angle is how far the Sun sinks below the horizon: 00^\circ at sunset, and larger as the Sun goes lower and the sky darkens. The deeper the angle, the further into the night. The whole debate is therefore about which angle matches the true sign — the whiteness of Fajr, the fading of the ʿIshāʾ twilight.

Solar depression angle: 12°, 15°, 18° Solar depression angle: 12°, 15°, 18°

The depression angle in the East (Fajr) and West (ʿIshāʾ). The true sign is at 1818^\circ (truly dark sky); at 1212^\circ and 1515^\circ the Sun is too close to the horizon — the sky is not yet dark, and these values are astronomically and legally unfounded (see §3).

1. The legacy of the mutaqaddimūn: unanimity on 18°

During the early centuries (until roughly the 7ᵗʰ century AH), a broad consensus formed among the great Muslim astronomers, the mutaqaddimūn. From al-Nayrīzī (d. 290 AH) to al-Bīrūnī (d. 440 AH), Ibn al-Zarqālluh (d. 493 AH) and al-Ṭūsī (d. 672 AH), all affirm, by observation (bi-r-raṣd), that Fajr begins — and the ʿIshāʾ twilight ends — when the Sun is at 18° below the horizon.

The criterion is optical: at 18°, the solar glow ceases to erase (at dawn) or finishes revealing (at dusk) the faintest stars visible to the naked eye — exactly coinciding with modern astronomical twilight. To claim, as some do today, that al-Bīrūnī adopted 15° or 17° is in fact false: his value is indeed 18°.

2. The turn of the mutaʾakhkhirūn: asymmetry (19° / 17°)

From the 8ᵗʰ century AH, later scholars (mutaʾakhkhirūn) questioned the perfect symmetry between dawn and dusk, differentiating the angles by the phenomenon sought:

  • 19° / 17° — true dawn (whiteness) would appear earlier, at 19°, while the fading of the redness of twilight — the start of ʿIshāʾ for most schools — would occur at 17°. This view is held by the school of the al-Māridīnīs, then clearly by the Ottoman Hanafi astronomer al-Galanbawī (d. 1205 AH).
  • 20° / 16° — Abū ʿAlī al-Murrākuchī (d. 660 AH) advocated an even sharper asymmetry.
  • The Hanafi view targets the disappearance of the whiteness (after the redness), hence a deeper angle for ʿIshāʾ (≈ 19° at Fajr, 17° at the redness, the whiteness being about 2° lower) — a convention long used in Turkey.

3. A survey of modern conventions — and their limits

Contemporary organizations use varied conventions, hence discrepancies of several minutes between calendars:

InstitutionFajrʿIshāʾ
Muslim World League (MWL)18°17°
Egyptian General Authority19.5°17.5°
Umm al-Qurā (Makkah)18.5°90 min after Maghrib
ISNA (North America)15°15°
UOIF (France)12°12°

Values close to those of the ancients (18°, and the 17°–19.5° range) remain faithful to observation. The shallower angles — 15° and especially 12° — are, however, contested.

The 15° (ISNA). It is not the fruit of rigorous observation but of an untrained eye under a polluted sky. An observation campaign in the UAE (2014-2017) is telling: inexperienced observers "first saw Fajr at 15°, then, as they trained, at 18° and 19°." As the source puts it: mastery of fiqh is not mastery of observation.

The 12° (UOIF, nautical twilight). It is more fragile still: nautical twilight is a navigation convention with no legal existence; choosing it is "no more founded than choosing 10°, 11°, 13° or 14°." Generalizing it over the whole year contradicts the explicit text (naṣṣ), since twilight does appear at 18° most of the year — including in France. And it does not even solve the high-latitude problem: above ~53° N (Newcastle, 54°), the Sun stays above −12° all night.

Astronomically, these shallow angles announce Fajr too late and ʿIshāʾ too early. This is why scholars urge following (taqlīd) a muwaqqit who is both expert and upright, whose verified (taḥqīqī) computation rests on the degrees established by the ancients — all the more so since the value of 18° is originally the work of Muslim astronomers, "from whom the Europeans took it."

4. Light pollution and the recourse to calculation

Since the 1970s, urban light pollution has made observing the faintest signs extremely difficult: an observer may believe the time has not entered when astronomically it has. Scholars liken this veil to that of clouds — situations where one returns to the computation of the muwaqqitūn, based on 18°.

There remains the prudence of fasting. For Fajr, two opposing requirements meet: the imsāk (ceasing to eat), which precaution requires to advance, and the prayer, which precaution requires to delay. Unable to be cautious on both at once, al-ʿAlamī concludes that one should advance the imsāk — stop when one is sure it is still night — and delay the prayer — pray when one is sure day has come.


IV. Atmospheric refraction

Beyond the depression angles, a physical correction applies to every horizon-related time: the Sun's light does not reach us in a straight line. This is atmospheric refraction.

1. Why the atmosphere bends light — a derivation

The atmosphere is a stratified fluid: under gravity, air is denser below than above. Since the refractive index nn grows with density, a ray plunging toward ever-denser layers bends toward the ground — so the body appears higher than it truly is.

1) The refraction invariant (Bouguer's theorem). Model the atmosphere as concentric spherical shells of index n(r)n(r) centered on the Earth. At each interface Snell's law n1sini1=n2sini2n_1\sin i_1 = n_2\sin i_2 holds; combined with the geometric relation between shells (law of sines in the ray–center triangle), it yields an invariant along the ray:

n(r)rsinz=constn(r)\, r\, \sin z = \text{const}

where zz is the zenith distance (angle to the local vertical) and rr the distance to the Earth's center — the spherical analogue of the plane-stratified invariant nsinzn\sin z.

2) The refraction angle. Differentiating the invariant and integrating along the path, the total angular gap between true and apparent direction is

R=groundtanz  dnn.R = -\int_{\text{ground}}^{\infty} \tan z \;\frac{\mathrm{d}n}{n}.

Since nn stays very close to 11 (n013×104n_0 - 1 \sim 3\times10^{-4}), dn/ndn\mathrm{d}n/n \approx \mathrm{d}n; for an atmosphere thin compared to the Earth's radius (near-plane layers), zz varies little and

R(n01)tanz,R \approx (n_0 - 1)\,\tan z,

where n0n_0 is the index at the ground — Laplace's tanz\tan z law.

3) The link with fluid mechanics. Two relations close the problem:

  • Gladstone-Dale ties index to density: n1=kρn - 1 = k\,\rho (k2.3×104 m3kg1k \approx 2.3\times10^{-4}\ \mathrm{m^3\,kg^{-1}} for air);
  • air, an ideal gas in hydrostatic equilibrium, has at the ground ρ0=PRsT\rho_0 = \dfrac{P}{R_s\,T} (PP pressure, TT absolute temperature, RsR_s the specific gas constant of air).

Combining:

Rkρ0tanz=kRsPTtanz.R \approx k\,\rho_0\,\tan z = \frac{k}{R_s}\,\frac{P}{T}\,\tan z.

Refraction is therefore proportional to P/TP/T: cold, dense air refracts more than warm, rarefied air. This is exactly the factor found in Tawqit, where the horizon value (z90z \to 90^\circ: the tanz\tan z law diverges and spherical geometry caps RR at ~3434') reads

R0.569×0.28PT+273R \approx 0.569^\circ \times \frac{0.28\,P}{T + 273}

(PP in hPa, TT in °C), to which the horizon dip D=0.0353haltD = 0.0353\,\sqrt{h_{\text{alt}}} (from the site's altitude, in metres) is added.

Concretely, refraction at the horizon ranges from ~2929' (warm, rarefied air) to ~3939' (cold, dense anticyclonic air):

Sensitivity of refraction to temperature and pressure Sensitivity of refraction to temperature and pressure

Horizon refraction RR versus temperature, for three pressures. It decreases as 1/(T+273)1/(T+273) and grows with PP — the signature of the P/TP/T factor. The marked point is the standard condition (10131013 hPa, 1515 °C, i.e. ~3434').

2. The effect at the horizon

Refraction is maximal at the horizon (~3434') and decreases very quickly with the Sun's altitude:

Refraction versus the Sun's altitude Refraction versus the Sun's altitude

Refraction RR versus the Sun's true altitude (Bennett's formula, 1982). At the horizon (h0h \approx 0) it reaches ~3434'; at the Asr altitude (13133333^\circ) it drops to 1144'.

This is why "legal" sunset is not taken at the geometric center (h=0h = 0) but at

h0.833=34refraction16semi-diameterh \approx -0.833^\circ = -\underbrace{34'}_{\text{refraction}} - \underbrace{16'}_{\text{semi-diameter}}

— ensuring Maghrib is announced only after the disk has physically and fully disappeared.

3. A very uneven impact across prayers

The decisive factor is the Sun's altitude. By varying the site's elevation (from 00 to 80008000 m, pressure and temperature fixed), we can measure its effect — through the horizon dip D=0.0353haltD = 0.0353\sqrt{h_{\text{alt}}} — on each time over the year, at Roubaix (50.750.7^\circ N):

Effect of refraction on Maghrib Effect of refraction on Maghrib Effect of refraction on sunrise Effect of refraction on sunrise Effect of refraction on Asr Effect of refraction on Asr

Time for five site elevations (00 to 80008000 m). The higher you stand, the lower the horizon drops: Maghrib is delayed and Shurūq advanced by several minutes in the mountains. ʿAṣr, set by the shadow and not by the horizon, is nearly insensitive: at the hour scale the curves coincide, so we plot the delay (in seconds) that refraction imposes on it — i.e. how far the real ʿAṣr falls after the purely geometric one (third graph). This delay reaches ~3030 s at sea level in winter and shrinks with altitude (less pressure → less refraction), as it does in summer.

  • Maghrib & Shurūq — the Sun grazes the horizon: the site's elevation lowers the horizon and shifts the time by several minutesMaghrib delayed, sunrise advanced, more so the higher you go.
  • ʿAṣr — its time is set by the shadow length, not by the horizon: refraction delays it by at most a few tens of seconds (third graph), and that delay shrinks with altitude — negligible in practice.
  • Fajr & ʿIshāʾ — defined by a chosen depression angle (1818^\circ, etc.), they already implicitly fold in the observation conditions.

A dedicated study (Özlem, 2016) does nonetheless propose a refraction correction for ʿAṣr. The shadow is cast by the apparent Sun (raised by refraction), hence shorter than that of the true Sun. One corrects by computing the angle in the apparent frame, then converting back to the true altitude:

Z=90φδ(true noon altitude)Z=Z+0.017cot ⁣(Z+10.3Z+5.11)(apparent, Sæmundsson)A=arccot ⁣(cotZ+t)(apparent ʿAṣr angle)C=A160cot ⁣(A+7.31A+4.4)(corrected true angle, Bennett)\begin{aligned} Z &= 90^\circ - |\varphi - \delta| && \text{(true noon altitude)}\\ Z' &= Z + 0.017\,\cot\!\Big(Z + \tfrac{10.3^\circ}{Z + 5.11^\circ}\Big) && \text{(apparent, Sæmundsson)}\\ A' &= \operatorname{arccot}\!\big(\cot Z' + t\big) && \text{(apparent ʿAṣr angle)}\\ C &= A' - \tfrac{1}{60}\cot\!\Big(A' + \tfrac{7.31^\circ}{A' + 4.4^\circ}\Big) && \text{(corrected true angle, Bennett)} \end{aligned}

The corrected angle CC is then fed into the hour-angle formula in place of hʿAṣrh_{\text{ʿAṣr}}. Since the apparent shadow is shorter, the true ʿAṣr angle is slightly smaller and the prayer falls a little later. The drift stays of order a few seconds (≈ 30304545 s at 5050^\circ in winter, 1122 min near 6060^\circ) — hence its omission from most calculations.

In short, refraction is decisive at the horizon (Maghrib, Shurūq) and marginal high up (ʿAṣr, a few seconds).


The Tawqit app

It is within this legacy that Tawqit, the mobile and web app I built, takes its place. Rather than relying on pre-computed tables, it computes the Sun's position in real time — declination, equation of time, hour angle — to determine prayer times anywhere on Earth, from latitude, longitude and the chosen depression angle for Fajr and ʿIshāʾ. It offers several calculation conventions, an adjustable Tamkīn and manual corrections — reproducing, in code, the work of the muwaqqitūn: translating the signs of the sky into times.

Available on the App Store and Google Play (links at the bottom of the page).

References

  • "The use of degrees according to the scholars of tawqīt" (L'utilisation des degrés selon les savants du tawqīt) — the reference synthesis of the muwaqqitūn's views on the Fajr and ʿIshāʾ degrees (main source of this article).
  • Al-Bīrūnī, al-Qānūn al-Masʿūdī.
  • Naṣīr al-Dīn al-Ṭūsī, treatises on spherical astronomy.
  • Al-Nasafī, Kanz al-Daqāʾiq (definitions of sunset and legal night).
  • Al-ʿAlamī, Ḥāshiya ʿalā sharḥ al-Fashtālī (on Tamkīn).
  • Al-Burzulī, Jāmiʿ masāʾil al-aḥkām (instruments of mīqāt).
  • S. Acaroğlu, The Calculation of Islamic Prayer Times, PhD thesis, Humboldt-Universität zu Berlin.
  • Definition & Calculation of Prayer Timings (refraction and dawn signs).
  • Prayer Times Calculation (prayer-time calculation conventions).
  • G. G. Bennett, "The Calculation of Astronomical Refraction in Marine Navigation", Journal of Navigation, 35 (1982).
  • A. Özlem, "Impact of Atmospheric Refraction on Asr Time" (2016) — refraction correction for ʿAṣr.
  • J. Meeus, Astronomical Algorithms, Willmann-Bell, 1998.
  • W. M. Smart, Textbook on Spherical Astronomy, Cambridge University Press.