How Prayer Times Are Calculated

Prayer 4 min read

The five prayer times are set by the position of the sun in the sky. Because the sun rises and sets at different moments in every place and on every day, prayer times change by location and by date. Calculation turns the sun's position into clock times.

1

How each prayer follows the sun

Allah commands the Prophet ﷺ to keep up the prayer from the decline of the sun until the darkness of the night, and to pray at dawn (Quran 17:78). He also says that prayer is prescribed for the believers at fixed times (Quran 4:103). The Prophet ﷺ was taught the times by Jibril (peace be upon him), who led him in prayer on two successive days (Sunan Abi Dawud 393; Jami at-Tirmidhi 149). The Prophet ﷺ then described when each time ends (Sahih Muslim 612).

  • Fajr starts at true dawn, when a thin band of light spreads across the horizon. It ends at sunrise (Sahih Muslim 612).
  • Dhuhr starts just after midday, when the sun has passed its highest point and begins to decline. It lasts until Asr begins (Sahih Muslim 612).
  • Asr starts when the shadow of an object reaches a certain length, as explained below. The preferred time lasts until the sun turns yellow (Sahih Muslim 612), and whoever catches one rak'ah before sunset has caught Asr (Sahih al-Bukhari 579).
  • Maghrib starts at sunset, when the sun has fully gone below the horizon. It lasts until the red twilight disappears (Sahih Muslim 612).
  • Isha starts when the twilight after sunset has ended and the night is dark. Its preferred time lasts until about midnight (Sahih Muslim 612).

2

The Asr shadow rule

The schools differ most famously on Asr. The Maliki, Shafi'i and Hanbali schools, and two of Abu Hanifa's students, say Asr begins when the shadow of an object becomes equal to the height of the object, after the shadow at midday is removed from the count. This follows the report that Jibril prayed Asr on the first day when the shadow of everything was equal to its height (Jami at-Tirmidhi 149).

Abu Hanifa's view, which is the main view of the Hanafi school, is that Asr begins when the shadow becomes twice the height of the object. For this reason many apps let you choose between the Hanafi and the standard setting. The Hanafi setting gives a later Asr time.

3

Why calculation methods differ

Dawn and twilight are not sharp moments. The light changes slowly. To turn them into a clock time, organisations use the angle of the sun below the horizon.

Different organisations and regions use different angles, roughly 15 to 19.5 degrees for Fajr and 15 to 18 degrees for Isha, and some use a fixed number of minutes after Maghrib for Isha. Each group has its own studies, observations and scholarly opinion. Scholars also differ on which twilight marks the start of Isha. Most take the end of the red twilight, as in the report of Jibril's prayer, while Abu Hanifa took the end of the white twilight, which is later. None of these methods is a new rule of the religion. They are efforts to reach the time that Allah set by the sun.

A good habit is to use the method that is common in your own city or that your local mosque follows.

4

High latitudes

In places far from the equator, the sky may never become fully dark in summer, or the sun may not set for days. Then the normal signs for Isha and Fajr cannot be seen.

Scholars and councils have given several solutions. Some divide the night into parts, such as halves or sevenths. Some follow the times of a nearby place where the signs appear, or the times of the last day on which the signs were seen. Some scholars rely on estimation, as the Prophet ﷺ told his companions to estimate the prayer times for the very long days of the Dajjal (Sahih Muslim 2937). Ask a qualified local scholar or your community which method to follow.

5

Why apps differ by a few minutes

Two apps can show different times in the same city for a few simple reasons.

  • They use different calculation methods and angles.
  • They use different Asr settings.
  • They round times in different ways.
  • Some add a few extra minutes of caution, so you do not pray before the time begins.

Small differences are normal. Many people pray a little after the listed start time for caution, and they finish before the next prayer begins. The Prophet ﷺ said that the most beloved deed to Allah is prayer at its proper time (Sahih al-Bukhari 527).

Sources

General information for learning, not a fatwa. For your own situation, ask a qualified scholar.

Updated 7 October 2026

Common questions

Why does my local mosque show different times from my phone?

The mosque may follow a different calculation method, or it may set a fixed time for the congregation. Both can be correct. Follow the mosque for group prayer, and ask them which method they use.

Do prayer times change every day?

Yes. The sun rises and sets at slightly different times each day, and the change is larger in places far from the equator. That is why a fixed timetable is made again for every date.