How it works, and what it can’t do
Two circles, but not their intersection
The lit part of the Moon is bounded by two curves: the limb, which is
an arc of the Moon’s own circular outline, and the terminator, the
line between day and night. The cusps — the two sharp points — always sit at
opposite ends of a diameter, so the lit limb is always exactly a half-circle,
at every phase.
It is tempting to say the shape is the intersection of two overlapping circles.
It cannot be. The intersection of two convex shapes is convex, and a crescent is
not convex — it has a dent in it. So the same two circles have to be combined
two different ways:
- Gibbous (more than half lit): lit = disc intersect second circle.
- Crescent (less than half lit): lit = disc minus second circle.
- Quarter: the second circle’s radius runs off to infinity and its arc becomes a straight line.
That is the model drawn on the image: a gold circle for the limb, a pink one for the
terminator’s circle. Near quarter phase the pink circle is enormous, so past a point
the app draws the straight line it is heading towards.
The circular arc is an approximation, and here is exactly how wrong
The real terminator is not a circular arc. It is the Moon’s day/night boundary —
a circle in 3D — seen at an angle, so it projects to half an ellipse
with semi-axes R and R cos i. That gives the textbook
illuminated fraction k = (1 + cos i) / 2.
Substituting a circular arc through the same three points changes the enclosed area.
The error is a bias, not noise — it always pushes the answer towards 50%:
| True lit fraction | 5% | 20% | 35% | 50% | 65% | 80% | 95% |
| Two-circle model | 6.2% | 22.8% | 37.0% | 50.0% | 63.0% | 77.2% | 93.8% |
| Bias | +1.2 | +2.8 | +2.0 | 0.0 | −2.0 | −2.8 | −1.2 |
It peaks at 2.8 percentage points near 22% and 78% lit, and vanishes
exactly at quarter, full and new. Because it is known in closed form, the app does not
have to live with it: the headline number comes from fitting the exact half-ellipse,
while the circles you see come from fitting the circular model. Both are reported, and
the green line on the image is the true terminator — the gap between it and the
edge of the blue region is the bias, drawn to scale.
Why there is no single “error rate”
A single accuracy figure would be misleading, because the error sources behave
completely differently depending on the phase and on how the photo was taken.
The app reports each separately and adds them in quadrature:
- Edge softness
-
Haze, defocus and camera shake smear the limb over several pixels, and the
recovered outline sits wherever the threshold lands inside that band. The
threshold lands near the middle of the band, not anywhere in it, so the
displacement is priced at an eighth of the transition width — calibrated so
the total band behaves like an actual one-sigma rather than a worst-case bound.
Scales with the perimeter, and on a hand-held phone shot it usually dominates
everything else.
- Shape mismatch
-
How well an idealised Moon matches the actual bright blob, as intersection-over-union.
Clouds, a tree branch or a second light source show up here.
- Radius uncertainty
-
The lit fraction is an area divided by πR², so an error in the fitted
radius enters doubled.
- Model bias
-
The table above. Reported, but deliberately not added to the band, because
the headline number is the ellipse fit and does not carry it.
- Unresolved sliver
-
Appears when the thin sliver — lit near new, dark near full — is no wider
than the blur smearing it. At that point thresholding widens it and the answer
stops being a measurement: a Moon photographed hours from full genuinely cannot
be told apart from 100%, so the band widens to the distance to full. The same
phase photographed at four times the magnification is measurable again.
The band is calibrated as a true one-sigma, not a guarantee. Against synthetic Moons
of known phase — clean, blurred, noisy, small, overexposed and combinations of
those — the truth lands inside the band in 114 of 123 cases (93%), with a median
error of 0.17σ and a worst case right at 2σ. It has one real-world calibration
point too: a hand-held photo taken five and a half hours before the August 2026 full
moon, at a true illumination of 99.94%, measured 98.45% — an error of 1.5 points
against a quoted ±2.6, or 0.6σ. A further nine synthetic images were
declined outright rather than measured, which is the other half of being honest: a
crescent thinner than the blur hiding it still leaves a bright blob for the threshold
to find, and fitting that blob produced a confident 99% from an image with no Moon
left in it. If the brightest region is not clearly brighter than its surroundings,
the app says so instead of quoting a number. On a clean image the measurement lands
within about half a percentage point of truth.
Things it genuinely cannot tell you
-
Waxing or waning. A single photo shows which side is lit, but turning
that into waxing or waning needs to know your hemisphere and which way up the camera
was. So the app says “crescent”, never “waxing crescent”.
-
An overexposed Moon. Phone cameras meter for the dark sky and blow the
disc out to a white blob, which reads as nearly full whatever the real phase is. The
app measures how much of the disc is clipped to pure white and warns you.
-
Photometric truth. This measures the geometric lit fraction.
Lunar mountains scallop the real terminator, and the limb is darker than the centre,
so how much light the Moon actually sends you is a slightly different question.
Everything runs in your browser. No image, frame or measurement is uploaded anywhere,
and there is no backend to upload it to.