Prayer times & Qibla

What Is Islamic Midnight? How It Is Calculated and Why Isha Depends on It

Islamic midnight is not 12:00 — it is the midpoint between sunset and dawn. How it is calculated, why it moves, and how it sets the end of Isha.

Open almost any prayer timetable and you will find a row that is not one of the five prayers: midnight, or nisf al-layl. It usually shows a time like 23:42 or 00:17, and it confuses people the first time they notice it. If midnight is 12:00, why is the app telling you it is twenty to twelve?

Because in Islamic law, midnight is not a clock reading. It is a point in the actual night — and the actual night rarely has the courtesy to be centred on 00:00.

The definition

Islamic midnight (منتصف الليل الشرعي, nisf al-layl al-shar’i) is the halfway point of the night, where “night” means the span from sunset to the following true dawn.

The arithmetic is as plain as it sounds:

Islamic midnight = sunset + (time from sunset to dawn) ÷ 2

Take a city where the sun sets at 18:08 and the next day’s dawn comes at 05:13. The night runs eleven hours and five minutes. Half of that is five hours and about thirty-two minutes. Added to sunset, Islamic midnight falls at roughly 23:40 — twenty minutes before the clock says midnight.

Now take the same city in June, when the sun sets at 19:20 and dawn arrives at 03:55. The night is eight hours thirty-five minutes; half is four hours seventeen; midnight lands at about 23:37. Similar, but only by coincidence — in a city further north the two figures would be hours apart.

The point is that Islamic midnight drifts through the year, because the night it divides is itself growing and shrinking. Clock midnight never moves. The two agree only by accident.

Why the night, and not the day

It is worth pausing on why the night is measured from sunset at all, because it explains a great deal about how the Islamic day works.

The Islamic day begins at sunset, not at dawn and not at midnight. The night comes first, and the daylight hours follow it. So “the night of Friday” means the night that begins at sunset on Thursday. When a scholar divides “the night” into halves or thirds, the span being divided is this one: from the moment the sun goes down until the first true light appears in the east.

That is also why you cannot simply split the hours between 18:00 and 06:00 and call it done. The endpoints are astronomical events, and they move.

What Islamic midnight is used for

Three things, in practice.

1. The preferred end of Isha

This is the one that puts midnight on your timetable. The majority position is that the time for Isha extends until true dawn — pray at 03:00 and you have prayed Isha in its time. But a well-known hadith describes the time of Isha as lasting “until the middle of the night”, and most scholars read this as marking the end of the preferred window.

So the practical rule most people follow: Isha should be prayed before Islamic midnight, and delaying past it without a reason is discouraged rather than invalid. Timetables print the midnight row so you can see the deadline you are aiming at.

A smaller number of jurists — some Maliki and Shafi’i positions among them — treat midnight as the genuine end of Isha’s chosen time, with what follows being a time of necessity. The difference is one of emphasis more than outcome.

2. The last third of the night

The tahajjud prayer, and the descent of divine mercy described in the well-known hadith, are tied to the final third of the night. Working that out needs the same measurement:

Last third begins = dawn − (time from sunset to dawn) ÷ 3

With the eleven-hour-five-minute night above, a third is three hours and forty-two minutes. Counting back from dawn at 05:13, the last third begins at about 01:31.

Notice it is nearly two hours later than Islamic midnight. People sometimes assume the two are the same moment, or that the last third starts at midnight. It never does. Midnight is the halfway mark; the last third starts five-sixths of the way through.

3. Deciding which night you are in

Because the Islamic day turns at sunset, questions like “which night is the 27th of Ramadan?” are answered by sunset, not by midnight. But for rulings that depend on a night being divided — some discussions of when a traveller’s night begins, or how the night of a fast is reckoned — the midpoint is the reference.

Where the methods disagree

If you compare two apps you may find their midnight rows differ by half an hour or more. There is a reason, and it is not a bug.

The common method measures the night from sunset to true dawn (fajr). This is the majority approach and the one described above.

An alternative method measures from sunset to sunrise. Since sunrise comes after dawn — by anywhere from an hour to an hour and a quarter in the mid-latitudes — this makes the night longer and pushes the midpoint later, typically by thirty-five to forty-five minutes.

Both have a basis. The first treats the night as ending when the obligation of the night prayer ends and the fast begins. The second treats it as ending when the sun is actually up. If your mosque’s timetable and your phone disagree, this is usually why. Follow your local mosque; the difference is a matter of valid scholarly choice, not accuracy.

A third variable rides along underneath: what angle your method uses for dawn. A method using 18° gets an earlier dawn than one using 15°, which changes the length of the night, which moves midnight. So two apps can agree on the midnight formula and still print different times. Our page on prayer time calculation methods covers how those angles are chosen.

Where it stops working

North of roughly 48° latitude in summer, the astronomical dawn never properly arrives — the sun does not drop far enough below the horizon. No dawn means no measurable night, and the midpoint formula has nothing to work with.

Timetables in those places fall back on approximations: taking the night from the nearest latitude where it can be measured, dividing the span between sunset and sunrise into sevenths, or borrowing the timings of a city further south. Which one your community uses is a decision made locally, and it affects the midnight row along with everything else. We cover the approaches in prayer times at high latitudes.

In the far north in midsummer, the honest answer is that Islamic midnight becomes a convention rather than a measurement.

Working it out yourself

You need two numbers from your local timetable: today’s sunset (maghrib) and tomorrow’s dawn (fajr). Tomorrow’s, because the night you are dividing runs past the date change.

  1. Convert both to minutes past midnight. If dawn is on the next day, add 24 hours (1,440 minutes) to it.
  2. Subtract sunset from dawn. That is the length of the night.
  3. Halve it. Add the result to sunset.
  4. If the answer is over 1,440, subtract 1,440 — your midnight falls after 00:00.

Worked through with sunset 18:08 (1,088 minutes) and dawn 05:13 next day (1,753 minutes): the night is 665 minutes, half is 332.5, and 1,088 + 332.5 = 1,420.5 minutes, which is 23:40. Under 1,440, so midnight falls before the clock’s.

Our prayer times pages do this for every city automatically, using your own time zone and the method your region follows.

A note on the name

You will see this rendered several ways in English: Islamic midnight, Shar’i midnight, nisf al-layl, or simply midnight sitting quietly in a timetable. They all mean the same calculated point. The qualifier matters, though — when a timetable says “midnight” without one, it is still almost certainly this, not 00:00, and reading it as the clock time will have you thinking Isha’s preferred window ends later than it does.

Frequently asked questions

Is Islamic midnight the same as 12:00 at night?

Almost never. Islamic midnight is the midpoint between sunset and the following dawn, so it lands wherever the halfway point of that night happens to fall — often somewhere between 23:00 and 01:00, and further from 12:00 the longer or shorter the night is.

Why does Islamic midnight matter?

It marks the preferred end of the time for Isha in the view of many scholars, and it is the reference point for working out the last third of the night, when the tahajjud prayer is offered.

Is Isha invalid after Islamic midnight?

Most scholars hold that the time for Isha extends until true dawn, so a prayer offered after midnight is still performed within its window. What is lost is the preferred time, not the prayer itself. Delaying it without reason is discouraged.

Do all calculation methods agree on Islamic midnight?

No. Most take the midpoint from sunset to dawn; some take it from sunset to sunrise instead, which pushes midnight later by roughly half the length of dawn — often 35 to 45 minutes.

How do I find the last third of the night?

Measure the whole night from sunset to dawn, divide by three, and count the final portion backwards from dawn. It begins later than Islamic midnight, never at the same moment.

Related guides

All guides →