Calculate sunrise and sunset

Estimate apparent sunrise, sunset, solar noon, and daylight duration in UTC from coordinates and date.

freeworks offlinenothing uploaded
ToolSunrise and Sunset Calculator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

A Julian-century model yields equation of time and solar declination, then latitude and the standard 90.833° apparent zenith determine the hour angle. Longitude shifts UTC solar noon and the two crossings supply sunrise and sunset.

  • UTC avoids inventing a legal timezone from coordinates alone.
  • The 90.833° zenith incorporates conventional solar-radius and atmospheric-refraction allowances.

Worked example

The equator near an equinox
Input
											Latitude: 0
Longitude: 0
Date: 2026-03-20
										
Output
												Sunrise: 06:04 UTC
Sunset: 18:11 UTC
Solar noon: 12:07 UTC
Day length hours: 12.11
Note: 
											

When to use this

Photography plans estimate daylight boundaries, observation logs compare day length, and high-latitude trips check for midnight sun or polar night.

Edge cases

  • An hour-angle cosine above 1 means polar night and no horizon crossing.
  • A value below -1 means midnight sun and 24 reported daylight hours.
  • Terrain, elevation, pressure, temperature, and unusual refraction can move the observed event away from this estimate.

References