How We Calculate Prayer Times

Prayer times govern acts of worship, so you deserve to know exactly how ours are produced — and where the genuine uncertainty lies. Nothing on this site is copied from another timetable; every time is computed from astronomy for your specific coordinates.

1. The calculation

For a given latitude, longitude, and date we compute the sun’s position using its declination and the equation of time. From that single solar model, each prayer window follows:

  • Fajr — when the sun reaches a set angle below the horizon before sunrise (true dawn).
  • Sunrise — the sun’s upper limb crossing the horizon, corrected for atmospheric refraction.
  • Dhuhr — solar noon, when the sun crosses the local meridian, plus a small safety margin.
  • Asr — when an object’s shadow reaches its base length plus one times its height (Shafi’i, Maliki, Hanbali) or two times (Hanafi).
  • Maghrib — sunset.
  • Isha — when the sun reaches a set angle below the horizon after sunset (nightfall).

The computation runs on the open-source adhan library, a widely used implementation of these standard astronomical formulas. Accuracy of the astronomy itself is within about a minute anywhere on Earth.

2. Which convention applies to you

The angles above are not universal — different recognised authorities define them differently, and that is the single biggest reason two prayer apps disagree. A few degrees of difference moves Fajr by several minutes.

AuthorityAnglesWhere it is used
Muslim World League (MWL)Fajr 18°, Isha 17°Default across Europe and much of the world.
ISNAFajr 15°, Isha 15°Islamic Society of North America — standard in the US and Canada.
Umm al-QuraFajr 18.5°, Isha 90 min after MaghribThe convention used in Saudi Arabia.
University of Islamic Sciences, KarachiFajr 18°, Isha 18°Standard across Pakistan, India and Bangladesh.
Egyptian General Authority of SurveyFajr 19.5°, Isha 17.5°Used across Egypt and North Africa.
Institute of Geophysics, University of TehranFajr 17.7°, Isha 14°Used in Iran.

We assign the convention recognised in your country by default, and every page tells you which one produced the times you are looking at.

3. High latitudes

Above roughly 55° north, in summer the sun never sinks far enough below the horizon for true night to occur, so Fajr and Isha have no astronomical solution. In those cases we apply the Middle of the Night rule: the interval from sunset to sunrise is split, with Isha before the midpoint and Fajr after it. This follows the prophetic instruction to estimate for abnormal days (Muslim 2937). Our guide to prayer times at extreme latitudes explains the competing approaches in full.

4. Location data

City coordinates, elevation-independent positions, and timezones come from the GeoNames geographical database, which is maintained under a Creative Commons licence. Qibla bearings are computed as the initial great-circle bearing to the Kaaba at 21.4225° N, 39.8262° E.

5. Known limitations

  • Times are calculated for a city’s reference coordinates. Within a large metropolitan area, actual sunrise and sunset can differ by a minute or two.
  • We do not adjust for elevation or local terrain, which can shift visible sunset in mountainous areas.
  • Your mosque may add precautionary minutes, particularly to Fajr and Maghrib. Where the two differ, follow your local mosque.
  • Daylight saving transitions are handled by the IANA timezone database; on transition days, verify against a local source.

6. Reporting a discrepancy

If a time on this site does not match your local mosque or authority, we want to know. Email namazzoneofficial@gmail.com with the city and the expected time, and we will check the calculation convention assigned to that location.

About the author

NamazZone is built and written by Syed Mohsin Ali Shah, a software engineer. The astronomical methodology described here follows published, standard conventions; it is not an independent religious ruling. For matters of fiqh, consult a qualified scholar or your local mosque. More on the about page.