Moon Phase Software

Moon phase calculation method and accuracy

The tools use Astronomy Engine 2.1.19 for astronomical state and event calculations. A named IANA time zone is used only to map a local civil input to an unambiguous UTC instant and to format output. The underlying event instant is independent of display zone.

Input and time model

  1. The date and 24-hour time are parsed as calendar fields, not as browser-local text.
  2. The IANA zone applies the historical offset rules available to the Temporal time-zone implementation.
  3. Ambiguous and nonexistent wall-clock times at daylight-saving transitions are rejected.
  4. The resulting instant is converted to UTC before it reaches the astronomy engine.

The public interface supports local years 1900 through 2100.

Moon state

Phase angle is the difference in geocentric ecliptic longitude between the Moon and Sun. The conventional principal values are 0° for new Moon, 90° for first quarter, 180° for full Moon, and 270° for last quarter. Illumination is taken from the engine's Moon illumination calculation.

Lunar age is elapsed UTC time since the preceding calculated new Moon. The mean synodic month constant (29.530588853 days) is retained only as a documented reference value; age is not inferred by linearly scaling the displayed phase angle.

For each principal longitude, the calculator searches backward and forward from the selected instant. Previous events must be strictly before the input and next events strictly after it. The monthly view enumerates quarter events and assigns them to dates after converting them to the selected time zone.

Validation record

Automated fixtures compare every primary phase published in the 2026 United States Naval Observatory table, whose values are rounded to the minute. The acceptance tolerance is 120 seconds. Separate tests cover at least 200 distributed instants for range, angle, illumination, lunar-age, event-order, and time-zone invariants.

This test set verifies the software contract and one external event year; it does not claim observational certainty for weather, visibility, topocentric horizon effects, moonrise, or moonset.

Rounding and limitations

Return to the exact-date calculator, inspect the Desktop Lunar Calendar, or review the sources.