How Prayer Times Are Calculated: The Astronomy Behind Fajr to Isha
The five daily prayers are tied to visible movements of the sun, so every prayer time can be worked out with astronomy. Once you know where the sun is, you can say when each prayer begins, for any place and any date. Here is how that works.
The signs in the sky
Islamic sources describe each prayer by an observable sign. Modern timetables turn those signs into precise positions of the sun.
- Fajr begins at true dawn (al-fajr as-sadiq), the thin horizontal band of light that spreads across the eastern horizon. Astronomers measure it as the moment the sun is a certain number of degrees below the horizon before sunrise.
- Sunrise is when the top edge of the sun appears. It ends the time of Fajr and is not itself a prayer time.
- Dhuhr begins when the sun has passed its highest point (zawal), a few minutes after solar noon.
- Asr begins when the shadow of an object reaches a set multiple of its height, in addition to the shadow it had at noon.
- Maghrib begins at sunset, when the sun has fully disappeared below the horizon.
- Isha begins when the red (or, in some views, white) glow of twilight has disappeared from the western sky, again measured as an angle of the sun below the horizon.
Three numbers drive the calculation
To calculate the times for a city on a given date, a program needs three things: the city's latitude, its longitude, and the date. From the date it works out two quantities that describe the sun that day:
- the sun's declination, how far north or south of the equator the sun is overhead (it swings between about 23.4° north in June and 23.4° south in December), and
- the equation of time, the difference between real solar time and the even ticking of a clock, which varies by up to about 16 minutes through the year.
Longitude and the time zone fix when solar noon happens on the clock. Latitude and declination decide how long the sun takes to climb or sink to any angle. The "hour angle" formula combines them to give the time between solar noon and the moment the sun reaches a given angle.
Why sunrise and sunset use 0.833°
You might expect sunrise to be when the sun's centre is exactly on the horizon (0°). In practice two small effects matter. The sun's disc has a radius of about 0.27°, and we count sunrise when its upper edge appears. The atmosphere also bends light, lifting the sun's apparent position by about 0.57° at the horizon. Added together, the sun's centre is about 0.833° below the geometric horizon at the moment we see sunrise or sunset. Calculators use this standard value.
Why times change every day
As the earth orbits the sun, the declination changes a little each day. In winter at mid-latitudes the sun's path is low and short, so days are shorter and the Fajr–sunrise and sunset–Isha gaps are different from summer. Near the equator the changes are small, while at higher latitudes they are large. This is why a timetable for one city cannot be reused for another, and why a monthly timetable is useful.
What changes between methods
Sunrise, solar noon and sunset are fixed by physics. The disagreement among institutions is mainly about the angles that define Fajr and Isha (15° to 19.5°) and about the Asr shadow rule. Those choices are explained in our guides on calculation methods and the two schools of Asr.
See it in action
Every timetable on prayertim.com uses these steps. You can read the exact settings on our methodology page and look up your own city from the country list.