CODDY Tool

Sunrise & Sunset Calculator

Sunrise, sunset, solar noon and day length for any place and date.

Calculates sunrise, sunset, solar noon and total day length for any latitude, longitude and date, using the standard solar-position approximation — including correct handling of polar day and polar night at extreme latitudes.

Everything you enter stays in this browser tab. Nothing is sent to our servers, logged or stored.

Loading tool…

About Sunrise & Sunset Calculator

Sunrise and sunset are both, fundamentally, the moment the Sun's centre crosses the horizon — plus a small standard correction (about 0.833°) for atmospheric refraction bending light over the horizon, and the Sun's own apparent size, both of which make it visible slightly before true geometric sunrise and after true sunset. This calculates that crossing from the Sun's declination (how far north or south of the equator it appears, which changes through the year) and your latitude.

Longitude and the equation of time both shift the result away from a clean 12:00 solar noon. Longitude shifts it by simple time-zone-like arithmetic — four minutes per degree, since the Earth rotates 360° in 24 hours. The equation of time is smaller and stranger: even at a fixed longitude, true solar noon drifts up to about 16 minutes either side of clock noon through the year, because Earth's elliptical orbit and axial tilt both make its orbital speed and apparent solar motion uneven.

Near the poles, the whole framework breaks down for part of the year — at high enough latitude, the Sun's daily path barely dips toward the horizon during the local summer (it never sets: polar day) or barely rises above it in winter (it never rises: polar night). Both are detected and reported explicitly rather than returned as a nonsensical time.

How to calculate sunrise and sunset

  1. Enter coordinates

    Type latitude and longitude, or use your device's location.

  2. Pick a date

    Defaults to today.

  3. Read the times

    Shown in your device's local time zone.

Frequently asked questions

How accurate are these times?

Within a minute or two of an official almanac at typical, non-polar latitudes — accurate enough for planning purposes, though not survey-grade. Precision drops somewhat very close to the poles, where the Sun's path runs nearly parallel to the horizon and a tiny change in position shifts the crossing time by more.

Why don't sunrise and sunset add up to exactly 24 hours of day and night combined with tomorrow's sunrise?

Because day length itself changes from one day to the next — faster near the equinoxes, more slowly near the solstices — so the 'daytime' and 'night-time' portions either side of a given day aren't drawn from a fixed 24-hour split the way the question assumes.

What is solar noon, and why isn't it 12:00?

Solar noon is when the Sun is at its highest point in the sky that day — true midday. It differs from clock noon for two reasons: your longitude within your time zone (each degree shifts it by 4 minutes), and the equation of time, a natural variation of up to about 16 minutes caused by Earth's elliptical, tilted orbit.

What happens at the poles?

For part of the year the Sun never sets (polar day, roughly the local summer) and for another part it never rises (polar night, roughly the local winter) — both are detected and reported directly rather than shown as a sunrise or sunset time that wouldn't actually mean anything that day.

Sunrise & Sunset Calculator is free to use with no account, no watermark and no usage limits. Last updated 7 September 2026.