Twilight, sunrise & sunset calculator

Plan dark hours with fixed thresholds: sunrise/set -0.833°, twilight -6/-12/-18°.

Other languages 日本語 | English | 简体中文 | 繁體中文 | Español | Português (Brasil) | Bahasa Indonesia | Français | हिन्दी | العربية

Linked astronomy tools

Quick start (3 steps)

  1. Set location, date, and timezone.
  2. Optionally add horizon correction (degrees).
  3. Compute to get twilight events, night length, and the daily sun-altitude curve.

Inputs

Results

sunrise
sunset
Solar noon
Civil dawn / Civil dusk /
Nautical dawn / Nautical dusk /
Astronomical dawn / Astronomical dusk /
Astronomical night length (min)
Resolved TZ

Sun altitude chart

Definitions & notes

How to use the twilight and sun event calculator effectively

Enter the observing date, latitude, longitude, and timezone before reading sunrise, sunset, and twilight intervals. The results depend strongly on location and date, especially at high latitudes.

How it works

The calculator estimates the sun's altitude through the day and finds crossings for sunrise, sunset, and civil, nautical, and astronomical twilight thresholds. Horizon correction adjusts the effective horizon, so terrain or buildings can be modeled as a simplified offset.

When to use

Use this page for observing plans, photography timing, outdoor scheduling, and classroom checks. Near polar day or polar night, some events may not exist on the selected date; the page should be read as an event-status report, not just a timetable.

Common mistakes to avoid

Interpretation and worked example

Start with horizon correction set to zero. If a local obstruction matters, raise the horizon and compare how sunrise becomes later or sunset becomes earlier. If an event is missing, check whether the sun never crosses that altitude threshold on the selected date.

See also

FAQ

Why do sunrise/sunset sometimes show as None?

At high latitudes or near the solstice, the sun may not cross the horizon in one direction on that date. The script keeps the status explicit to avoid silent errors when no event exists.

What are civil, nautical, and astronomical twilight?

Twilight is categorized by sun altitude relative to the horizon. This calculator uses -6°, -12°, and -18° as practical thresholds for bright/blue/astronomical sky phases.

How does horizon correction affect results?

A positive horizon moves the reference line upward, so low-elevation events become harder to satisfy. This models terrain/building obstruction in a simplified way.

What should I enter first?

Start with the minimum required inputs shown above the calculate button, then keep optional settings at their defaults for a first pass. After getting a baseline, change one parameter at a time so you can explain which assumption moved the output.

How precise are the results?

The calculator keeps internal precision and rounds only for display. Small differences can still appear if another tool uses different constants, period conventions, or rounding rules. Align assumptions before comparing final values.