Skip to main content

Free Sunrise & Sunset Calculator for Any Location

Calculate sunrise, sunset, solar noon, day length, and civil, nautical, and astronomical twilight for any location and date using the NOAA solar algorithm. Runs entirely in your browser.

Written & reviewed by Helperzy Editorial Team · Updated July 2026

NOAA algorithmTwilight timesAny coordinatesPolar-safeFree

Sunrise

05:25

Sunset

20:31

Solar noon

12:58

Day length 15h 06m

Twilight (local time)

Civil (−6°)begins 04:52 · ends 21:04
Nautical (−12°)begins 04:09 · ends 21:47
Astronomical (−18°)begins 03:19 · ends 22:37

100% Private

Times use the NOAA solar algorithm computed in your browser (no API). Your coordinates never leave your device.

How to Use Sunrise & Sunset Calculator

1

Set your location

Enter latitude and longitude directly using east-positive longitude, or search the built-in city list to fill the coordinates automatically. You can also use the optional geolocation button, which asks permission before reading your device's position.

2

Pick a date

Choose the date you want times for. The calculator derives the Sun's position for that day and computes sunrise, sunset, solar noon, day length, and civil, nautical, and astronomical twilight, all from the NOAA solar algorithm in your browser.

3

Read the results and month table

Review the event times and day length, then scroll the month table to plan ahead across several dates. Polar locations show midnight sun or polar night clearly instead of an invalid time, so the output is always meaningful.

Sunrise, Sunset, and Twilight from the NOAA Solar Algorithm

A sunrise and sunset calculator works out the clock times the Sun crosses the horizon at a given place on a given day, plus the softer boundaries of twilight before dawn and after dusk. Photographers chasing golden hour, hikers planning to be off a ridge before dark, gardeners tracking daylight, and astronomers waiting for a truly dark sky all need these times for a specific latitude and longitude rather than a vague city average. This tool computes them with the NOAA solar algorithm entirely in your browser, with no external service, and reports sunrise, sunset, solar noon, day length, and the three tiers of twilight. The method is pure astronomy, not a lookup. From the date it derives the Julian day and Julian century, then the Sun's geometric mean longitude and anomaly, the equation of centre, and the apparent longitude. Combined with the obliquity of the ecliptic these give the solar declination and the equation of time. For a target zenith angle it then solves the hour angle from the relation cos(H) = cos(zenith) / (cos(latitude)·cos(declination)) − tan(latitude)·tan(declination). Solar noon in minutes UTC is 720 minus four times the longitude minus the equation of time; sunrise is solar noon minus four minutes per degree of hour angle, and sunset is solar noon plus the same. The official sunrise zenith is 90.833 degrees, which builds in the Sun's half-width and atmospheric refraction; civil, nautical, and astronomical twilight use 96, 102, and 108 degrees. Accuracy was checked against the NOAA Solar Calculator and timeanddate.com before shipping. For New York on the June solstice the tool gives sunrise 05:25 and sunset 20:31, within a minute of the published 05:24 and 20:31. London on the December solstice gives 08:04 and 15:53 against 08:03 and 15:53. Delhi on the June solstice gives 05:24 and 19:22 against 05:23 and 19:21. Sydney at the March equinox returns a day length of 12 hours 8 minutes, close to the twelve hours an equinox should produce anywhere on Earth. These agree to about a minute, which is the documented precision of the NOAA single-pass algorithm, and the pattern held across a solstice at high, mid, and tropical latitudes as well as an equinox, so the same code can be trusted for a polar research station and a city near the equator alike. A landscape photographer enters precise coordinates for a viewpoint and reads solar noon to avoid harsh overhead light, then uses sunset and the end of civil twilight to bracket the blue hour. A sailor checks nautical twilight, the window when the horizon is still visible for star sights. A stargazing group waits for astronomical twilight to end, the point at which the sky is fully dark. A trekker in the Himalayas enters a high-altitude latitude to know exactly how much daylight a route allows. Because the calculator takes raw latitude and longitude, it works for a trailhead or a summit, not just the nearest named town. The honest limitations matter. Above the Arctic and Antarctic circles the Sun can stay up or down for the whole day; the tool detects this from the hour-angle equation and prints "no sunset (midnight sun)" or "no sunrise (polar night)" rather than a meaningless number. Times can differ from timeanddate by up to about a minute because that site adds a small refraction refinement, and the NOAA method is most accurate for the years roughly 1900 to 2100. Enter longitude as east-positive and west-negative, which the built-in city list already does for you. Everything is calculated locally in your browser; your coordinates and any use of geolocation stay on your device and are never uploaded.

Sunrise & Sunset Calculator Formula & Method

NOAA solar calculator (angles in radians): solar declination δ = asin(sin ε · sin λ_app) hour angle: cos H = cos(zenith) / (cos φ · cos δ) − tan φ · tan δ solar noon (min UTC) = 720 − 4·longitude − equation_of_time sunrise = solar noon − 4·H(deg) sunset = solar noon + 4·H(deg) zeniths: sunrise/sunset 90.833°, civil 96°, nautical 102°, astronomical 108° φ = latitude (N+), longitude E+, day length = 8·H minutes. Source: NOAA GML Solar Calculator.

Examples: Sunrise & Sunset Calculator

Input

New York (40.7128, −74.006), 2024-06-21, UTC−4

Result

Sunrise 05:25, sunset 20:31, day length ~15h06

NOAA algorithm; matches timeanddate's published 05:24 / 20:31 to within a minute.

Input

London (51.5074, −0.1278), 2024-12-21, UTC+0

Result

Sunrise 08:04, sunset 15:53

Winter solstice; agrees with the published 08:03 / 15:53 to within a minute.

Input

Tromsø (69.65, 18.96), 2024-06-21

Result

No sunset (midnight sun)

cos H < −1 at this Arctic latitude, so the Sun never sets; the tool reports midnight sun instead of NaN.

Frequently Asked Questions – Sunrise & Sunset Calculator

They use the NOAA solar algorithm and agree with the NOAA Solar Calculator and timeanddate.com to within about a minute for typical latitudes. For example, New York on the June solstice returns sunrise 05:25 and sunset 20:31 against a published 05:24 and 20:31.