Measure the Moon

Point a camera at the Moon. This measures what fraction of its disc is lit, by fitting two overlapping circles to the shape — and tells you how much to trust the answer.

Nothing loaded yet.

Use the camera, open a photo, or try the demo.

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:

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 fraction5%20%35%50%65%80%95%
Two-circle model6.2%22.8%37.0%50.0%63.0%77.2%93.8%
Bias+1.2+2.8+2.00.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

Everything runs in your browser. No image, frame or measurement is uploaded anywhere, and there is no backend to upload it to.