BYTETOOLS

Sunrise Sunset Calculator

Calculate sunrise, sunset, solar noon, day length and civil twilight for any latitude, longitude and date using the NOAA solar position algorithm.

What is the Sunrise Sunset Calculator?

The ByteTools Sunrise Sunset Calculator works out when the sun rises and sets anywhere on Earth for any date, using the NOAA solar position algorithm.

  • NOAA solar position algorithm — declination, equation of time and hour angle
  • Sunrise, sunset, solar noon, day length and civil twilight
  • Built-in table of major world cities with coordinates
  • Works for any latitude, including polar day and polar night
  • Shows how much the day has lengthened or shortened since yesterday
  • No geocoding API, no network — everything runs offline

How to use the Sunrise Sunset Calculator

  1. 1

    Pick a city from the list, or type your own latitude and longitude in decimal degrees.

  2. 2

    Set the date you want and the UTC offset the results should be shown in.

  3. 3

    Read sunrise, sunset, solar noon and day length instantly.

  4. 4

    Check the civil twilight times for the usable light before dawn and after dusk.

  5. 5

    Compare the day-length change to see whether days are getting longer or shorter.

About the Sunrise Sunset Calculator

The ByteTools Sunrise Sunset Calculator works out when the sun rises and sets anywhere on Earth for any date, using the NOAA solar position algorithm. Enter a latitude, longitude, date and UTC offset — or pick one of the built-in cities — and you get sunrise, sunset, solar noon, total day length and the start and end of civil twilight.

It is useful for photographers planning golden hour, gardeners tracking daylight, sailors checking legal daylight, and anyone curious about how much the day has lengthened since the solstice. The change in day length against yesterday is shown too, which makes the swing around the equinoxes very visible.

There is no geocoding lookup and no network request of any kind — coordinates are typed in or chosen from a small embedded city table, and the whole solar calculation runs in your browser. Results are astronomical estimates accurate to about a minute at mid latitudes; see the FAQ for where that degrades.

Frequently asked questions

How accurate is this sunrise and sunset calculator?

It uses the NOAA solar equations, which are accurate to roughly one minute for locations between 72°N and 72°S. Closer to the poles the sun crosses the horizon at a very shallow angle, so a small error in refraction becomes a large error in time and results there can be off by several minutes.

Why does my local weather app show a slightly different time?

Most published tables assume a flat sea-level horizon and a standard atmosphere, exactly as this calculator does. Real mountains, buildings, altitude and unusual air temperature can shift the visible sunrise by a minute or two either way, so small differences are normal.

What is civil twilight?

Civil twilight is the period when the sun is between the horizon and 6 degrees below it. There is still enough natural light to see and work outdoors without artificial lighting, and it is the definition many aviation and lighting regulations use.

What does solar noon mean?

Solar noon is the moment the sun reaches its highest point for the day at your longitude — the true midpoint between sunrise and sunset. It rarely falls at 12:00 clock time, because time zones are wide and the equation of time shifts the sun by up to about 16 minutes across the year.

Why does it say the sun never rises or never sets?

Above the Arctic Circle and below the Antarctic Circle there are dates when the sun stays below the horizon all day, or above it all day. When the hour-angle equation has no solution the tool reports polar night or midnight sun instead of inventing a time.

Do I need to enter the UTC offset myself?

Yes, and this is deliberate. Coordinates alone do not determine a time zone, so you choose the offset the results are displayed in. Remember to use the summer-time offset if the date falls inside daylight saving for that location.

Related tools