HomeTime & Geography › Moon Phase Calculator

Moon Phase Calculator

Estimates the Moon's phase name, illuminated fraction and age (days since new moon) for a calendar date from the mean synodic month of 29.530588853 days counted from the new moon of 2000-01-06 18:14 UTC, plus the dates of the next new and full moons.

When to use

You need the approximate lunar phase for a date, e.g. for night photography, fishing or tide context, gardening calendars or historical dates.

Do not use when: You need phase times to the hour, eclipse predictions or moonrise/moonset (use an ephemeris such as USNO or JPL Horizons); for daylight times use sunrise-sunset.

Formula

age = (JD(date 12:00 UTC) − 2451550.2597) mod 29.530588853; fraction = age / 29.530588853; illumination = (1 − cos(2π · fraction)) / 2; phase index = floor(((fraction + 1/16) mod 1) × 8)

Uses the mean lunation only; the true phase can lead or lag the mean by up to about 14 hours because of the Moon's elliptical orbit, so phase names and dates are accurate to about ±1 day and illumination to roughly ±10 percentage points near the quarters. Each named phase spans one eighth of the cycle (±1/16 around the exact event).

Inputs

ParameterTypeUnitRequiredDescription
datedatedefault todayCalendar date (YYYY-MM-DD); the phase is evaluated at 12:00 UTC of that day. Defaults to the current UTC date.

Outputs

OutputTypeUnitDescription
phase_namestringOne of the eight phases: New Moon, Waxing Crescent, First Quarter, Waxing Gibbous, Full Moon, Waning Gibbous, Last Quarter, Waning Crescent.
illumination_percentnumber%Fraction of the disc that is lit, from the phase angle: (1 − cos(2π · fraction)) / 2.
age_daysnumberdaysDays since the last (mean) new moon at 12:00 UTC on the date.
phase_fractionnumberPosition in the lunation from 0 (new) through 0.5 (full) to 1 (next new).
is_waxingbooleantrue while illumination increases (new to full).
next_new_moon_datedateDate (UTC) of the next mean new moon, ±1 day.
next_full_moon_datedateDate (UTC) of the next mean full moon, ±1 day.
days_until_next_full_moonnumberdaysFrom 12:00 UTC on the date to the next mean full moon.

Example

2026-08-12 (new moon and total solar eclipse): {"date":"2026-08-12"}{"phase_name":"New Moon","is_waxing":false,"next_full_moon_date":"2026-08-28"}

2026-03-03 (full moon and total lunar eclipse): {"date":"2026-03-03"}{"phase_name":"Full Moon","illumination_percent":99.8,"age_days":14.36,"is_waxing":true}

GET https://tttkmbb.com/api/v1/calculate/moon-phase?date=2026-08-12

Machine access

Sources

FAQ

How accurate is the phase?

Within about one day: the mean synodic month ignores the orbital perturbations that shift real new and full moons by up to ±14 hours. USNO's Phases of the Moon table gives exact times.

Is the illumination the same everywhere on Earth?

Yes; the illuminated fraction depends only on the Sun–Earth–Moon geometry. Only the orientation of the lit side differs between hemispheres (the waxing side appears on the right in the north and on the left in the south).

Related calculators