Learn how we predict crescent moon visibility using astronomy and machine learning
Hilal is the Arabic term for the thin crescent moon that appears shortly after the astronomical new moon (conjunction). In Islam, the sighting of the Hilal marks the beginning of a new lunar month.
The Islamic (Hijri) calendar is a purely lunar calendar consisting of 12 months of 29 or 30 days each. Because each month begins with the actual sighting of the crescent moon, accurate prediction of Hilal visibility is essential for determining the start of important months like Ramadan (the month of fasting), Shawwal (Eid al-Fitr), and Dhul Hijjah (Hajj and Eid al-Adha).
The crescent is typically looked for on the 29th evening of the current Islamic month, just after sunset. If the Hilal is sighted, the new month begins that evening. If not, the current month completes 30 days and the new month begins the following evening.
Our system calculates five key astronomical parameters at the moment of sunset for a given location and date. These parameters determine whether the crescent moon is geometrically positioned to be visible to the naked eye.
The time difference (in minutes) between sunset and moonset. A longer lag means the crescent moon stays visible above the horizon for more time after the sky darkens, improving the chance of sighting.
The number of hours elapsed since conjunction (new moon). The moon needs sufficient time after conjunction to move away from the sun and develop a visible crescent. Very young moons (under ~15 hours) are virtually impossible to see.
The angular height of the moon above the horizon at sunset (in degrees). Higher altitude means the crescent is farther from the glare of the horizon and easier to spot against the darkening sky.
The angular separation between the sun and moon as seen from the observer. Greater elongation means more of the moon's illuminated surface faces the observer, making the crescent brighter and easier to see.
The percentage of the moon's visible surface that is illuminated by the sun (0\u2013100%). At conjunction it is 0%; for a new crescent it is typically between 0.5% and 3%. Even a small increase in illumination significantly improves naked-eye visibility.
Based on analysis of our historical sighting data, we identified minimum threshold values for each parameter. When a parameter exceeds its threshold, conditions for that factor are considered favorable. The more thresholds met, the better the overall visibility prospects.
| Parameter | Threshold |
|---|---|
| Moonset Lag | ≥ 45 min |
| Moon Age | ≥ 21 hrs |
| Moon Altitude | ≥ 8° |
| Elongation | ≥ 10° |
| Illumination | ≥ 0.9% |
Beyond simple threshold checks, we use a logistic regression machine learning model to produce a nuanced confidence percentage. The model considers all five astronomical parameters plus the count of thresholds met simultaneously, capturing the interplay between factors that a simple threshold check would miss.
2,004
Training Records
6
Input Features
Balanced
1,002 Sighted + 1,002 Not
The model outputs a probability (0\u2013100%) which is mapped to a human-readable confidence label:
Our training data comes from verified moon sighting observations collected by CrescentWatch.org, spanning from 2005 to 2023. Each record includes the date, location, sighting result (visible or not), and the computed astronomical parameters at the time of observation.
Astronomical calculations use NASA's Jet Propulsion Laboratory DE421 ephemeris file, which provides highly precise positions of the Sun, Moon, and planets. Computations are performed via the Skyfield Python library for accurate rise/set times and angular positions.