Sunrise and Sunset Calculator

Calculate sunrise, sunset, solar noon, day length, civil and nautical twilight, golden hour and the sun's compass direction for any latitude, longitude and date, shown in the time zone you choose.

Last updatedHow we build & check our tools
Select a date
Enter coordinates

Enter coordinates and date to calculate sunrise & sunset times

Location & Date

Enter coordinates, select a date, and choose your timezone.

Live calculation

Current Settings

Summary of your selected location and timezone.

LocationCoordinates

40.7128° N, 74.0060° W

Selected Date

Select a date

Timezone

New York (EST/EDT)

World Cities Quick Reference

Sunrise and sunset times for major cities worldwide on the selected date.

15 cities
City
Sunrise
Sunset
TZ
Tip:Times are calculated for each city's exact coordinates and displayed in their local timezone.

How the sunrise and sunset times are calculated

This calculator uses the open-source SunCalc library, which implements the standard low-precision solar position formulas (the same family of equations, derived from Jean Meeus's Astronomical Algorithms, behind the NOAA Solar Calculator). From the date and your coordinates it computes the sun's declination and the equation of time, finds solar noon (the moment the sun crosses your meridian), and then solves for the times before and after noon when the sun's centre reaches a set angle below the horizon.

For sunrise and sunset that angle is −0.833°. It combines two corrections: about 0.57° for atmospheric refraction, which bends sunlight over the horizon so the sun appears before it is geometrically up, and about 0.27° for the sun's radius, because sunrise is defined by the upper edge of the disc appearing, not its centre. Without those corrections, sunrise would be reported a few minutes late and sunset a few minutes early.

  • Sunrise / sunset: sun centre at −0.833°.
  • Civil dawn / dusk: sun centre at −6°.
  • Nautical dawn / dusk: sun centre at −12°.
  • Golden hour: the period when the sun is between the horizon and 6° above it.
  • Day length: sunset minus sunrise; max altitude: the sun's elevation at solar noon.

All events are calculated as absolute moments in UTC and then formatted in the time zone you select, using the IANA time zone rules, so daylight saving time is applied automatically for that date.

Entering coordinates and reading the results

Enter latitude and longitude in decimal degrees. North and east are positive; south and west are negative. New York is 40.7128, −74.0060 and Sydney is −33.8688, 151.2093. If you have degrees, minutes and seconds, convert with degrees + minutes/60 + seconds/3600 and add the minus sign for S or W. Latitude must be between −90 and 90 and longitude between −180 and 180, and the date can be up to 100 years before or after the current year.

The time zone controls only how times are displayed, not when the sun rises. Choose the zone used by clocks at the location. If you pick a different zone, for example checking a Tokyo sunrise in New York time, the moment is the same but the clock time shifts, and a sunset can appear on the following calendar day.

For New York on 21 June 2026 the calculator gives roughly:

  • Nautical dawn 4:10 AM, civil dawn 4:52 AM, sunrise 5:26 AM.
  • Sunset 8:31 PM, a day length of about 15 hours 6 minutes.
  • On 21 December 2026 the same place gets sunrise at 7:17 AM and sunset at 4:32 PM, about 9 hours 15 minutes of daylight.

The Sun Position panel shows the compass bearing of sunrise and sunset (east is 90°, south 180°, west 270°) and the sun's highest altitude. Around the June solstice in the Northern Hemisphere, the sun rises well north of due east and sets north of due west. The major-cities table repeats the calculation for 15 cities, each shown in its own local time.

Polar night, midnight sun and all-night twilight

Close to the poles the sun can stay above or below the −0.833° threshold for the whole day, so there is no sunrise or sunset to report. For latitudes of 60° or more, when neither event exists the calculator checks the sun's altitude at solar noon. If the sun is above the horizon it reports Midnight Sun and a day length of 24 hours; if it is below, it reports Polar Night and a day length of zero. The cities table marks those cases instead of showing blank times.

Example: Tromsø, Norway (69.65°N) on 21 December has no sunrise at all, but the sky is not fully dark. The sun still climbs to within 6° of the horizon around midday, so the calculator reports civil dawn at about 9:32 AM and nautical dawn at about 7:47 AM local time on a day with no sunrise.

A related case happens further south in summer. In Reykjavik (64.15°N) on 21 June the sun rises at about 2:56 AM and sets just after midnight, but it never drops 6° below the horizon, so there is no civil dawn or dusk that night. The twilight cards show N/A in that situation. It means the twilight never ends, not that the calculation failed.

  • N/A for civil or nautical twilight: the sun does not go that far below the horizon on that date.
  • Sunset after midnight: possible at high latitudes in summer or when displaying a distant time zone.

How accurate the times are and what can change them

For locations between the polar circles, the formulas are typically within about a minute of published almanac times, and results are rounded to the minute. Differences you may notice against a weather app or a printed table usually come from the observing conditions rather than the maths:

  • Elevation: the calculation assumes an observer at sea level with a flat horizon. From a mountain top or a high floor you see the sun earlier and longer; in a valley the terrain can hide it for many minutes.
  • Refraction varies: the −0.833° value assumes average temperature and pressure. Very cold air or temperature inversions can bend light more, shifting sunrise and sunset by a minute or two, and more near the poles.
  • Grazing angles at high latitude: where the sun crosses the horizon at a shallow angle, a tiny angular error becomes several minutes, so treat times above about 60° latitude as approximate.
  • Coordinate precision: one degree of longitude moves sunrise by about four minutes, so two decimal places (about 1 km) are plenty.

The golden-hour and twilight times are useful for planning photography, outdoor work, fishing, hiking and prayer or fasting schedules, but for legal or safety purposes such as aviation lighting rules or hunting hours, use the official source your regulator specifies. For a scientific cross-check, the NOAA Solar Calculator and the US Naval Observatory tables use the same −0.833° definition of sunrise and sunset.

Frequently Asked Questions

Common questions about the Sunrise and Sunset Calculator

Sunrise is the moment the upper edge of the sun appears on a flat, sea-level horizon. The calculator finds when the centre of the sun is 0.833° below the horizon: about 0.57° of that allows for atmospheric refraction and about 0.27° for the sun's radius. Sunset uses the same angle in the evening. This matches the definition used by NOAA and most almanacs.

Sources & References

Solar Position Calculation

Sunrise and sunset times are computed with the SunCalc library's solar position formulas, using the standard -0.833° solar altitude for refraction and the sun's radius. Results can be cross-checked against NOAA's Solar Calculator and may differ by a minute or two.