Every Shabbat calendar prints two times, and almost nobody is told where they come from. Both are built from one astronomical event — sunset at your exact position on the earth — with a customary margin applied on either side. Understanding the construction explains a lot of otherwise puzzling things: why the neighbouring town differs by four minutes, why Jerusalem is unlike everywhere else, and why two calendars for the same city can print times that do not match.
A note on scope. This article describes how the numbers are computed and where the widely followed customs come from. It is not a halachic ruling and is not a substitute for one. Where practice varies, follow your community calendar and your rav.
The anchor is shkiah, sunset: the moment the upper edge of the sun disappears below the horizon at your location. Astronomically it is well defined, and it depends on three things — your latitude, your longitude, and the date.
Longitude produces the effect people notice first. The earth turns 360 degrees in 24 hours, so one degree of longitude is four minutes of clock time. Two towns 25 kilometres apart on an east–west line see the sun set about a minute apart, and that difference is real, not a rounding artefact. It is why a calendar printed for one city cannot simply be reused a hundred kilometres away, and why a location-aware screen recalculates when you change city.
Latitude produces a larger, seasonal effect. Near the equator, day length barely changes across the year. The further from it you go, the more extreme the swing: Jerusalem's earliest winter sunset and latest summer sunset differ by roughly two and a half hours, while in London the gap is closer to five, and candle lighting can fall before 3:40 pm in December and after 9 pm in June.
Shabbat itself begins at sunset. Candle lighting is set earlier, so that the mitzvah is performed with room to spare and so that a margin of ordinary weekday time is added to Shabbat — the principle of tosefet Shabbat, adding to Shabbat from the day before it.
The near-universal margin in the diaspora is 18 minutes before sunset. Israel is where it gets interesting, because several cities follow their own long-standing local custom:
A few communities outside Israel keep their own margins for local reasons — a customary 20, 30 or 40 minutes — which is one of the reasons a printed shul calendar occasionally disagrees with a generic online one. Some people also have the practice of accepting Shabbat considerably earlier in summer, from plag hamincha onwards, which produces a candle lighting time well over an hour before sunset and is not something any general calendar will show you.
One convention worth knowing: published tables round candle lighting down to the whole minute rather than to the nearest one. Rounding down always moves the time earlier, which is the stringent direction. It is a small thing, but it means a table can legitimately read 18:42 where a raw calculation says 18:42:50.
Sunset happens later if you are higher up, because from altitude you can see further over the curve of the earth. The effect is not trivial: several hundred metres of elevation can delay true sunset by two or three minutes.
Most published calendars, including the data behind this screen, nevertheless compute sunset against a sea-level horizon. This is a deliberate choice rather than an oversight. A sea-level calculation gives the earlier time, and for the start of Shabbat earlier is the cautious direction. It also produces one consistent time for a whole city rather than a different one for each neighbourhood on a hillside. If you live somewhere with dramatic relief and your community calendar accounts for it, that calendar is the one to follow.
Shabbat ends at tzeit hakochavim, nightfall, classically defined by observation: the point at which three medium-sized stars are visible in the sky. That is a beautifully practical definition for someone standing outside, and an awkward one for a calendar, which has to produce a number in advance for a place it cannot see. Two approaches are used to turn it into arithmetic.
Fixed minutes after sunset. The simplest method: add a set interval, commonly 42, 45, 50, 60 or 72 minutes. The 72-minute figure is associated with the stringent opinion of Rabbeinu Tam and is followed by those with that practice; it is not an error when you see it, just a different position. Fixed offsets are easy to publish and easy to check, but they are only accurate for the latitude and season they were calibrated against.
Solar depression angle. The more precise method asks how far the sun has sunk below the horizon, since that is what actually governs how dark the sky is. Common thresholds are 8.5 degrees — the default behind the times on this screen — and 7.083 degrees, each corresponding to a particular reading of when three stars become visible.
The angle method matters because twilight is not the same length everywhere. What determines its duration is the angle at which the sun's path meets the horizon. Near the equator the sun drops almost vertically and darkness arrives in about twenty minutes flat, all year. At higher latitudes in summer the sun slides down at a shallow angle and takes far longer to get anywhere. A fixed 42 minutes that works in Tel Aviv can be badly wrong in Manchester in June — and the angle-based calculation, which is doing the actual geometry, is what keeps the two consistent.
Push far enough north and the arithmetic breaks down. Above roughly 49 degrees of latitude, there are nights around midsummer when the sun never descends 8.5 degrees below the horizon at all. The threshold is simply never crossed, so no time exists to print.
This is a live issue for Jewish communities in northern Britain, Scandinavia, northern Russia and parts of Canada, and it is a halachic question with real literature behind it rather than a software bug. Approaches include using the last date on which the angle was reached, using a fixed interval instead, or following the times of a designated reference location. Any calendar that shows you a blank or an approximation for those weeks is being honest about the underlying problem; what to do in practice is a question for your rav.
Yom Tov largely follows the same pattern, with two differences that catch people out.
When the first day of Yom Tov runs into the second — or when Yom Tov falls on Saturday night — candles for the second night are lit not at a pre-sunset time but after nightfall, and from a pre-existing flame rather than a newly struck one. This is why calendars show a candle lighting time for the second night that looks strangely late compared with the first: it is derived from the havdalah calculation, not the sunset-minus-18 one.
When Yom Tov falls immediately after Shabbat, the evening involves both havdalah and candle lighting in a combined form. Again the underlying times come from the same two calculations; it is the sequence that changes.
If you have ever compared a shul calendar with an app and found a two-minute gap, it will almost always be one of these:
None of these is a mistake. They are different reasonable answers to genuinely underdetermined questions, and the right one for you is the one your community follows.
Shabbat Screen pulls candle lighting, havdalah, the weekly parsha and upcoming holidays from the Hebcal API, calculated for the coordinates of whichever location you have set — so if you are away from home for Shabbat, the times follow you rather than staying behind. It uses the 18-minute margin by default, applies the Jerusalem and other Israeli city customs where they apply, and derives havdalah from an 8.5-degree solar depression.
Those are sensible defaults for a screen you glance at from across a room. They are not a ruling, and where your community's calendar differs, it is the one to follow. If you would like to understand the calendar those dates sit on, why Yom Tov moves every year covers the lunar arithmetic behind it.