Everyday calculator

Free sunrise sunset calculator

Find sunrise and sunset for anywhere on Earth in two seconds. Enter your latitude, longitude, date, and time zone, and the sunrise sunset calculator returns sunrise, sunset, solar noon, day length, and civil dawn and dusk — using the standard sunrise equation, with polar day and polar night handled, updated live, as you type.

InputsLive
Latitude+N / −S
°
Longitude+E / −W
°
UTC offsethours
UTC
Date
How the result is calculated
The sunrise equation solves the hour angle of the sun at the horizon:cos(H) = [cos(90.833°) − sin(lat)·sin(δ)] / [cos(lat)·cos(δ)]
  • δ is the sun's declination for the date; H is the hour angle.
  • Sunrise = solar noon − H; sunset = solar noon + H (15° = 1 hour).
  • If cos(H) is outside [−1, 1], it is polar day or polar night.
Check our examples
New York · 21 Jun 2024London · 21 Jun 2024Sydney · 21 Jun 2024Svalbard 78°N · midnight sun
Result
Sunrise & sunset — Fri, Jun 21, 2024
5:25 AM – 8:30 PM
Day length 15h 06m · solar noon 12:58 PM
Sunrise5:25 AM
Sunset8:30 PM
Solar noon12:58 PM
Day length15h 06m
Twilight (civil — sun 6° below the horizon)
PhaseLocal time
Civil dawn (first light)4:51 AM
Sunrise5:25 AM
Sunset8:30 PM
Civil dusk (last light)9:04 PM

Uses the standard sunrise equation (NOAA algorithm) for a flat sea-level horizon; nothing leaves your device. How it's calculated

Results are estimates. Consult a professional.

Definition

What this sunrise and sunset calculator does

This sunrise sunset calculator works out the exact times the sun rises and sets at any spot on Earth, for any date. Give it three things — your latitude, your longitude, and the date (plus your time zone as a UTC offset) — and it returns sunrise, sunset, solar noon, the length of the day, and the civil-twilight (dawn and dusk) times, all in your local clock time.

Sunrise is the instant the upper edge of the sun first appears over the horizon; sunset is the instant that upper edge slips below it. Because the atmosphere bends light, the sun is actually about 0.833° below the true (geometric) horizon at both moments — a detail the calculator builds in, which is why its times match published almanacs to within a minute or two.

The moment the sun's upper edge first appears above the horizon as it rises.
The moment the sun's upper edge disappears below the horizon as it sets.
The moment the sun is due south (or north) and at its highest — the midpoint between sunrise and sunset.
The time from sunrise to sunset — how long the sun is above the horizon.
The drivers

What determines your sunrise and sunset times

Two things decide when the sun rises and sets for you: where you are on Earth (your latitude and longitude) and where Earth is in its orbit (the date). Everything the calculator does flows from those two inputs.

Latitude — how far north or south you are

Latitude controls how much the day length swings through the year. Near the equator, days stay close to 12 hours all year round. The farther you move toward the poles, the more extreme the swing — long summer days and short winter ones — until, beyond the polar circles, the sun can stay up or stay down for 24 hours at a time.

The date — Earth's tilt and the seasons

Earth's axis is tilted about 23.44°, so over a year the sun's overhead point drifts north and south. That drift — captured by the solar declination — is what gives us seasons. Around the June solstice the Northern Hemisphere tilts toward the sun (longest days); around the December solstice it tilts away (shortest days); at the equinoxes day and night are nearly equal everywhere.

Longitude and time zone — lining up the clock

Latitude and date set how long the day is; longitude and your time zone set what your clock reads. Earth turns 15° of longitude every hour, so moving west pushes sunrise later on the clock. The calculator converts the sun's position into Universal Time from your longitude, then shifts it into local time using the UTC offset you enter (for example −4 for New York on daylight time).

Method

How to calculate sunrise and sunset (the sunrise equation)

Under the hood the calculator uses the standard sunrise equation — the same NOAA solar-position algorithm professional almanacs rely on. The chain of steps is short:

  1. Find the sun's declination for the date — how far north or south of the equator the sun is overhead that day, between −23.44° and +23.44°.
  2. Solve the hour angle — how far (in degrees) the sun is from the meridian when its centre sits at the sunrise/sunset zenith of 90.833° (0.833° below the horizon, for the disc radius plus refraction).
  3. Find solar noon from your longitude and the equation of time (a small ±16-minute correction for Earth's tilted, elliptical orbit).
  4. Step out to each side. Sunrise = solar noon − hour angle; sunset = solar noon + hour angle, converting 1° of hour angle to 4 minutes of clock time.
cos(H) = [cos(90.833°) sin(lat) × sin(δ)] ÷ [cos(lat) × cos(δ)]
sunrise = solar noon (H ÷ 15) · sunset = solar noon + (H ÷ 15)
day length = 2 × H ÷ 15 (hours)

If cos(H) comes out greater than 1 or less than −1, the sun never reaches the horizon that day — that is the maths telling you it is polar day or polar night, and the calculator flags it instead of returning a time.

Worked example

A worked example using the sunrise sunset calculator

Example: New York City on the June solstice

Sam wants the sunrise and sunset for New York City on 21 June 2024 — the longest day of the year. He enters latitude 40.71, longitude −74.01, the date, and a UTC offset of −4 (Eastern Daylight Time). Here is how the calculator works through it.

Step 1 — Find the sun's declination for the date

21 June is the solstice, so the sun is at its farthest north: a declination of about +23.4°. That is why the Northern Hemisphere gets its longest day — the sun spends the most time above the horizon.

Step 2 — Solve the hour angle and solar noon

Feeding latitude 40.71° and that declination into the sunrise equation gives a hour angle that puts the sun above the horizon for just over 15 hours. From the longitude and equation of time, solar noon for New York lands at 12:58 PM local time.

Step 3 — Step out to sunrise and sunset

Subtracting the hour angle from solar noon gives sunrise; adding it gives sunset. The calculator returns sunrise 5:25 AM and sunset 8:30 PM — a day length of 15h 06m. (Published almanacs list about 5:24 AM and 8:32 PM for the same day, so the calculator is right on the minute.)

Sunrise 5:25 AM · Sunset 8:30 PM
New York, 21 June 2024 (UTC−4): solar noon 12:58 PM, day length 15h 06m, with civil dawn at 4:51 AM and civil dusk at 9:04 PM. The calculator shows all of these at once as you adjust the inputs.
Midday & daylight

Solar noon and day length

Solar noon is the moment the sun is highest in the sky and due south (in the Northern Hemisphere) — the exact midpoint between sunrise and sunset. It is rarely 12:00 on your clock: your longitude within your time zone shifts it, and the equation of time nudges it by up to ±16 minutes through the year. The calculator reports solar noon so you can see when the sun truly peaks.

Day length is simply sunset minus sunrise — how long the sun is above the horizon. It is symmetric around solar noon, which is why sunrise and sunset sit an equal number of minutes either side of it. Because day length is the difference of two times that each carry a small rounding, almanacs can disagree on it by a couple of minutes even when they agree on sunrise and sunset.

LatitudeDay length at June solsticeDay length at December solstice
0° (equator)~12h 07m~12h 07m
40° N (e.g. New York, Madrid)~15h 01m~9h 20m
51° N (e.g. London)~16h 38m~7h 50m
66.5° N (Arctic Circle)24h (midnight sun)~0h (polar night)

Day length swings harder the farther you are from the equator. Figures are approximate and vary slightly by exact location and year.

Dawn & dusk

Twilight explained: civil, nautical, and astronomical

Sunrise and sunset are single instants, but the sky does not switch from dark to light in one go. Twilight is the in-between time when the sun is below the horizon yet still lighting the sky. It is graded into three bands by how far the sun's centre has dropped below the horizon.

TwilightSun below horizonWhat it looks like
Civil twilight0° to 6°Bright enough for most outdoor activity; the brightest stars appear. This is everyday 'dawn' and 'dusk'.
Nautical twilight6° to 12°The horizon is still faintly visible at sea; sailors can take star sightings.
Astronomical twilight12° to 18°Almost fully dark; only the faintest sky glow remains. Past 18° is true night.

The sun's centre angle below the horizon defines each band. This calculator reports civil dawn and dusk — the 6° marks.

This tool reports the civil-twilight times — civil dawn (the start of usable morning light) and civil dusk (the end of usable evening light), computed with the sun 6° below the horizon (a zenith of 96°). In the New York example above, civil dawn is 4:51 AM — about 34 minutes before sunrise — and civil dusk is 9:04 PM, about 34 minutes after sunset.

Photography

The golden hour (and the blue hour)

The golden hour is the stretch of time just after sunrise and just before sunset when the sun is low — roughly from the horizon up to about 6° above it. The light travels through more atmosphere, scattering away the blue and leaving a warm, soft, golden glow with long shadows. It is the most prized light for photography, which is why so many people who look up sunrise and sunset times are really after the golden hour.

The blue hour bookends it: the cooler, even light while the sun is roughly 4° to 8° below the horizon — overlapping civil twilight, before sunrise and after sunset. As a rule of thumb, the golden hour runs from sunrise to about an hour after (and the reverse before sunset), but its true length depends on latitude and season — it lasts far longer near the poles, where the sun crawls along the horizon.

A quick estimate: the golden hour begins at sunrise and the blue hour begins around civil dawn. Use this calculator's sunrise and civil-dawn times as the anchors — at high latitudes both windows stretch out dramatically.
The extremes

Polar day and polar night (midnight sun)

Inside the Arctic and Antarctic Circles (beyond about 66.5° latitude), there are days when the sun never sets and days when it never rises. When the sun stays up for a full 24 hours it is the midnight sun (polar day); when it never climbs above the horizon it is the polar night.

Mathematically this is the case where the sunrise equation has no solution: cos(H) falls outside the range −1 to +1, so there is no hour angle at which the sun crosses the horizon. Rather than return a bogus time, the calculator detects this and flags polar day or polar night. For example, at 78° N (Svalbard) on the June solstice the calculator returns midnight sun — no sunrise or sunset, 24 hours of daylight — and on the December solstice it returns polar night.

How long these last grows with latitude: a few days of midnight sun right at the Arctic Circle, stretching to several months at the pole itself, where the sun rises once and sets once per year.
Read with care

How accurate are these sunrise and sunset times?

For most places the calculator lands within about a minute of official almanac times — the standard accuracy of the NOAA algorithm for latitudes up to ±72°. Beyond ±72°, where the sun skims the horizon at a shallow angle, results can be off by up to several minutes. A few real-world factors shift the actual moment you see the sun:

  • Elevation and terrain. The calculation assumes a flat horizon at sea level. Mountains or a high vantage point bring sunrise earlier and push sunset later.
  • Atmospheric conditions. Refraction is modelled with a standard value; unusual temperature or pressure bends the light a little differently.
  • Your exact coordinates. Even within one city, longitude differences move the clock — 1° of longitude is 4 minutes of time.
  • The day-length quirk. Because day length is sunrise-to-sunset subtracted, it can differ from another source by a minute or two even when both agree on the endpoints.
Methodology

How this calculator works and sources

This calculator implements the standard sunrise equation using the NOAA Global Monitoring Laboratory solar-position equations: it derives the solar declination and equation of time from the day of year, solves the hour angle at the sunrise/sunset zenith of 90.833° (and 96° for civil twilight), and converts to local time from your longitude and UTC offset. All maths runs in your browser from the latitude, longitude, date, and offset you enter — no location, clock, or data ever leaves your device.

NOAA Global Monitoring Laboratory — General Solar Position Calculations (solar declination, equation of time, hour angle).Sunrise equation — definition of the 90.833° zenith and the polar day/night cases.
Questions

Frequently asked questions about the free sunrise sunset calculator

A sunrise sunset calculator is a free online tool that helps you find sunrise, sunset, solar noon, day length, and civil twilight for any latitude, longitude, and date using the standard sunrise equation (NOAA algorithm), with polar day and polar night handled. The standard sunrise equation (NOAA solar-position algorithm). It finds the sun's declination for the date, solves the hour angle at the sunrise/sunset zenith of 90.833° (the sun's centre 0.833° below the horizon, for the disc radius plus refraction), then converts to local time from longitude and the UTC offset. It runs entirely in your browser with instant results and no sign-up.
Sunrise is found from the sunrise equation: using your latitude, the sun's declination for the date, and a horizon zenith of 90.833° (the sun's centre sits 0.833° below the true horizon, accounting for the solar disc's radius and atmospheric refraction), it solves the hour angle at which the sun reaches the horizon, then converts that to clock time from your longitude and time zone. Earth's atmosphere bends the light, so you see the sun a minute or two before it has geometrically risen.
Solar noon is the moment the sun crosses your local meridian and reaches its highest point in the sky — the exact midpoint between sunrise and sunset. It rarely lands on 12:00 on your clock, because your longitude within your time zone offsets it and the equation of time runs the sun up to ±16 minutes ahead of or behind a uniform clock through the year.
Because sunrise and sunset are symmetric around solar noon, not around clock noon, and the day length changes with the season. Only near the equinoxes is the day close to 12 hours; as the sun's declination shifts toward a solstice the day lengthens or shortens, so the gap between sunrise and sunset moves well away from 12 hours.
The three twilights are graded by how far the sun's centre is below the horizon: civil twilight is 0–6° below (bright enough for outdoor activity — everyday dawn and dusk), nautical twilight is 6–12° below (the horizon is still faintly visible at sea), and astronomical twilight is 12–18° below (almost fully dark). Past 18° is true night.
The golden hour is the period just after sunrise and just before sunset when the sun is low — roughly from the horizon up to about 6° above it. The light passes through more atmosphere, giving a warm, soft glow with long shadows that photographers prize. It lasts about an hour at mid-latitudes but stretches much longer near the poles, where the sun moves along the horizon slowly.
About

About this sunrise and sunset calculator

This sunrise sunset calculator runs entirely in your browser. The location and date you enter never leave your device — nothing is sent to a server, logged, or shared, and no geolocation or system clock is read. It applies the standard sunrise equation (NOAA solar-position algorithm) and updates instantly on every change.

Calculators Cloud offers 400+ free tools with no sign-up. The whole Everyday calculators shelf includes the day of the year, time zone, and day of the week tools alongside this one. Or browse the full calculator directory.

Want a calculator built for your business?

Customize any of our 400+ tools to match your brand, or commission a new one tailored to how your business actually calculates — pricing, payroll, quotes, anything. Deployed on your domain, math runs in your visitors' browsers.