Molecular Clock Calculator

Compare two sequences: count mismatches, apply Jukes-Cantor correction, estimate divergence time.

Loading interactive simulation...

Lesson

The theory — Molecular Clock Calculator

A molecular clock turns sequence differences into elapsed time in three moves: count the mismatches, correct that count, then divide by a rate. The first and third are arithmetic. The second is where all the interesting behaviour lives — including the point at which the method stops working altogether, which this page will show you if you ask it.

What each symbol means

p
the raw proportion of aligned sites that differ. The page shows it as a percentage beside the mismatch count — 7.7% for the default pair, being 1 site in 13.
d
the corrected evolutionary distance, in substitutions per site. Always larger than p, and the gap between them grows without limit.
μ
the substitution rate per site per year. An input, not a result — you supply it, and everything downstream inherits its uncertainty.
t
the divergence time the page reports, in years before present.

Where the formula comes from

  1. Model a single site as jumping between the four bases at random. Under the Jukes–Cantor assumption — every base equally common, every substitution equally likely — the probability that two sequences differ at a site after an evolutionary distance d works out to p = (3/4)(1 − e^(−4d/3)). Read that as a curve: it starts at zero, climbs steeply, and then flattens as the exponential dies, approaching 3/4 but never reaching it.
  2. You observe p and want d, so invert it. Rearranging gives e^(−4d/3) = 1 − 4p/3, and taking logs, d = −(3/4)·ln(1 − 4p/3). Try the default alignment: 1 difference in 13 sites is p = 0.0769, and the formula returns 0.0812 — which is exactly what the page prints. At this depth the correction is worth about 5%.
  3. Now look at where that logarithm dies. Its argument 1 − 4p/3 reaches zero when p = 3/4, and d runs to infinity there. That threshold is not an artefact of the algebra: 3/4 is the fraction of sites at which two completely unrelated sequences differ, since four equally likely bases agree one time in four by chance alone. So the correction blows up precisely where the alignment becomes statistically indistinguishable from random noise — and the infinity is the honest answer, not a bug. Load the "saturated" preset, at 75.0%, and the page reports exactly that.
  4. Saturation is the famous limit, but it is rarely the one that bites first. The default alignment is thirteen bases. One mismatch gives d = 0.0812; the page’s "rapid virus" preset is the same 13 sites with two mismatches and gives d = 0.1722 — a single extra difference more than doubles the distance. (Its divergence time differs for a separate reason: that preset also supplies a viral rate.) With sequences this short the estimate moves in large discrete jumps, and no amount of correcting fixes it. Length buys precision; the correction only buys accuracy.

How to read what you see

Four rows, read top to bottom as the pipeline. Aligned length and differences are the raw observation, with the percentage being p. The Jukes–Cantor distance is that observation after step 2. The divergence time is that distance divided by twice the rate. The row worth understanding rather than reading is the third: when it says ∞ (saturated) it is not failing to compute, it is reporting that the data are consistent with any age at all.

Assumes
Everything Jukes–Cantor assumes, and real DNA obliges in none of it exactly: all four bases equally frequent, and all twelve substitutions equally likely — whereas transitions outnumber transversions roughly two to one, and GC content varies widely between genomes and along them. Beyond the model: a rate that is constant across both lineages and through time, sites that evolve independently and at the same speed, and an alignment that is already correct. The clock also counts substitutions, not mutations, so it measures what selection let through.
Breaks when
The weakest number on this page is the one you typed. μ is an input, and calibrating it is the genuine bottleneck of the whole field — rates are estimated from fossils or from known divergences, they differ between genes, between lineages and between sites within a gene, and a factor-of-two disagreement is unremarkable. The page will nonetheless hand back a divergence time to three significant figures, which is a precision the arithmetic supports and the biology does not. Treat the corrected distance as the measurement and the date as the measurement multiplied by a number you should quote an error bar for. Two further pressures on the model, both pushing the same way: Jukes–Cantor under-corrects when sites evolve at different speeds, because the fast sites saturate while the slow ones have barely started, and it under-corrects again when transitions dominate — so the true distance is generally larger than the one printed here, and increasingly so with depth.

Forget the 2 and every date doubles 🖖

T = d/(2r) carries a factor that is easy to drop and expensive to lose. Two species that diverged T years ago have each been mutating for T years independently, so the genetic distance between them accumulated along both branches — a total of 2T lineage-years. Divide by r alone and you date the ancestor at twice its real age. The tool's own formula keeps the 2, which is why the number it returns is the split time and not the summed branch length. It is the same reason a pairwise distance is a round trip: you are always measuring down one lineage and back up the other.

Why raw differences undercount time 🖖

Just counting mismatches between two sequences underestimates how much evolution really happened. Over time a single site can mutate more than once, or even flip back to its original base — changes that leave no visible trace. The Jukes-Cantor correction, d = −(3/4)·ln(1 − (4/3)p), converts the observed fraction of differing sites p into the true number of substitutions per site d. At small p the two are nearly equal; they diverge sharply as the sequences grow more different.

Random DNA still matches a quarter 🖖

Two completely unrelated DNA sequences don't differ at every site — with only four bases (A, T, C, G) they still agree at roughly one site in four by pure chance. So the observed difference p tops out near 0.75, not 1.0. The Jukes-Cantor distance runs to infinity as p approaches 3/4: past this saturation wall, so many multiple hits pile up that the signal is erased, and a single p could correspond to almost any divergence time.

Problem solved in full

  1. Two sequences of 13 aligned bases differing at a single site 5 steps

    Two sequences of 13 aligned bases differ at a single site, and the substitution rate is 5 × 10⁻⁹ per site per year. Date the split — and then work out what that date is actually worth.

    1. The raw observation is the proportion of sites that differ: one in thirteen, 7.7%.

    2. That proportion understates the real divergence, because a site can be hit twice and look untouched, or hit twice and still look like a single change. Jukes–Cantor corrects for the changes you cannot see, and the correction grows without bound as p climbs towards 0.75 — the point where two unrelated sequences would agree by chance alone.

    3. The factor of 2 is where most people go wrong. Both lineages have been mutating since the split, so the differences accumulated over twice the elapsed time. Divide by μ alone and you date the common ancestor at twice its real age.

    4. Here the correction is worth only 5.5%, precisely because p is small and double hits are rare. On more distant sequences it is the difference between an answer and nonsense.

    5. Now the honest part. Thirteen sites is a sample of thirteen. One more mismatch would make p = 2/13, d = 0.1722, and the date 17.2 million years.

    Answer

    The tool prints 7.7% divergence, a Jukes–Cantor distance of 0.0812 and a split at 8.1 Mya. Every step is correct and the answer is still worthless, because the input is thirteen bases: one additional mismatch — a single base, well inside what you would get by choosing a different gene — doubles the age to 17.2 million years. Real molecular clocks use thousands of sites for exactly this reason, and none of the arithmetic changes when they do. What changes is the width of the answer, and the width is the result. A date quoted without one is a number impersonating a measurement.

Learning path

Clocks in the rock

References (3)

Example problems

  • Human-Chimp - One difference in 13 aligned bases: a Jukes-Cantor distance of 0.0812 and a split 8.1 Mya.
  • Human-Gorilla - Two differences in 18 bases pushes the same clock back to 12.0 Mya.
  • Rapid virus - The same handful of differences, read at a viral clock rate, dates to 86 years rather than millions.
  • Saturated - At 75.0% divergence the correction blows up: the distance is reported as infinite, and the clock has stopped telling time.