Islamic Midnight & the Last Third of the Night (How to Calculate)

How to calculate Islamic midnight: starry night sky over a mosque

Here’s how to calculate Islamic midnight — it’s the midpoint between Maghrib and Fajr, not 12 on the clock.

Ask when “Islamic midnight” is and you’ll surprise a lot of people with the answer: it’s usually not 12:00 a.m. It’s tied to the night itself — from sunset to dawn — which is exactly why it matters for Witr, Tahajjud, and the deadline for Isha. Here’s how to work it out.

How to calculate Islamic midnight: the quick answer

Islamic midnight is the midpoint between Maghrib (sunset) and Fajr (true dawn) — not 12:00 on the clock. The last third of the night is the final third of that same Maghrib-to-Fajr span, and it’s the prized time for Tahajjud prayer.

Why it isn’t 12:00 a.m.

Clock midnight (12:00 a.m.) is a fixed civil convention. The Islamic night is a real astronomical period: it starts at sunset and ends at true dawn. Since sunset and dawn shift through the year, the true midpoint of the night drifts too — often landing closer to 11:30 p.m. or 1:00 a.m. depending on your location and season.

How to calculate it

The math is simple once you have two times: Maghrib and the next day’s Fajr.

  1. Find the length of the night: Fajr − Maghrib (counting through midnight).
  2. Islamic midnight = Maghrib + (night length ÷ 2).
  3. Last third begins = Fajr − (night length ÷ 3), which is the same as Maghrib + (night length × 2⁄3).

A worked example

Say Maghrib is 7:00 p.m. and Fajr the next morning is 4:00 a.m. The night is 9 hours long.

  • Islamic midnight: 7:00 p.m. + 4h 30m = 11:30 p.m.
  • Last third begins: 4:00 a.m. − 3h = 1:00 a.m. (runs until Fajr)

So the best window for Tahajjud in this example is 1:00 a.m. to 4:00 a.m.

Why these times matter

  • Isha deadline: Many scholars hold that the preferred time for Isha extends until Islamic midnight, so knowing it helps you avoid delaying too long.
  • Tahajjud: The last third of the night is emphasised as an especially blessed time for voluntary night prayer.
  • Witr: Often prayed after Isha and before Fajr, so the night’s structure frames it.

Getting the two times you need

Everything here depends on accurate Maghrib and Fajr times for your city. Those come from your calculation method (for Fajr) and sunset (for Maghrib) — see how prayer times are calculated for the full picture. A calculator that reports Maghrib and Fajr lets you apply the simple formulas above.

Frequently asked questions

Is Islamic midnight the same as 12:00 a.m.?
No. It’s the midpoint between sunset and true dawn, which usually isn’t 12:00 on the clock.

How do I find the last third of the night?
Divide the Maghrib-to-Fajr span into three; the last third begins two-thirds of the way through the night and ends at Fajr.

Why does the last third change dates?
Because night length changes with the seasons. Longer winter nights push the boundaries around compared with short summer nights.

Until when can I pray Isha?
Views differ, but many scholars consider Islamic midnight the end of the preferred time for Isha, with the permissible time extending until Fajr in need.

For more background, see Tahajjud on Wikipedia.


Want Maghrib and Fajr for your city to work out the night? Use the free prayer times calculator and apply the simple midpoint and last-third formulas.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top