Islamic prayer times are defined by the position of the sun relative to the observer's horizon. Given your latitude, longitude and the date, each prayer corresponds to a specific solar geometry problem that astronomy can solve to within a minute. NextSalahClock performs these calculations with the open-source Adhan JS engine (by batoulapps), using your city's coordinates and official IANA timezone.
The anchor: solar noon (Dhuhr)
Dhuhr begins when the sun passes its highest point for the day, the meridian transit or true solar noon. This is computed from the equation of time and your longitude relative to your timezone's reference meridian. Because the classical opinion holds that prayer begins only after the sun has started to decline (zawal), many authorities additionally publish Dhuhr with a small safety margin after exact transit.
Sunrise and Maghrib
Sunrise and sunset occur when the upper limb of the sun appears at the horizon. Because the atmosphere bends light, the sun is refracted upward, so calculations use a depression angle of 0.833° below the horizon (0.583° refraction + the sun's ~0.25° radius). Maghrib begins at sunset by near-universal agreement; the Tehran convention adds a further 4.5° depression for extra caution.
Fajr and Isha: twilight angles
Fajr (true dawn) begins when the first light of morning twilight appears, when the sun is a defined number of degrees below the horizon. Isha begins when twilight fully disappears. The angle each method uses is the main difference between calculation conventions:
| Method | Fajr angle | Isha |
|---|---|---|
| Muslim World League | 18° | 17° |
| ISNA (North America) | 15° | 15° |
| Egyptian General Authority | 19.5° | 17.5° |
| Umm al-Qura (Makkah) | 18.5° | 90 min after Maghrib (120 min in Ramadan) |
| Karachi (Univ. of Islamic Sciences) | 18° | 18° |
| Moonsighting Committee Worldwide | 18° | 18° + seasonal twilight adjustment |
| Dubai (UAE) | 18.2° | 18.2° |
| Kuwait | 18° | 17.5° |
| Qatar | 18° | 90 min after Maghrib |
| MUIS (Singapore) | 20° | 18° |
| Institute of Geophysics (Tehran) | 17.7° | 14° |
| Diyanet (Türkiye) | 18° | 17° |
None of these is objectively “more correct” than another. They are scholarly and regional conventions for interpreting twilight. The right choice is the one your local mosque or national authority follows, which is why NextSalahClock defaults per country and lets you change the method in Settings.
Asr: the shadow factor
Asr begins when the length of an object's shadow reaches its factor of the object's height (plus the shadow length it had at solar noon). The Standard opinion (Shafi'i, Maliki, Hanbali) uses a factor of 1; the Hanafi school uses a factor of 2, which is why Hanafi Asr begins noticeably later. Both are supported everywhere on NextSalahClock.
High latitudes: when twilight never comes
In places like Scandinavia, Iceland or Alaska, the summer sun may never descend 17–18° below the horizon, so textbook Fajr and Isha do not occur. Invalid angles are never guessed on NextSalahClock; instead a high-latitude rule is applied:
- Middle of the Night: Fajr at the midpoint between sunset and the next day's sunrise; Isha likewise.
- One-Seventh of the Night: the night is divided into seven portions; commonly paired with the Karachi method and recommended above ~48°.
- Twilight Angle: uses a proportional fraction of the defined twilight angle across the night.
NextSalahClock automatically applies the latitude-recommended rule (you can override it). Inside the polar circles there are days with no sunrise at all; the engine then falls back to the nearest solvable day (Aqrab al-Ayyam / Aqrab al-Bilad resolution) and the interface clearly marks such estimates.
Timezones, DST and the countdown
Every city page computes against the city's own IANA timezone (for example Europe/London), so daylight-saving changes are handled by the official IANA tz database, including the tricky weeks when Ramadan observance and a clock change coincide. The countdown works from absolute timestamps rather than by subtracting one second per tick, so it stays exactly correct after your laptop sleeps, your tab is backgrounded, or your device changes timezones.
Hijri dates
Hijri dates shown on NextSalahClock use the Umm al-Qura algorithmic calendar as implemented by the Unicode ICU/CLDR standard. Religious observances that depend on physical moon sighting (Ramadan, the two Eids) may be declared a day earlier or later by your local authority. Predicted dates are always labelled as such.
Verification and honesty
Our engine is validated against officially published timetables (for example, UAE times match the Dubai authority's published schedule). Where the sun's geometry genuinely cannot produce a value, NextSalahClock shows an explicit explanation instead of inventing a number. Read the calculation disclaimer for the full picture, and always follow your local mosque for congregational (iqamah) times.