Hubble Law Calculator
Solve the linear Hubble law v = H0·d for a nearby galaxy's recession velocity or distance, with an adjustable H0 (60–80 km/s/Mpc), a genuine Hubble diagram plotting your point on the v = H0·d line, and explicit caveats about where the linear approximation breaks down.
Hubble law calculator
For nearby galaxies, recession velocity grows linearly with distance: . itself isn't perfectly nailed down — local measurements (Cepheids, supernovae) and measurements from the early-universe cosmic microwave background currently disagree by a few km/s/Mpc, a mismatch cosmologists call the "Hubble tension." Slide H₀ below to see how much that disagreement actually matters for a given galaxy.
The diagonal line is at the current ; the dot is your current distance/velocity pair, always sitting exactly on it — that's the whole content of a linear Hubble law.
Scope of this tool: the linear relation is a low-redshift approximation, good only for relatively nearby galaxies (roughly up to a few hundred megaparsecs, ≲ 0.1-ish). It does not attempt to compute cosmological distances for distant, high-redshift objects — that requires the full FLRW comoving/luminosity-distance relation, which depends on the universe's matter and dark-energy density (, ), not just . Rather than silently returning a wrong number for an extreme input, this calculator flags it above instead.
In 1929, Edwin Hubble noticed something odd about the handful of galaxies whose distances and spectra had been measured: the farther away a galaxy was, the faster it appeared to be receding from us. Plot one against the other and the points fall — roughly, for anything reasonably nearby — on a straight line through the origin.
The formula
Here is a galaxy’s distance, is its recession velocity (read off its redshift), and — the Hubble constant — is the slope of that line: how fast the relationship between distance and velocity scales, in kilometers per second per megaparsec. It is simultaneously one of the simplest equations in cosmology and, because of exactly how that slope gets measured, one of the most argued-over numbers in the field.
The Hubble tension
isn’t a single agreed-upon number. Measurements built from the “distance ladder” — Cepheid variable stars and Type Ia supernovae in relatively nearby galaxies — tend to land around 73 km/s/Mpc. Measurements derived from the cosmic microwave background, run through the standard cosmological model, tend to land closer to 67 km/s/Mpc. The gap between them is small in absolute terms but statistically stubborn, and nobody has definitively shown which side (if either) has an unaccounted-for systematic error. This calculator doesn’t take a side — it just lets you slide across the range these methods actually produce (60–80 km/s/Mpc) so you can see how much of a difference it makes for any particular galaxy.
Reading the Hubble diagram
The chart is the whole point of the tool: distance on the x-axis, recession velocity on the y-axis, the line drawn for whatever you’ve picked, and your current distance/velocity pair marked as a dot that always sits exactly on that line — because under this linear model, that’s all a distance/velocity pair is. Drag and watch the line’s slope change while the dot rides along with it.
Solving in either direction
Use the toggle to pick which quantity you know:
- Distance → velocity — enter a distance in megaparsecs (or million light-years) and read off the predicted recession velocity, shown in km/s and as a fraction of the speed of light.
- Velocity → distance — enter an observed recession velocity and read off the implied distance. This direction is closer to how the relation is actually used in practice: redshift is what a spectrum directly gives you, and Hubble’s law is what turns that into a distance estimate.
Where this stops being valid
This is deliberately a linear, low-redshift tool, and it says so plainly rather than quietly producing a number that looks precise but isn’t. The straight-line relation is the correctly-truncated, first-order approximation to something more complicated: the full FLRW (Friedmann–Lemaître–Robertson–Walker) cosmological distance–redshift relation. That fuller relation accounts for the universe’s expansion history — how much of the cosmos is matter ( ) versus dark energy ( ) — and it also has to distinguish between several genuinely different notions of “distance” (comoving distance, luminosity distance, angular-diameter distance) that all collapse into one obvious quantity only in the nearby limit.
Concretely: the linear approximation is reasonable out to distances of roughly a few hundred megaparsecs, corresponding to redshifts ≲ 0.1-ish, and correspondingly to recession velocities that are a small fraction of the speed of light. Push it further — the way you’d have to for genuinely distant galaxies, let alone the redshifts at which quasars or the cosmic microwave background are observed — and stops meaningfully applying at all. This calculator will warn you as your input’s implied velocity climbs past about 10% of , and flag it more strongly past 20% of ; it intentionally does not attempt to compute a “distance” beyond that point, because doing so with this formula would just be wrong.
The presets
The Local Group, Virgo Cluster, and Coma Cluster entries are illustrative, self-consistent stand-ins (chosen to satisfy at ≈ 70 km/s/Mpc) rather than a specific literature citation — real measured distances and velocities for these clusters vary across sources and methods. They’re there to give the diagram a physically reasonable sense of scale, from “practically next door” to “a meaningful fraction of the way to where the linear approximation starts to strain.”
Changelog
- 2026-09-06Published.