Moon Phase Widget

Add a Moon phase widget to your website. It draws the Moon as it looks tonight, or on any date you pick, and gives the illuminated percentage, the Moon's age and the dates of the next full and new moon.

Time & Date Tool Runs in your browser Free · no ads

Customize your widget

Theme
Auto follows the visitor's light/dark setting.
Style
Attribution on your page
Optional and entirely your choice. The exact line is shown in the code below; it links to the tool with rel="nofollow".
More options
Starting values
Leave blank to use the widget's defaults. Visitors can still change every value.

Live preview

Exactly what your visitors will see

Embed code

<iframe src="https://a2z.tools/embed/w/moon-phase" title="Moon Phase by A2Z Tools" width="100%" height="680" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>

A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.

Works with

How it works

The widget uses the same astronomy engine as the A2Z Moon Phase Calculator. Full and new moon times come from Jean Meeus's Astronomical Algorithms (chapter 49), which includes the periodic corrections; in our tests it agrees with US Naval Observatory phase times to within three minutes. The illuminated fraction comes from the Moon-Sun phase angle (chapter 48). The drawing shows the lit part as a half disc plus an elliptical terminator; south of the equator the Moon appears mirrored, so there is a hemisphere switch. For today the widget uses the current moment, and for other dates it uses 12:00 in the visitor's time zone.

Method

  • Phase instants: Meeus ch. 49 mean phase JDE = 2451550.09766 + 29.530588861 k + ..., plus periodic and planetary corrections
  • Illuminated fraction k = (1 + cos i) / 2, with the phase angle i from Meeus ch. 48
  • Terrestrial Time to UT with Delta-T (Espenak-Meeus polynomials)
  • Age = time since the previous new moon; names within about half a day of an exact phase use that phase's name

Limitations

  • No moonrise, moonset, Moon altitude or distance; those need the observer's location.
  • The drawing is schematic: the terminator is an ellipse and libration, earthshine and the Moon's tilt in the sky are not shown.
  • Phase names and dates are astronomical; religious calendars that start a month on the first sighting of the crescent can differ by a day or two.
  • Dates outside the years 1600-2400 are refused.

Where publishers use it

  • Astronomy clubs and stargazing blogs planning dark-sky nights
  • Fishing, gardening and outdoor sites where readers follow the lunar cycle
  • Photography sites planning moonrise and full-moon shoots
  • Festival calendars tied to the new or full moon

Questions

How accurate are the full and new moon times?

Our tests compare them with the US Naval Observatory's published phase times for dates from 1990 to 2060, and every one agrees within three minutes. The widget accepts years 1600 to 2400; far from the present, the uncertainty in Delta T (Earth's irregular rotation) makes the clock times less certain.

Why does the Moon look reversed in Australia?

Seen from the southern hemisphere the Moon is upside down compared with the northern view, so the lit side appears on the opposite side. Choose "Southern hemisphere" to draw it that way.

Is the phase different in different countries?

No. The phase is the same everywhere at a given moment; only the local date and time of each event change with the time zone.

Does it show moonrise and moonset?

No. Those depend on your exact location; the widget covers the phase, illumination and phase dates.

Sources

  1. Astronomical Algorithms, 2nd ed., chapters 48-49 - Jean Meeus, Willmann-Bell (1998) . Phase instants (ch. 49) and illuminated fraction (ch. 48); print book
  2. Dates of Primary Phases of the Moon - US Naval Observatory, Astronomical Applications Dept. . Reference times the widget is tested against
  3. Polynomial Expressions for Delta T - NASA GSFC (Espenak and Meeus) . Terrestrial Time to Universal Time

Cite or recommend this tool

If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.

A2Z Tools Moon Phase
https://a2z.tools/moon-phase-calculator

Preview