What is the formula to calculate the illumination fraction of the Moon?

Without going into a lengthy derivation, I would assume a sinusoidal variation would be a good approximation. The period between new monns in 27.53 days. If T is the time since the previous new moon,

Illumination fraction =
0.5 - 0.5 cos (2 pi T/27.53)

The angle in parentheses is in radians.

A more accurate formula would have to consider the variation in the sun-earth-moon angle, which is not strictly sinusoidal with time due to the eccentricity and inclination of the moon's orbit.

You will find a better formula here, in terms of the "Phase Angle" between the sun and the moon, as see from earth. you will need an ephemeris (or a measurement) to get that angle.

http://the-moon.wikispaces.com/phase

The formula to calculate the illumination fraction of the Moon is:

Illumination fraction = (1 + cos(π * Phase Angle)) / 2

where the Phase Angle is the angle between the Sun, Moon, and the observer on Earth. It is calculated as:

Phase Angle = arccos(sin(α) * sin(δ) + cos(α) * cos(δ) * cos(H))

with:

- α: the Right Ascension of the Moon,
- δ: the Declination of the Moon, and
- H: the Local Hour Angle of the Moon.

Please note that the input values for α, δ, and H should be in radians.

To calculate the illumination fraction of the Moon, you can use the formula:

Illumination fraction = (Visible Area of the Moon) / (Total Area of the Moon)

To calculate the visible area of the Moon, you need to know the phase of the Moon. The phase of the Moon refers to the portion of the Moon's surface that is visible from Earth.

To determine the phase of the Moon, you can use either a lunar calendar or an internet search for the current phase. Once you know the phase, you can refer to various diagrams or tables that provide the corresponding percentage of visible area.

For example, if the Moon is in its first quarter phase, it generally appears as a half-circle. In this case, the visible area would be 50% of the total area.

Next, you need to know the total area of the Moon, which can be calculated using its average diameter. The average diameter of the Moon is approximately 3,474 kilometers. To find the total area, you would use the formula for the area of a circle, which is:

Total Area of the Moon = π * (Moon's radius)^2

To find the Moon's radius, you can divide the average diameter by 2. So, the formula becomes:

Total Area of the Moon = π * (Moon's diameter/2)^2

Once you have the visible area and the total area, you can plug these values into the illumination fraction formula to calculate the percentage of the Moon illuminated at that particular phase.