Methodology

How we calculate golden & blue hour

Golden Hour Now computes light windows directly from the Sun’s position rather than relying on broad averages. In practical terms, we track the Sun’s solar altitude—its angle above or below the local horizon—and mark the time ranges that photographers care about. The consensus in field practice is:

These boundaries are deliberately conservative so the times hold up across latitudes and seasons. We also align sunrise/sunset to the standard refraction-corrected altitude of about −0.833° for the solar center, which accounts for the Sun’s apparent radius and atmospheric bending at the horizon.

Diagram: solar altitude curve with golden hour (0–6°) and blue hour (0 to −8°) bands
We mark golden hour when the Sun sits 6–0° above the horizon, and blue hour when it’s 0 to −8° below it.

Algorithms (plain‑English summary)

Under the hood, we implement compact solar geometry functions similar to the well‑known NOAA/USNO approach. At a high level:

  1. Convert time to Julian days from the Unix epoch to get a stable time base for celestial math.
  2. Compute the Sun’s mean anomaly and ecliptic longitude with small periodic corrections.
  3. Derive the Sun’s declination (tilt relative to the equator) and the local sidereal time for the observer’s longitude.
  4. For any target altitude h (e.g., 6°, 0°, −8°), solve the hour angle where the Sun crosses that altitude given the observer’s latitude and the Sun’s declination.
  5. Translate crossings to clock times in the local timezone and group them into continuous windows: Blue AM → Golden AM → Daylight → Golden PM → Blue PM.

This method produces consistent, minute‑accurate times without calling heavy third‑party services for each query. Edge cases—very high latitudes, or days with no true night—are detected and handled with explanatory notes.

Libraries & implementation details

If we ever swap in a dedicated library (e.g., for more exotic twilight definitions), we’ll note that change here and in the changelog.

Data sources

Definitions & thresholds we use

Quality assurance

We validate in three layers:

  1. Numerical checks: Unit tests compare our sunrise/sunset and twilight crossings against trusted references for a global grid of cities across seasons. We allow small tolerances for refraction and elevation model differences.
  2. Field tests: We regularly shoot portraits, landscapes, and city blue hour and compare the perceived “sweet spot” with the predicted windows.
  3. Edge‑case audits: DST transitions, leap days, high‑latitude summers/winters, and locations with obstructed horizons (mountain valleys, dense skylines) get extra scrutiny and notes.

When results disagree with lived experience (e.g., persistent marine layer, wildfire smoke), we update the Guides with adaptation tips rather than hiding the times—so you can still plan and then adjust on location.

Known limitations

Reproducibility & transparency

Our goal is practical transparency: the thresholds above, a clear description of our algorithm, and visual cues in the UI so you can see what’s next at a glance. If you need additional detail—exact formulas, code snippets, or test fixtures—reach out; we’re happy to share more with educators and teams.