How Islamic midnight is calculated
In Islam the night begins at sunset (Maghrib) and ends at true dawn (Fajr). Islamic midnight is not 12:00 AM on the clock. It is the exact midpoint between those two moments, so it moves through the year and differs by city.
- Night length = time from Maghrib to Fajr the next morning.
- Islamic midnight = Maghrib + ½ of the night.
- Last third of the night begins at Maghrib + ⅔ of the night and lasts until Fajr.
Why the night ends at Fajr
The Qur’an says to eat and drink “until the white thread of dawn becomes distinct from the black thread” (2:187), which marks the end of the night and the start of the fasting day. Most scholars therefore measure the night to Fajr. Some scholars, particularly in the Hanafi school, measure the night from sunset to sunrise for certain rulings, so this calculator lets you choose either. If you are unsure, follow the practice of your local mosque or scholar.
Why the last third matters
It is narrated in Sahih al-Bukhari and Sahih Muslim that Allah descends to the lowest heaven in the last third of the night and asks who is calling upon Him so that He may answer, who is asking so that He may give, and who is seeking forgiveness so that He may forgive. For this reason the last third is the best time for tahajjud, du’a and istighfar. Tahajjud is still valid and rewarded earlier in the night after praying Isha.
Midnight and the Isha prayer
The preferred time for Isha extends until Islamic midnight, as stated in the hadith recorded in Sahih Muslim. Many scholars allow Isha to be prayed after midnight if necessary until Fajr, but delaying without an excuse is discouraged. Witr should be prayed before Fajr.
Questions
Is Islamic midnight the same as the midnight on my clock? No. It is the midpoint of Maghrib to Fajr, so in many places it falls before or after 12:00 AM depending on the season.
Which Fajr method should I choose? Pick the method used by your local community. Fajr angles range from 15° to 20°, which shifts the night length by several minutes and moves the last third slightly.
What about places where the sun does not set or Fajr never appears? At high latitudes, use the high-latitude rule in Advanced options, or follow the timetable your local scholars have approved.
Calculations use standard astronomical formulas for solar position. Times can differ from your local timetable by a few minutes. For worship decisions, confirm with a trusted local timetable or scholar.