Sunrise Calculator

Enter a date, latitude, longitude, and UTC offset to get sunrise time, sunset time, day length, and solar noon using the standard USNO sunrise/sunset equation.

Quick Facts

Sunrise equation
cos(H) = [cos(z) − sinφ·sinδ] / (cosφ·cosδ)
Solved for hour angle H using latitude φ, solar declination δ, and zenith angle z.
Standard zenith angle
z = 90.833° (90°50′)
Includes about 34′ of atmospheric refraction plus the sun's 16′ angular radius.
Solar declination range
±23.44°
Set by Earth's axial tilt; peaks at the June and December solstices.
Polar day / polar night
Above ≈66.5° latitude
The sun can stay up or down all day near the solstices, so no sunrise/sunset occurs.

Your Results

Calculated
Sunrise
-
Local time (UTC offset applied)
Sunset
-
Local time (UTC offset applied)
Day Length
-
Time between sunrise and sunset
Solar Noon
-
Sun's highest point, local time

Ready

Enter a date, location, and UTC offset, then press Calculate.

How the Sunrise Calculator Works

Sunrise happens the moment the sun's upper edge first crosses the visible horizon. Because Earth's axis is tilted about 23.44° and the atmosphere bends light near the horizon, the exact moment depends on your latitude, your longitude, the calendar date, and a small correction for atmospheric refraction. This calculator uses the standard sunrise/sunset equation from the U.S. Naval Observatory's Almanac for Computers to solve for that moment directly from your inputs.

The sunrise equation

The calculator first estimates the sun's ecliptic longitude and declination (δ) for the chosen date, then solves the hour-angle equation cos(H) = [cos(z) − sinφ·sinδ] / (cosφ·cosδ) for the local hour angle H, where φ is your latitude and z is the sun's zenith angle at the moment of rising (90.833° for a standard sunrise, which bakes in about 34′ of atmospheric refraction plus the sun's 16′ angular radius). Solving H for the moment before solar noon gives sunrise; solving for the moment after solar noon gives sunset. Subtracting the two gives day length, and averaging them gives solar noon.

Choosing your inputs

Latitude and longitude should be entered as decimal degrees, not degrees-minutes-seconds, with longitude positive for locations east of Greenwich and negative for west — for example, New York City is about 40.71°N, 74.01°W, entered as latitude 40.7128 and longitude -74.0060. The UTC offset is the number of hours your local clock differs from Coordinated Universal Time, including daylight saving if it is in effect on that date (U.S. Eastern Daylight Time is UTC−4, while Eastern Standard Time is UTC−5).

Accuracy and limits

This formula is accurate to within about a minute for most dates and latitudes, which is good enough for planning photography, hiking, or outdoor work. It does not account for local terrain, elevation, or unusual atmospheric conditions such as haze or temperature inversions, which can shift the visible sunrise by a few minutes. Above roughly 66.5° latitude (the Arctic and Antarctic Circles), the sun can stay continuously above or below the horizon for days or weeks around the solstices — the calculator reports these polar day and polar night cases directly instead of a clock time.

Frequently Asked Questions

What formula does this sunrise calculator use?
It uses the standard sunrise/sunset algorithm from the U.S. Naval Observatory's Almanac for Computers, which solves cos(H) = [cos(z) − sinφ·sinδ] / (cosφ·cosδ) for the sun's hour angle H at a zenith angle z of 90.833°, then converts that hour angle into a clock time using your longitude and UTC offset.
Why is the official sunrise zenith angle 90.833° instead of 90°?
A zenith angle of exactly 90° marks the moment the sun's geometric center crosses the horizon. Standard "sunrise" instead marks when the top edge of the sun's disk becomes visible, adjusted for how the atmosphere bends light near the horizon. Those two effects add about 50 arcminutes, or 0.833°, to the zenith angle used in the equation.
Why does the calculator say the sun never rises or never sets?
That happens at high latitudes, roughly above 66.5°N or S, near the summer or winter solstice, when the sun's daily path stays entirely above the horizon (a polar day, or midnight sun) or entirely below it (a polar night). The hour-angle equation has no real solution in those cases because the cosine term falls outside the range −1 to 1.
Does this calculator account for daylight saving time?
Not automatically — enter the UTC offset that matches your clock on the chosen date. For example, use -4 for U.S. Eastern Daylight Time in summer or -5 for Eastern Standard Time in winter.