CCalclabhub

Astronomy

How To Calculate The Moon Phase

The Moon's phase is a position in a repeating cycle rather than a property of the calendar, so finding it means counting days from a known new moon and dividing by the length of the cycle.

Quick Answer

age = (JDN - epoch) mod 29.530588853

JDN
Julian Day Number of the date at midnight
epoch
Julian Day Number of a reference new moon
age
Days elapsed since the most recent new moon
f
Phase fraction, from 0 at new moon to 0.5 at full moon
illumination
Fraction of the visible disc lit by the Sun

Convert the date to a Julian Day Number, subtract the Julian Day Number of a known new moon, and take the remainder after dividing by 29.530588853 days. On 18 October 2026 that remainder is 7.2751 days, a phase fraction of 0.2464 and about 48.86 percent illuminated, which is first quarter.

What Is The Moon Phase?

The phase of the Moon is the fraction of its Earth-facing side that the Sun lights up, and it changes because the Moon orbits the Earth roughly every 29.53 days. That period is the synodic month, the time from one new moon to the next, and it is the cycle the calendar of phases is built on.

The Moon does not emit light; it reflects sunlight. Half of the Moon is always lit, and the phase we see is the portion of that lit half facing us. At new moon the lit half faces away, at full moon it faces us, and the intermediate phases are the geometry in between.

The synodic month is longer than the time the Moon takes to orbit the Earth once, which is about 27.32 days. The extra two days exist because the Earth moves around the Sun while the Moon goes around the Earth, so the Moon has to travel a little further to line up with the Sun again.

A Julian Day Number turns a calendar date into a single running count of days, which makes the arithmetic of a repeating cycle simple. The Julian Day Number for 18 October 2026 is 2461332. Subtracting a reference new moon gives the number of days since that new moon, and the remainder after dividing by 29.53 gives the Moon's age.

The reference new moon most often used is the one on 6 January 2000, at Julian Day Number 2451550.1. That decimal part matters: the new moon happened partway through the day, and treating it as exactly midnight would shift every later result by a fraction of a day.

Dividing the age by the synodic month gives the phase fraction, which runs from 0 at new moon through 0.25 at first quarter and 0.5 at full moon, back to 1 at the next new moon. The phase name is just a band of that fraction, and the eight familiar names divide the cycle into equal eighths.

Illumination follows from the phase fraction through a cosine. The fraction is turned into an angle by multiplying by a full turn, and one minus the cosine of that angle, halved, gives the illuminated percentage. It is 0 at new moon, 1 at full moon, and close to 0.5 at the quarters.

This is a mean-phase model. It treats the Moon's orbit as a circle travelled at a constant rate, and the real orbit is an ellipse, so the true phase can differ from the calculated one by a few hours to roughly half a day. For planning an evening walk that is irrelevant; for timing an eclipse it is not.

The phase is a global property of the Earth-Moon-Sun geometry, so everyone on Earth sees essentially the same phase on the same date. What differs with location is the Moon's position in the sky, its rise and set times, and whether the disc is tilted, which is why the crescent can look like a smile from one hemisphere and a bowl from the other.

Because the cycle is close to but not exactly 29.5 days, the phases drift through the calendar rather than landing on the same dates each month. Every so often that drift squeezes two full moons into a single calendar month, and the second of the pair is what is loosely called a blue moon.

Formula

age = (JDN - epoch) mod 29.530588853

Subtracts the Julian Day Number of a reference new moon and takes the remainder after dividing by the length of the synodic month. The remainder is the Moon's age in days.

SymbolMeaning
JDNJulian Day Number
epochReference new moon
ageMoon age

f = age / 29.530588853

Turns the age into a position in the cycle. Zero is new moon, 0.25 is first quarter, 0.5 is full moon and 1 is the next new moon.

SymbolMeaning
ageMoon age
fPhase fraction

illumination = (1 - cos(2 pi f)) / 2

Converts the phase fraction into the fraction of the disc that is lit. The cosine makes the change slow near full and new moon and fast through the quarters.

SymbolMeaning
fPhase fraction
illuminationIlluminated fraction

How To Calculate The Moon Phase

  1. 1

    Convert the date to a Julian Day Number

    The Julian Day Number is a single running count of days, which is what makes a repeating cycle easy to handle. The date 18 October 2026 has a Julian Day Number of 2461332. Using the local date rather than the date at Greenwich shifts the result slightly.

  2. 2

    Subtract the reference new moon

    Take the Julian Day Number of a known new moon, such as 2451550.1 for 6 January 2000, away from the date in question. For 18 October 2026 that gives 9781.9 days since the reference new moon.

  3. 3

    Reduce modulo the synodic month

    Divide by 29.530588853 and keep the remainder. 9781.9 days is 331 whole lunar months plus 7.2751 days, so the Moon is 7.2751 days old. The whole months are discarded because the cycle repeats.

  4. 4

    Divide the age by the cycle length

    7.2751 divided by 29.530588853 is 0.2464, a phase fraction just short of the 0.25 that marks first quarter. The fraction, not the age, is what the phase names and the illumination are derived from.

  5. 5

    Convert the fraction to an illuminated percentage

    Multiply the fraction by a full turn and take one minus the cosine of that angle, halved. A fraction of 0.2464 gives about 48.86 percent illuminated, which rounds to the familiar half-lit first quarter Moon.

Examples

Example 1: First quarter on 18 October 2026

Date
18 October 2026
Reference new moon
6 January 2000
Synodic month
29.530588853 days
StepCalculationResult
Days since the reference new moon2461332 - 2451550.19781.9
Completed lunar months9781.9 / 29.530588853331.2464
Moon age in days9781.9 - 331 x 29.5305888537.2751
Phase fraction7.2751 / 29.5305888530.2464

Result: The Moon is 7.2751 days old on 18 October 2026, a phase fraction of 0.2464, which is about 48.86 percent illuminated and puts it at first quarter.

Example 2: A full moon on 26 October 2026

Date
26 October 2026
Reference new moon
6 January 2000
Synodic month
29.530588853 days
StepCalculationResult
Days since the reference new moon2461340 - 2451550.19789.9
Completed lunar months9789.9 / 29.530588853331.5173
Moon age in days9789.9 - 331 x 29.53058885315.2751
Illuminated percentage0.9971 x 10099.71

Result: Eight days after first quarter the Moon reaches an age of 15.2751 days, which is 99.71 percent illuminated and therefore a full moon.

Example 3: A new moon on 11 October 2026

Date
11 October 2026
Reference new moon
6 January 2000
Synodic month
29.530588853 days
StepCalculationResult
Days since the reference new moon2461325 - 2451550.19774.9
Completed lunar months9774.9 / 29.530588853331.0093
Moon age in days9774.9 - 331 x 29.5305888530.2751
Illuminated percentage0.0009 x 1000.09

Result: A week and a half before full moon the Moon is only 0.2751 days old, which is 0.09 percent illuminated and counts as a new moon.

Calculator

Prefer a full-width tool? Open the The Moon Phase calculator page.

Common Mistakes

  • Reading the phase as exact rather than mean

    The mean-cycle formula treats the orbit as a circle travelled at a constant rate, while the real orbit is an ellipse. The calculated phase can be out by a few hours, and near the quarters that is enough to shift which day the name changes.

  • Using a thirty day month for the cycle

    The synodic month is 29.530588853 days, not 30. Rounding it to a month introduces about half a day of drift per cycle, which after a year is several days and enough to put the phase name on the wrong day.

  • Ignoring the time zone

    The Julian Day Number depends on the moment, not just the date. A date entered without a time and place is implicitly taken at midnight in one time zone, and the true phase at that instant may fall on the neighbouring day.

  • Expecting the phases to repeat on the same dates

    The cycle is 29.53 days, so the phases slide forward through the calendar by roughly a day each month. Phases do not fall on fixed dates, which is also why a blue moon appears every couple of years.

  • Assuming the Moon is only visible at night

    The Moon is above the horizon during the day for roughly half of every cycle. A first quarter Moon rises around noon and sets around midnight, so it is plainly visible in the afternoon sky.

  • Confusing the synodic month with the sidereal month

    The synodic month of 29.53 days is the time between two new moons, which is what the phases follow. The sidereal month of 27.32 days is the time to orbit the Earth once relative to the stars, and using it shifts every phase by about two days.

FAQ

How long is a lunar cycle?

The synodic month, from one new moon to the next, averages 29.530588853 days. Individual cycles vary by up to about half a day because the Moon's orbit is elliptical, which is why the mean value is used for calculation.

Why is the calculated moon phase only approximate?

The formula assumes a circular orbit and a constant orbital speed. The real orbit is elliptical and the speed varies, so the true phase can differ from the calculated one by a few hours, and by up to about half a day near the quarters.

What is the difference between the synodic and sidereal month?

The synodic month is 29.53 days and measures new moon to new moon, which is the cycle the phases follow. The sidereal month is 27.32 days and measures one orbit relative to the stars. The extra two days account for the Earth's own motion around the Sun.

Why does the Moon rise at a different time each day?

Because it moves about 13 degrees eastward along its orbit each day while the Earth rotates. The Earth has to turn a little further to bring the Moon back to the same point in the sky, which delays moonrise by roughly 50 minutes each day.

What is a blue moon?

Popularly, the second full moon in a single calendar month. Because the synodic month is slightly shorter than most calendar months, this happens every two to three years. The Moon does not actually change colour.

Can the Moon be seen during the day?

Yes. The Moon is above the horizon for about half of every 24 hour period, so it is visible in daylight on many days. It is easiest to spot near first quarter, when it rises around midday and is well clear of the Sun.

References

  1. [1]Wikipedia, Lunar phase — https://en.wikipedia.org/wiki/Lunar_phase
  2. [2]Wikipedia, Lunar month — https://en.wikipedia.org/wiki/Lunar_month
  3. [3]Wikipedia, Julian day — https://en.wikipedia.org/wiki/Julian_day