# How is Chatzos Halayla (Halachic Midnight) calculated?

It seems pretty easy to calculate from the get-go that the formula is something like this:

``````# a halachic hour is one twelfth of the time between sunrise and sunset
halachicHour = (timeOfSunset - timeOfSunrise) / 12
# thus chatzos halayla would be literally
chatzosHalayla = timeOfSunset + (halachicHour * 6)
``````

Above, a halachic hour is determined by the distance from sunrise to sunset divided by twelve.

This makes things interesting, as I presume that often "midnight" doesn't exactly happen in the middle of the night (period between nightfall and sunrise or dawn). How, then, do we calculate Chatzos Halayla?

I was reading a book on Tikkun Chatzos recently which sparked my interest in this. According to the author, Rebbe Nachman of Breslov calculated the middle of the night by adding six civil hours to nightfall, but this doesn't make any sense and I believe that the author is making an assumption about this. It would make sense to say that Rebbe Nachman calculated the middle of the night using six halachic hours, but to use six civil hours doesn't really make any sense to me.

-
My understanding is that Rebbe Nachman zy'a rules this way to make things easier to calculate. He may be basing himself on the Mechaber as is general practice in Breslev. – yoel Sep 22 '11 at 1:05
Nice, thanks for pointing that out. – Naftuli Tzvi Kay Sep 25 '11 at 23:48

The Shulchan Aruch Harav (1:8 in the Mahadura Basra) says that Chatzos is calculated by finding chatzos hayom and adding 12 (civil) hours to it.

-

At night, an halachic hour is a twelfth of the difference found when you subtract the time of sunset from the time of sunrise, not vice versa. (I have no source for this, though.)

-
So, in any case, chatzos halayla would be caculated as being six halachic hours into the night? – Naftuli Tzvi Kay Sep 22 '11 at 0:02
My Zmanim app for my phone (using the library provided by KosherJava) calculates Chatzos Halayla and Chatzos Hayom as being 12:46 am and pm, respectively. – Naftuli Tzvi Kay Sep 22 '11 at 0:16
Re "in any case...": There are differences of opinion as to when chatzos (day or night) is. IIRC Rabbi Moshe Feinstein's view is that chatzos (or at least one of them) is constant (over the course of a year for any given location), which would not fit in with its being 6 hours into the night. I don't know (or don't recall) what particular constant he said it is, though. `:-/` Perhaps someone else can answer better. Re "12:46 am and pm": If chatzos is 6 hours into the night/day, then they will be 12 hours apart (plus or minus about a minute) on any given day just because of arithmetic. – msh210 Sep 22 '11 at 3:52
@msh210, R. Moshe's view is that chatzos hayom is when the sun crosses the local meridian (solar noon); this is constant in any given place throughout the year (except for the shift due to daylight savings time), and it can be expressed as (longitude * 4 - offset from GMT) minutes before 12:00 PM (or after, if the result is negative). In New York, for example, it's 11:56 AM standard time. Presumably, then, he'd say that chatzos halailah is the same thing - when the sun crosses the antipodal meridian, exactly 12 clock hours later. – Alex Sep 22 '11 at 14:58