How to Find Prayer Time – Salat Times Calculation Method

How to Find Prayer Time:

This post is about how to find prayer time using calculation method and algorithm.

Muslims perform 5 prayers daily and it is obligatory for every Muslim. Every prayer gives a particular prescribed and calculated time throughout that it should be performed.

Moreover, Salah is one the five pillars or Islam. Salah is an Arabic word.

Importance of Prayer in Quran:

Allah says, –  “O you who believe! Respond to (the call of) Allah and His Messenger when he calls you to that which gives you life.”-  Qur’an 8.24

[Ibrahim said:] “My Lord! Make me and my descendants people who establish salat. My Lord! Accept my prayer.” (Surah Ibrahim, 40)

For Musa(Moses), “I am Allah. There is no god but Me, so worship Me and establish salat to remember Me.” (Surah Ta Ha, 14)

“Indeed, the Salah keeps one from the great sins and evil deeds” (Quran 29:45)Hadith

Prayer Hadith:

The Prophet (P.B.U.H) said, “The comparison of one who remembers Allah and one who does not, is like that of the living and the dead.” [Sahih Al-Bukhari]

Abu Ayyub Al-Ansari reported: A man came to the Prophet, peace and blessings be upon him, and he said, “O Messenger of Allah, teach me something, but make it concise.” The Prophet said, “When you stand for your prayer, then pray as if you are saying farewell. Do not say anything for which you must apologize, and abandon any desire to acquire what other people have.” [Sunan Ibn Mājah 4169]

Below mentioned is a brief description about how to find Salat Times, just to help you so that you can easily understand the whole system.

To determine the precise period of time for every Prayer, we’d like to see 9 main points of time per every day.


Sahar: The time to stop eating (for fasting), the time before Fajr prayer.
Fajr: When the sky begins to lighten, slightly the dawn.
Sunrise: At the time that the primary part of the Sun seems higher than the horizon.
Dhuhr: When the Sun begins to devolution reaching its highest point in the sky.
Asr: The time once the length of an object’s shadow reaches or touches an exact element of the length of the thing itself and the length of that object’s shadow at noonday.
Sunset: At the time that when the Sun vanishes below the horizon.
Maghrib: The time just after sunset.
Isha: The time of darkness when there is no light within the sky.
The time from sunset to sunrise.


Furthermore, the next section provides information on how to calculate the above times mathematically for any location if the coordinates of the location are known.

Astronomical Measures:

Below mentioned are two astronomical measures that are very much Important to analyze Prayer Times.

1- Equation of the time

The equation of time is the difference between time as read from a sundial and a clock. It results from an apparent irregular movement of the Sun caused by a combination of the obliquity of the Earth’s rotation axis and the eccentricity of its orbit. The sundial can be ahead (fast) by as much as 16 min 33 s (around November 3) or fall behind by as much as 14 min 6 s (around February 12), as shown in the following graph:

Equation of time

2- Decline of the sun

The declination of the Sun is the angle between the rays of the sun and the plane of the earth equator. The declination of the Sun changes continuously throughout the year. This is a consequence of the Earth’s tilt, i.e. the difference in its rotational and revolutionary axes.

Calculation of Prayer Times

The above two astronomical measures can be analyzed accurately from “The Star Almanac”, or can be calculated approximately according to the details of time.

The above two astronomical measures can be obtained accurately from The Star Almanac, or can be calculated approximately. The following algorithm from U.S. Naval Observatory computes the Sun’s angular coordinates to an accuracy of about 1 arcminute within two centuries of 2000.

d = jd – 2451545.0; // jd is the given Julian dateg = 357.529 + 0.98560028* d;
q = 280.459 + 0.98564736* d;
L = q + 1.915* sin(g) + 0.020* sin(2*g);R = 1.00014 – 0.01671* cos(g) – 0.00014* cos(2*g);
e = 23.439 – 0.00000036* d;
RA = arctan2(cos(e)* sin(L), cos(L))/ 15;D = arcsin(sin(e)* sin(L)); // declination of the Sun
EqT = q/15 – RA; // equation of time

Calculating the Prayer Times:

To calculate the Prayer Times of the location, you should need to know the local time zone of that location and the latitude (L) and the longitude (Lng) of the location. We also obtain the equation of time (EqT) and the declination of the Sun (D) for a given date using the algorithm mentioned in the previous section.

You should also need to consider the declination of the sun and the equation of the time:


The time of Dhuhr can be easily calculated by using this simple formula:

Dhuhr = 12 + Time Zone – Lng/15 – EqT.

The above formula indeed calculates the midday time, when the Sun reaches its highest point in the sky. A slight margin is usually considered for Dhuhr.

Sunrise and Sunset:

The time between the midday and the time at which sun reaches or touches an angle α below the horizon can be analyzed using the following formula:

Salat Time Formula

The Actual formula of  sunrise and sunset can be computed using the below-mentioned formula:

Sunrise = Dhuhr – T(0.833),

Sunset = Dhuhr + T(0.833).

Fajr and Isha:

There are different opinions on calculating the Prayer Times of Fajr and Isha. There are different conventions of countries according to which they follow the rule:

Convention Fajr Angle Isha Angle
Egyptian General Authority of Survey  19.5 17.5
University of Islamic Sciences, Karachi 18 18
Shia Ithna Ashari, Leva Research Institute, Qum 16 14
Muslim World League 18 17
Islamic Society of North America (ISNA) 15 15
Institute of Geophysics, University of Tehran 17.5 14

For example,

According to the Muslim World League convention Prayer Times are calculated like:

Fajr = Dhuhr – T (18) & Isha = Dhuhr + T (17).


The time once the length of an object’s shadow reaches or touches an exact element of the length of the thing itself and the length of that object’s shadow at noonday.

Asr Formula:

Asr Fromula

Hence, In the other schools of thought:

Asr = Dhuhr + A (1), &  in the Hanafi school of thought is like Asr = Dhuhr + A (2).


According to the Sunni point of view Maghrib starts when the sun has completely set below the horizon.

According to the Shia’s point of view as long as the redness in the eastern sky is still appearing, Maghrib should not be offered.


Midnight is calculated like the exact time from Sunset to Sunrise:

Midnight = 1/2(Sunrise – Sunset).


The technological advancement has introduced many software’s related to Athan clocks that use microphone and GPS to calculate the formula or give you accurate prayer time for specific location..

This provides Muslims much relaxation in determining Azan times. And these above-mentioned formulas provide exact time and make it easy to find prayer time according to your city and time zone. Prayer time depend on the condition of geography and sun.

For more information please visit