piapia123
en

Sunrise, Sunset & Moon

Convert

Everything runs locally in your browser — nothing is uploaded

Input
Drop a file here to load its contents
Output

Give a place and a date, and get that day’s solar times and the state of the moon. Real time zones, not an offset you have to look up. This reuses the site’s IANA time zone data, so daylight saving is applied — London shows BST (+01:00) in June and GMT (+00:00) in December. The offset is taken at local noon, not UTC midnight, because the clocks usually change in the small hours: taking it at UTC midnight would put sunrise an hour out on exactly those days. ⚠️ Stated precision, no false promise of seconds: · Sunrise and sunset use the NOAA algorithm, about ±1 minute at mid latitudes. More importantly it assumes an ideal horizon — a mountain, a building or a valley can shift what you actually see by ten minutes or more. · The moon phase uses a low-precision lunar longitude, with roughly 1–2 percentage points of error in illumination. It answers “is tonight a quarter or a full moon”, not “at what minute does it culminate”. ⚠️ Polar day and polar night are named. At high latitudes there are days when the sun never rises or never sets, and the result says so rather than printing a plausible-looking time. Everything runs in your browser.

Features

  • Sunrise, solar noon, sunset and day length
  • ⚠️ The time zone offset is taken at local noon, so the day the clocks change is not an hour out
  • Three twilights: the start and end of civil (−6°), nautical (−12°) and astronomical (−18°)
  • ⚠️ Blue hour and golden hour, each with its morning and evening window. Blue hour is the sun between 4° and 6° below the horizon (the last skylight, street lamps already on); golden hour runs from −4° to +6° (warmer light, longer shadows, softer than midday) — both are windows photographers actually work in
  • Their boundaries are printed in the label (`-4° to +6°`) because they are a convention rather than a physical law: published upper bounds range from +4° to +6°, so when a result disagrees with another tool the numbers show where
  • ⚠️ Under polar day or polar night those two rows carry a sentence instead of two plausible-looking fake times
  • ⚠️ Polar day and polar night are stated plainly, with no plausible-looking fake time
  • Moon: phase name (eight phases), illumination, age and elongation
  • Any date, for looking up past or future sunrises
  • Coordinates accept `39.9, 116.4`, `39.9 116.4`, or a form with letters such as `39.9N 116.4E`
  • ⚠️ The result states the algorithm and its accuracy (±1 minute, ideal horizon, 1–2 points on the moon)
  • Runs entirely in your browser; no network requests at all

How to use

  1. Enter latitude and longitude (minus for south and west)
  2. Pick a date and a time zone
  3. The result gives the solar times, three twilights and the moon phase

FAQ

Why is the computed sunrise different from what I see?
Two reasons. First, the algorithm assumes an ideal horizon — perfectly flat and unobstructed. A mountain or a building to your east delays the sun you actually see by anything from ten minutes to much longer, and standing in a valley delays it further. Second, the algorithm itself carries about ±1 minute of error at mid latitudes, more near the poles. Getting “the time I see the sun from here” needs horizon data, not a better formula.
Why is the day not exactly 12 hours at the equinox?
Because at the equinox the day is about 12 hours 7 minutes everywhere. The extra seven minutes come from two things: the atmosphere refracts sunlight by about 34 arcminutes, so the sun is already visible while still geometrically below the horizon, and the sun has an apparent radius of about 16 arcminutes, so sunrise is counted when its upper limb touches the horizon while its centre is still below. Together they make the defining zenith angle 90.833° rather than 90°, which always lengthens the day slightly.
How is the time zone offset chosen, and is daylight saving applied?
It is, and the offset is taken at local noon rather than UTC midnight. That choice is practical: the clocks usually change in the small hours, so at UTC midnight on those days the old offset still applies and sunrise would display an hour out — with nothing on screen to suggest a time zone problem. Local noon is always already in the new offset.
Why no moonrise and moonset?
Because the moon moves much faster against the sky than the sun (about 13° per day versus 1°), so its rising time slips roughly 50 minutes later each day, and more near perigee. Doing it properly means stepping the moon’s position rather than solving for an hour angle in one shot, which is a different order of computation. This tool gives the phase, where a low-precision series is enough.
Can I use the phase to work out lunar calendar dates?
The direction is right but not the conversion. A lunar month begins on the day of the new moon (when the elongation is zero), and this tool gives the elongation and illumination for the date you chose. You can use it to find the days around a new moon, but the lunar calendar has its own rules (time zone, leap months), so deriving calendar dates from here would not be reliable.

Related tools