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: v=H0dv = H_0 \cdot d. H0H_0 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.

607080
vv1155 km/s
1155 km/s0.003853 c16.5 Mpc
0360.9721.91082.81443.805101521distance d (Mpc)velocity v (km/s)

The diagonal line is v=H0dv = H_0 \cdot d at the current H0H_0; 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 v=H0dv = H_0 \cdot d is a low-redshift approximation, good only for relatively nearby galaxies (roughly up to a few hundred megaparsecs, zz ≲ 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 (Ωm\Omega_m, ΩΛ\Omega_\Lambda), not just H0H_0. 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

v=H0dv = H_0 \, d

Here dd is a galaxy’s distance, vv is its recession velocity (read off its redshift), and H0H_0 — 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

H0H_0 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 H0H_0 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 v=H0dv = H_0 d drawn for whatever H0H_0 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 H0H_0 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:

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 v=H0dv = H_0 d 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 (Ωm\Omega_m ) versus dark energy (ΩΛ\Omega_\Lambda ) — 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 zz ≲ 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 v=H0dv = H_0 d stops meaningfully applying at all. This calculator will warn you as your input’s implied velocity climbs past about 10% of cc , and flag it more strongly past 20% of cc ; 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 v=H0dv = H_0 d at H0H_0 ≈ 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.”

View source on GitHub

Changelog

  • 2026-09-06Published.