Sunrise Sunset Calculator -- Solar Times & Day Length

Find sunrise, sunset, solar noon, day length, and twilight for any place and date

Sunrise Sunset Calculator

A sunrise sunset calculator works out what time the sun rises and sets, when solar noon occurs, how long the day lasts, and when each stage of twilight begins and ends for any latitude, longitude, and date. Enter coordinates and a date below -- all times are shown in your device's local time zone.

Sunrise
--:--
sun crosses horizon
Sunset
--:--
sun drops below horizon

Solar Noon

--:--

Day Length

--

Night Length

--

Daylight Change

--

24-hour day / night timeline (local time)
00:0006:0012:0018:0024:00
Night Astronomical Nautical Civil Daylight
Phase Morning (dawn) Evening (dusk)
Civil twilight (-6°) --:-- --:--
Nautical twilight (-12°) --:-- --:--
Astronomical twilight (-18°) --:-- --:--

Dawn times mark when each twilight phase begins before sunrise; dusk times mark when it ends after sunset.

How the NOAA Solar Calculation Works

This tool implements the same general solar position algorithm published by the US National Oceanic and Atmospheric Administration (NOAA). It is widely used because it balances good accuracy with a manageable amount of math that runs instantly in a browser. Here is what happens behind the scenes when you press a key.

1. Fractional Year

The date is converted to the fractional year (gamma) in radians, based on the day-of-year. This single value drives the seasonal terms that follow.

2. Equation of Time

Earth's tilted axis and elliptical orbit mean the sun does not cross the meridian at the same clock time each day. The equation of time corrects for this, sometimes by 15 minutes or more.

3. Solar Declination

Declination is how far north or south of the equator the sun sits. It ranges from about +23.44° at the June solstice to -23.44° in December and drives the seasons.

4. Hour Angle

For a target sun altitude (-0.833° for sunrise/sunset, or -6, -12, -18° for twilight), the algorithm solves for the hour angle -- how far before or after solar noon the sun reaches that altitude.

5. UTC to Local

Results are first found in UTC, then your browser converts them to your local time zone, automatically handling daylight saving time from your device clock.

6. The -0.833° Standard

Sunrise and sunset are defined at -0.833° rather than 0°. This accounts for atmospheric refraction (about 0.567°) plus the sun's apparent radius (about 0.267°), so the official moment is when the upper edge touches the horizon.

Twilight, Golden Hour, and Blue Hour

The transition between day and night is not instant. As the sun sinks below the horizon, the sky passes through several named stages, each useful for different activities. The timeline above colors these phases so you can see them at a glance.

Civil Twilight (0° to -6°)

Bright enough for most outdoor activities without artificial light. The brightest stars and planets appear. The blue hour -- when the sky glows deep blue -- falls in this band, just before dawn and after dusk.

Nautical Twilight (-6° to -12°)

The horizon at sea is still faintly visible, allowing sailors to take star sightings against it. On land the landscape becomes hard to make out and many more stars are visible.

Astronomical Twilight (-12° to -18°)

The sky is nearly dark. Beyond -18° it is fully night for astronomy, with no scattered sunlight remaining. Faint deep-sky objects become observable.

Golden Hour

Roughly the hour after sunrise and before sunset, when the sun is low (about 0° to 6° above the horizon) and light is warm, soft, and directional -- ideal for photography. Use the sunrise and sunset times above to plan it.

Why Day Length Changes Through the Year

Day length depends on your latitude and the sun's declination. Near the equator, days stay close to 12 hours all year. As you move toward the poles, the swing grows: summer days lengthen and winter days shorten dramatically. At the Arctic and Antarctic Circles the sun can remain up for a full 24 hours around the summer solstice (the midnight sun) and stay down all day around the winter solstice (polar night). The "Daylight Change" figure above estimates how much the day grows or shrinks compared with the previous day, which is largest around the equinoxes and smallest near the solstices when the rate of change slows to nearly zero.

Frequently Asked Questions

How does this sunrise and sunset calculator work?

It uses the standard NOAA solar position algorithm. From your date it derives the fractional year, then the equation of time and the sun's declination. Combined with your latitude and longitude it solves for the hour angle where the sun's center sits 0.833 degrees below the horizon -- the standard sunrise/sunset definition that accounts for refraction and the sun's radius. All math runs locally in JavaScript.

What time is sunset today where I am?

Click "Use my location" to share your coordinates with your browser's permission, leave the date on today, and the sunset time appears in your local time zone. Coordinates stay in your browser.

What is solar noon?

Solar noon is when the sun crosses your meridian and is highest in the sky -- the midpoint between sunrise and sunset. Because of the equation of time and your position within your time zone, it rarely lands exactly at 12:00 and can be off by 15 minutes or more.

What is the difference between civil, nautical, and astronomical twilight?

Twilight is measured by the sun's depth below the horizon. Civil twilight ends at -6° (still usable light), nautical at -12° (sea horizon no longer visible), and astronomical at -18° (sky fully dark and faint stars visible).

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

Near the poles the sun can stay below the horizon all day (polar night) or above it all day (midnight sun) for parts of the year. When there is no sunrise or sunset solution for that latitude and date, the calculator reports polar day or polar night.

Why is the time a minute or two different from another source?

Small differences are normal. They come from rounding, exact coordinates, your local elevation, and real atmospheric conditions. The algorithm assumes a sea-level horizon and standard refraction, so terrain, buildings, temperature, and pressure can shift the observed time slightly.

Do I need to enter my time zone?

No. Times are shown in your device's local time zone automatically. The calculation is done in UTC and converted to local time, so daylight saving time is handled by your device.

How accurate is this calculator?

For typical locations and dates it is accurate to about a minute. Accuracy drops slightly at very high latitudes and near the equinoxes where the sun moves quickly. It assumes a flat sea-level horizon and standard refraction.

What are the golden hour and blue hour?

The golden hour is the warm, soft-light window just after sunrise and before sunset. The blue hour is the deep-blue civil-twilight period before dawn and after dusk. Use the sunrise, sunset, and civil twilight times here to plan both.

Does this tool send my location to a server?

No. Everything runs in your browser. Geolocation, if you use it, is local to your device and only fills the latitude and longitude fields. Nothing is sent, stored, or logged.

Related Tools

Privacy & Limitations

  • Client-side only. All astronomy math runs in your browser in pure JavaScript. No external library, no API, no server. No coordinates, dates, or results are sent anywhere, stored, or logged.
  • Optional geolocation. "Use my location" reads your coordinates from your browser's geolocation only with your consent, purely to fill the latitude and longitude fields. The coordinates never leave your device.
  • Approximate model. Times use the NOAA general solar algorithm, accurate to about a minute for most places. It assumes a flat sea-level horizon and standard atmospheric refraction (sunrise/sunset at -0.833°). Local elevation, terrain, tall obstructions, temperature, and air pressure can shift the real observed times by a few minutes.
  • High-latitude edge cases. Near the poles, days with no sunrise or sunset are reported as polar day or polar night. Accuracy is lower at extreme latitudes and around the equinoxes.

Related Tools

View all tools

Sunrise Sunset Calculator FAQ

How does this sunrise and sunset calculator work?

It uses the standard NOAA solar position algorithm. From your date it derives the fractional year, then computes the equation of time and the sun's declination. Combined with your latitude and longitude it solves for the hour angle at which the sun's center sits 0.833 degrees below the horizon -- the standard definition of sunrise and sunset that accounts for atmospheric refraction and the sun's apparent radius. All math runs in your browser in pure JavaScript.

What time is sunset today where I am?

Click 'Use my location' to let your browser share your coordinates (with your permission), leave the date set to today, and the calculator shows today's sunset time in your local time zone. Your coordinates are used only in your browser and are never sent anywhere.

Why is the sunrise time slightly different from other sources?

Small differences of a minute or two are normal. They come from rounding, the exact coordinates used, your local elevation, and real atmospheric conditions. The NOAA algorithm assumes a sea-level horizon and a standard refraction of about 0.833 degrees. Mountains, tall buildings, unusual temperature, or pressure can shift the observed time by a few minutes.

What is solar noon?

Solar noon is the moment the sun crosses your local meridian and reaches its highest point in the sky for the day. It is the midpoint between sunrise and sunset. Because of the equation of time and your position within your time zone, solar noon rarely falls exactly at 12:00 on the clock -- it can be off by 15 minutes or more.

What is the difference between civil, nautical, and astronomical twilight?

Twilight is defined by how far the sun is below the horizon. Civil twilight ends when the sun is 6 degrees below the horizon -- there is still enough light for most outdoor activity. Nautical twilight ends at 12 degrees below, when the horizon is no longer clearly visible at sea. Astronomical twilight ends at 18 degrees below, after which the sky is fully dark and the faintest stars become visible.

What is day length and how is it calculated?

Day length is the time between sunrise and sunset -- the period the sun's upper edge is above the horizon. The calculator finds both times and reports the difference in hours and minutes. Day length is longest near the summer solstice and shortest near the winter solstice, and the change is most dramatic at high latitudes.

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

Near the poles the sun can stay below the horizon all day (polar night) or above it all day (midnight sun / polar day) for parts of the year. When the geometry has no sunrise or sunset solution for that date and latitude, the calculator reports polar day or polar night instead of a time.

What is the golden hour and blue hour?

The golden hour is the roughly hour-long window after sunrise and before sunset when the sun is low and light is warm and soft -- prized by photographers. The blue hour is the period of civil twilight just before sunrise and after sunset when the sky takes on a deep blue tone. Use the sunrise, sunset, and civil twilight times here to plan both.

Do I need to enter my time zone?

No. All times are shown in your device's local time zone automatically, using your browser's clock settings. The underlying calculation is done in UTC and then converted to your local time, so daylight saving time is handled by your device.

How accurate is this calculator?

For typical locations and dates it is accurate to about a minute, matching official NOAA results closely. Accuracy decreases slightly at very high latitudes and around the equinoxes where the sun moves quickly through the horizon. It assumes a flat sea-level horizon and standard atmospheric refraction, so local terrain and weather can change the real observed times.

Does this tool send my location to a server?

No. Everything runs in your browser. If you use the 'Use my location' button, your coordinates come from your browser's geolocation with your consent and are used only locally to fill in the latitude and longitude fields. No inputs, coordinates, or results are sent to any server, stored, or logged.

Request a New Tool
Improve This Tool