Sunset Calculator
Using our sunset calculator, you will never miss the best moment of the day ever again.
The formula
cos θ_z = sin φ sin δ + cos φ cos δ cos H
Why the equinox is not twelve hours
Sunrise is defined as the moment the sun's upper limb touches the horizon, not its centre, which happens about 16 arcminutes early. Atmospheric refraction lifts the image by roughly another 34 arcminutes, so the geometric centre of the sun is about 0.833° below the horizon when sunrise is reported. Both effects lengthen the day at each end.
The result is that day length exceeds twelve hours at the equinox everywhere on Earth — by about seven minutes at the equator and more at higher latitudes, where the sun crosses the horizon at a shallower angle and so takes longer to do it. The dates of equal day and night, the equiluxes, fall a few days either side of the equinoxes rather than on them.
Clock noon is not solar noon
Two separate effects pull them apart. Longitude contributes four minutes for every degree away from the time zone's meridian, because Earth turns 15° an hour — at the western edge of a wide zone solar noon can fall well after one o'clock. The equation of time contributes up to another sixteen minutes, from the eccentricity of Earth's orbit and the tilt of its axis acting together.
That second term is why a sundial disagrees with a clock, and why the sun traces a figure of eight — the analemma — if photographed at the same clock time through a year. It is also why the earliest sunset and the shortest day are not the same date.
Polar day and night
Above the Arctic and below the Antarctic circle the sun's daily circle can lie entirely above or entirely below the horizon, and there is no sunrise to report. That is a real answer rather than a failure, and this calculator says so instead of returning an error.