Half-Life Calculator
Calculate how much of a radioactive isotope or first-order reactant remains after any time, or how long until it reaches a target — with carbon-14 dating presets.
Enter the decay
Decay curve (0 to 5 half-lives)
Show the Larzscript program that just ran
Run a calculation to see the exact program.
This is the real program the page sent to the Larzscript interpreter (compiled to WebAssembly) in your browser. The library it imports is the same code the automated tests check.
The formulas
Worked examples, computed above
- Carbon-14: 100 units after 10,000 years → 29.83 (1.745 half-lives). After exactly one half-life: 50.
- Iodine-131: 80 g decays to 10 g in three half-lives (24.06 days); it falls to 1% after 53.28 days.
- Uranium-238 (t½ = 4.468 billion years): in 4.54 billion years — the age of the Earth — 49.44% of the original uranium remains.
What is verified
Eight decay cases are compared with 50-digit decimal arithmetic (fraction remaining and mean lifetime) to 5 × 10⁻¹⁵; one half-life leaves exactly ½ and two leave ¼; the time ↔ fraction round trip is checked, and the C-14 ages for 50%, 25% and 10% are asserted. Mutation tests confirm the checks fail if ln 2 is replaced by 1.
Limits: single-step exponential decay. Decay chains (parent → daughter → grand-daughter) and radiocarbon calibration curves, which correct for past changes in atmospheric C-14, are not modelled; a raw radiocarbon age differs from the calendar age by up to several centuries.
Frequently asked questions
What is half-life?
The time for half of a decaying quantity to disappear. It is a constant for a given process: after one half-life 50% remains, after two 25%, after three 12.5%. It applies to radioactive nuclei and to first-order chemical reactions and drug elimination.
What is the half-life formula?
N(t) = N₀ · (1/2)t/t½ = N₀·e−λt with λ = ln 2 / t½. For carbon-14 (t½ = 5,730 years) a sample of 100 units after 10,000 years has 29.83 left (29.83%).
How does carbon-14 dating work?
Living things take up carbon-14 from the atmosphere; when they die the uptake stops and the C-14 decays. Measuring the fraction left gives the age t = −t½·log₂(fraction). With 10% left the sample is 19 035 years old (using the 5,730-year half-life); reliable dating reaches about 50,000 years.
How long until a substance has decayed to 1%?
t = t½ × log₂(100) = 6.64 half-lives. For iodine-131 (8.02 days) that is 53.28 days, which is why radioiodine is considered gone after about two months.
What is the mean lifetime?
τ = t½ / ln 2 = 1.4427 t½, the average time a single nucleus survives. For C-14 that is 8 266.6 years, and the decay constant is λ = 0.000121 per year.
Does it work for chemical reactions?
Yes, for first-order reactions, where the half-life is independent of the starting concentration. Second-order reactions have a half-life that depends on concentration (t½ = 1/(k[A]₀)), so use the kinetics functions in the library directly.
Is the time unit important?
Only that t and t½ use the same unit — seconds, days or years — and the results are in that unit too.
Every number on this page is computed by the open-source larzscript-chem library (chemistry, physconst, physmath), written in Larzscript, and checked against independent references in its test suite. How it is verified →