Hundreds of stars are born together from one Salpeter mass function. Slide the age from 1 million to 15 billion years and watch the massive stars leave the main sequence first: the turn-off point on the Hertzsprung-Russell diagram is the cluster's clock.
Sliders marked * make a new random draw of stars from the same seed rule.
Click a dot to inspect that star. Dotted yellow line: the isochrone (where a star of each initial mass sits at this age). Grey: zero-age main sequence and lines of constant radius.
Age dating: each button draws many clusters of the current size and reads the age from the most massive star still on the main sequence.
The science
Why a cluster is a clock. All stars of a cluster form within a few million years from the same cloud, so they share an age and differ only in initial mass M. Main-sequence luminosity rises steeply with mass (L ∝ M4 near 1 M☉, L ∝ M3.5 above 2 M☉), but the fuel supply only rises as M, so the main-sequence lifetime is tMS ≈ 10 Gyr × (M/M☉)/(L/L☉), about 10 Gyr for the Sun, 1.3 Gyr for 2 M☉, 23 Myr for 10 M☉. At a given age the stars heavier than the turn-off mass Mto, defined by tMS(Mto) = age, have already left the main sequence. Reading Mto from the diagram and inverting the relation dates the cluster.
The mass function. The number of stars per mass interval follows the Salpeter power law dN/dM ∝ M-2.35 between 0.1 and 60 M☉ (slider changes the slope). Masses are drawn by inverting the cumulative distribution; the page checks the sample mean against the analytic mean.
Colour and radius. Each star is a blackbody: L = 4πR2σT4, so T = T☉(L/R2)1/4. Lines of constant radius in the HR diagram are straight lines of slope 4 in log L against log T. White dwarfs are Earth-sized, giants and supergiants 10 to 1000 R☉.
After the main sequence. Stars below 8 M☉ swell into red giants, burn helium, shed their envelopes and leave a white dwarf with the initial-final mass relation MWD ≈ 0.109 M + 0.394 (typical fit); the radius follows the degenerate-matter relation R ≈ 0.0126 R☉ (M/M☉)-1/3 √(1 - (M/1.44)4/3) (Chandrasekhar mass 1.44 M☉), and it cools as L ∝ t-7/6 (Mestel law). Above about 8 M☉ the core collapses in a supernova; above about 25 M☉ the remnant is drawn as a black hole, otherwise a neutron star (illustrative thresholds).
Simplifications, stated honestly. This is a parametric toy, not a stellar-structure code like MESA: solar metallicity only, no rotation, no binaries (real clusters have 30-50 % binaries and blue stragglers), no mass loss on the main sequence, no horizontal-branch morphology, no extinction or distance. Post-main-sequence phases are drawn as smooth tracks through typical waypoints (subgiant about 4900 K, red-giant tip 2500 L☉ at 3400 K, helium-burning clump at 4700 K), and their durations (15 % and 10 % of tMS) are illustrative. Luminosity and radius are the mid-main-sequence values with a gentle linear drift so the Sun at 4.6 Gyr comes out right. Cluster names in the presets (Orion-like, Pleiades-like, Hyades-like, globular) use typical ages only. 3D positions are a random Plummer sphere with mild mass segregation; nothing in 3D is to scale.
Numbers to spot-check against a textbook: Sun L, T, R at 4.6 Gyr; tMS(10 M☉) 20-30 Myr; Pleiades age about 100 Myr, Hyades about 650 Myr, old globular clusters 11-13 Gyr.