Sunrise, Sunset, and Civil Twilight
NOAA solar-position algorithm: sunrise, sunset, civil / nautical / astronomical twilight, daylight minutes.
Example
You enter
- Latitude (deg) 40
- Longitude (deg) -105
- Date (YYYY-MM-DD) 2026-06-21
- Timezone offset (hr) -6
You get
- Declination 23.45 deg
- Daylight 901 min
- Sunrise 05:30
- Sunset 20:31
Details, formula, and sources
NOAA Solar Position Algorithm (SPA) calculates declination, equation of time, sunrise / sunset / civil / nautical / astronomical twilight from latitude / longitude / date.
NOAA Solar Calculator (USNO algorithm) by name; Reda & Andreas, 'Solar Position Algorithm for Solar Radiation Applications' (NREL/TP-560-34302, 2008) by name.
Free at gml.noaa.gov/grad/solcalc.
Geometry is not forecasting. Avalanche advisory and incident commander govern.
Field names used by the API: lat_deg, lon_deg, date_iso, tz_offset_hours, declination_deg, daylight_minutes, sunrise, sunset
- Atmospheric refraction −0.833° standard at horizonNOAA SPA