Home › Guides › How prayer times are calculated
How prayer times are calculated
Prayer times are astronomy plus a few definitions. Given your latitude, longitude, date and time zone, the sun's position fixes every time.
The five inputs
- Location: latitude and longitude, to the nearest few kilometres.
- Date and time zone: the same sun position is reported in your local clock time.
- Fajr and Isha angles: how far below the horizon the sun is at the start of Fajr and the start of Isha.
- Asr school: Shafi or Hanafi shadow length.
- High-latitude rule: a fallback when twilight does not end.
From the sun to each prayer
| Prayer | Defined by |
|---|---|
| Fajr | Sun reaches the Fajr angle below the horizon before sunrise (true dawn) |
| Sunrise | Upper edge of the sun at the horizon, with atmospheric refraction |
| Dhuhr | Solar noon: the sun crosses the meridian and begins to decline |
| Asr | Shadow length reaches one (Shafi) or two (Hanafi) times the object plus the noon shadow |
| Maghrib | Sunset (most methods) or a small angle below the horizon (for example Tehran) |
| Isha | Sun reaches the Isha angle below the horizon after sunset, or a fixed interval after Maghrib |
Why two apps differ
- They use different methods, so Fajr and Isha differ by minutes.
- One adds precaution minutes (Dubai and Turkey do) and the other does not.
- They use different high-latitude rules in northern cities.
- They round differently (down, nearest, up). Sakina rounds to the nearest minute.
Accuracy
The astronomy is precise to well under a minute. The uncertainty is in the definitions of twilight, which are conventions and observations, and in weather and terrain at your horizon. That is why most communities publish one local timetable and follow it.
Sakina uses the open-source Adhan library (MIT licence) for the calculations.
Frequently asked questions
Does the time zone or daylight saving time affect the result?
The sun does not care about clocks, but displayed times do. Sakina uses your city's time zone rules, so daylight saving shifts are applied.