sunupsundown.site

About

How the times are calculated

Method

Positions of the Sun come from the open-source Astronomy Engine library, which is validated against JPL ephemerides. For each place we search for the exact instants of each event within the local calendar day, using the place's IANA time zone, so days when the clocks change are 23 or 25 hours long and an event is never borrowed from a neighbouring day. Times are stored as UTC instants and only converted to local time for display.

Definitions

Sunrise and sunset are when the upper edge of the Sun touches the apparent horizon, with standard atmospheric refraction, which is the convention used by almanacs: the Sun's centre is about 0.83° below the geometric horizon. Civil, nautical and astronomical twilight begin or end when the centre of the Sun is 6°, 12° and 18° below the horizon. Golden hour is shown as the time between sunrise (or sunset) and the Sun reaching 6° above the horizon. Solar noon is the Sun's meridian transit. At high latitudes a day can have no sunrise, no sunset, or neither; those days are labelled rather than given invented times.

Accuracy

Against the U.S. Naval Observatory's published tables, our times agree to within a minute for every location we check, including Alaska, Hawaii, Guam and the days around the start and end of polar day. The remaining uncertainty is the real world: hills on the horizon, altitude above sea level and weather can shift what you see by several minutes. Coordinates are a representative point for each community, not your doorstep.

Places and data sources

United States place names and coordinates come from the U.S. Census Bureau's 2026 Gazetteer files: incorporated places, census-designated places, and the towns and townships of the states where those are the local governments. Each page shows the Census internal point for the community, except where that point lies far from the community itself (San Francisco's includes the Farallon Islands); there the GeoNames point is used instead. Unincorporated communities from the USGS Geographic Names Information System, including the Pacific and Caribbean territories, are planned.

Places outside the United States come from the GeoNames geographical database, which is licensed under a Creative Commons Attribution 4.0 License. Names, coordinates, populations and divisions are reproduced from it; we transliterate URLs and assign time zones ourselves, and list which countries are live on their own pages. Time zones everywhere are assigned offline from the timezone-boundary-builder project, which is derived from OpenStreetMap data © OpenStreetMap contributors (ODbL).

API

The same calculations are available as JSON. The API is documented with OpenAPI at /api/v1/docs on the API host; day, month and year endpoints exist for every published place, for example /api/v1/us/fl/dunedin/day?date=2027-06-21. All instants are ISO-8601 UTC.

How sunrise and sunset times are calculated · sunupsundown.site