WOLFRAM

gives moon phase fraction of illumination for the current date.

MoonPhase[datespec]

gives moon phase fraction of illumination for the specified date.

MoonPhase[property]

gives the property of the moon phase for the current date.

MoonPhase[datespec,property]

gives the property of the moon phase for the specified date.

Details and Options

  • The phase of the Moon, also known as the lunar phase, describes the illumination of the lunar surface by the Sun as seen from Earth.
  • MoonPhase[] makes use of $TimeZone to determine your time zone.
  • datespec can be a DateObject expression, a TimeObject expression or a date string.
  • datespec is assumed to be in $TimeZone, unless it is a DateObject or TimeObject expression with an explicit TimeZone option value.
  • If datespec is a list of dates, then the results will be given as EventSeries or TimeSeries objects.
  • datespec can be specified as {start,end,increment} for compatibility with DateRange specifications.
  • MoonPhase["Fraction"] is equivalent to MoonPhase[].
  • MoonPhase can accept the following values for property:
  • "Fraction" or "IlluminationFraction"fraction of illumination, from 0 to 1
    "SignedFraction" or "SignedIlluminationFraction"signed fraction of illumination, from -1 to 1
    "PhaseAngle"lunation angle, from 0 to 2π
    "PhaseAngleFraction"fraction of lunation angle, from 0 to 1
    "Name"name of the moon phase
    "Icon"icon representing the moon phase
  • MoonPhase[,Method"method"] specifies how moon phases are defined. Fraction of illumination, as observed from the center of the Earth, is used by default.
  • Possible settings for the Method option include:
  • "Illumination"phase defined by fraction of illumination of the Moon
    "EclipticLongitude"phase defined by MoonSun ecliptic longitude difference

Examples

open allclose all

Basic Examples  (4)Summary of the most common use cases

Find the Moon's current fraction of illumination:

Out[1]=1

Find the Moon's fraction of illumination on a specified date:

Out[1]=1

Find the name of the Moon's current phase:

Out[1]=1

Generate an icon of the Moon's current phase:

Out[1]=1

Scope  (7)Survey of the scope of standard use cases

Dates can be specified as a DateObject:

Out[1]=1
Out[1]=1
Out[1]=1

Dates can be specified as a date string:

Out[2]=2
Out[1]=1
Out[1]=1

Results for a range of dates:

Out[2]=2
Out[1]=1
Out[1]=1

Generalizations & Extensions  (1)Generalized and extended use cases

IconData can accept the signed fraction of the moon phase as its second argument:

Out[1]=1

Options  (1)Common values & functionality for each option

Method  (1)

By default, MoonPhase uses illumination of the Moon by the Sun to compute properties:

Out[2]=2
Out[3]=3

Alternatively, use a method based on the ecliptic longitude difference between Moon and Sun:

Out[4]=4

Properties & Relations  (1)Properties of the function, and connections to other functions

By default, the date is specified by the current date:

Out[1]=1
Out[2]=2

Possible Issues  (1)Common pitfalls and unexpected behavior

The names of moon phases are based on the illumination fraction value. On a given day, the name of the moon phase may change, depending on what time it is. For example, a full moon does not last a full day, so even if a full moon occurs on that day, you may have to change the time in order to get the phase you might expect:

Out[1]=1
Out[2]=2

Neat Examples  (1)Surprising or curious use cases

Create a moon calendar:

Out[1]=1
Wolfram Research (2014), MoonPhase, Wolfram Language function, https://reference.wolfram.com/language/ref/MoonPhase.html (updated 2025).
Wolfram Research (2014), MoonPhase, Wolfram Language function, https://reference.wolfram.com/language/ref/MoonPhase.html (updated 2025).

Text

Wolfram Research (2014), MoonPhase, Wolfram Language function, https://reference.wolfram.com/language/ref/MoonPhase.html (updated 2025).

Wolfram Research (2014), MoonPhase, Wolfram Language function, https://reference.wolfram.com/language/ref/MoonPhase.html (updated 2025).

CMS

Wolfram Language. 2014. "MoonPhase." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/MoonPhase.html.

Wolfram Language. 2014. "MoonPhase." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/MoonPhase.html.

APA

Wolfram Language. (2014). MoonPhase. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MoonPhase.html

Wolfram Language. (2014). MoonPhase. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MoonPhase.html

BibTeX

@misc{reference.wolfram_2025_moonphase, author="Wolfram Research", title="{MoonPhase}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/MoonPhase.html}", note=[Accessed: 29-March-2025 ]}

@misc{reference.wolfram_2025_moonphase, author="Wolfram Research", title="{MoonPhase}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/MoonPhase.html}", note=[Accessed: 29-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_moonphase, organization={Wolfram Research}, title={MoonPhase}, year={2025}, url={https://reference.wolfram.com/language/ref/MoonPhase.html}, note=[Accessed: 29-March-2025 ]}

@online{reference.wolfram_2025_moonphase, organization={Wolfram Research}, title={MoonPhase}, year={2025}, url={https://reference.wolfram.com/language/ref/MoonPhase.html}, note=[Accessed: 29-March-2025 ]}