How prayer times are calculated

Salah times are not copied from a printed sheet. They are computed from the sun’s altitude at a city’s latitude and longitude, then labelled in that city’s civil timezone.

What the engine actually does

Each prayer is defined by a solar condition. Fajr begins at a chosen twilight angle before sunrise. Sunrise is the geometric rise with refraction (0.833°). Dhuhr is solar noon plus a small offset. Asr is when an object’s shadow reaches a factor of one (Standard) or two (Hanafi) times its length. Maghrib is sunset, usually plus one minute. Isha is either a twilight angle after sunset or a fixed number of minutes after Maghrib (Umm al-Qura).

The astronomy follows the widely used PrayTimes.org formulation (Hamid Zarrabi-Zadeh, MIT licence). The same maths runs on the server in PHP and in the browser so that changing method or madhhab updates the table without a full reload.

Conventions on this site

Standard versus Hanafi Asr

The shadow factor is independent of the Fajr/Isha convention. Standard Asr is earlier. Hanafi Asr is later. South Asian printed calendars almost always use Hanafi; most Western mosque boards use Standard.

High latitudes

Above about 48–55° the sun may never reach a deep Fajr or Isha angle in summer. This site then splits the night (middle of the night by default). The result is a usable timetable, not a claim that twilight was observed.

What this is not

It is not a fatwa, not an adhan, and not a replacement for the announcement in your masjid. If your congregation prints a one-minute precaution, add it with the minute adjustment on the city page.

Questions people ask

Which prayer time calculation method should I use?

Use the convention your local mosque prints. If you are unsure, Muslim World League is a reasonable worldwide default. North American mosques often use ISNA; Gulf official tables follow Umm al-Qura; South Asian printed calendars usually follow Karachi with Hanafi Asr.

Why do apps disagree by several minutes?

Fajr and Isha twilight angles, Asr madhhab, high-latitude rules and a mosque’s precaution of one to three minutes all move the clock. Coordinates that are a few kilometres off also shift Maghrib.

What is the difference between Standard and Hanafi Asr?

Standard Asr (Shafi'i, Maliki, Hanbali) begins when an object’s shadow equals its own length plus the noon shadow. Hanafi Asr waits until the shadow is twice that length, so it is later.

How are high latitudes handled?

When the sun never reaches the Fajr or Isha angle, this site uses a night-portion rule (middle of the night by default). You can switch to one-seventh or angle-based in the settings.