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.