Home › Time & 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
date | date | default today | Calendar date (YYYY-MM-DD); the phase is evaluated at 12:00 UTC of that day. Defaults to the current UTC date. |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
phase_name | string | One of the eight phases: New Moon, Waxing Crescent, First Quarter, Waxing Gibbous, Full Moon, Waning Gibbous, Last Quarter, Waning Crescent. | |
illumination_percent | number | % | Fraction of the disc that is lit, from the phase angle: (1 − cos(2π · fraction)) / 2. |
age_days | number | days | Days since the last (mean) new moon at 12:00 UTC on the date. |
phase_fraction | number | Position in the lunation from 0 (new) through 0.5 (full) to 1 (next new). | |
is_waxing | boolean | true while illumination increases (new to full). | |
next_new_moon_date | date | Date (UTC) of the next mean new moon, ±1 day. | |
next_full_moon_date | date | Date (UTC) of the next mean full moon, ±1 day. | |
days_until_next_full_moon | number | days | From 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
- API:
GET https://tttkmbb.com/api/v1/calculate/moon-phase(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/moon-phase · Markdown: https://tttkmbb.com/time/moon-phase.md · JSON definition: https://tttkmbb.com/time/moon-phase.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="moon-phase" - OpenAPI operationId:
calculate_moon_phase - Freshness:
daily. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- USNO Astronomical Applications – Phases of the Moon (government)
- Lunar phase (Wikipedia) (reference)
- Lunar month – synodic month 29.530588 days (Wikipedia) (reference)
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
- Sunrise and Sunset Calculator — Sunrise and sunset for the same date and place.
- Julian Date Calculator — Julian Date used to count lunations.
- Days Until Calculator — Countdown to the next full moon date.