Understanding the Hubble's law and redshift calculator — concept and principle
Light from distant galaxies is shifted to longer wavelengths because the universe is expanding. This calculator takes a redshift z and a Hubble constant H₀ and gives a recession velocity, the simple cz velocity and an approximate distance from Hubble's law. It is useful for getting a quick sense of how far away a galaxy with a measured redshift is.
How it is calculated
- Redshift: z = (λ_observed − λ_emitted) ÷ λ_emitted.
- cz velocity: v = c × z, with c = 299,792.458 km/s.
- Relativistic velocity: v = c × [(1 + z)² − 1] ÷ [(1 + z)² + 1], the special-relativistic Doppler formula, which never exceeds c.
- Distance: d ≈ cz ÷ H₀, in megaparsecs (Mpc) when H₀ is in km/s/Mpc.
The principle
In 1929 Edwin Hubble found that more distant galaxies recede faster, v = H₀d. In an expanding universe, the distance between galaxies grows in proportion to their separation, so the recession speed is proportional to distance. For small z, the Doppler shift gives v ≈ cz, and combining the two gives d ≈ cz/H₀. At larger redshift, cosmological redshift is really the stretching of space while light travels, and distances depend on the full expansion history (matter, dark energy), not on a single velocity.
Worked example
- Defaults: z = 0.05, H₀ = 70 km/s/Mpc.
- (1 + z)² = 1.1025. Relativistic v = 299,792.458 × 0.1025 ÷ 2.1025 = 14,615.32792 km/s.
- cz = 299,792.458 × 0.05 = 14,989.6229 km/s.
- d ≈ 14,989.6229 ÷ 70 = 214.13747 Mpc, about 700 million light-years.
| Redshift z | Recession velocity, relativistic (km/s) |
|---|---|
| 0.0125 | 3,723.986246 |
| 0.025 | 7,401.154861 |
| 0.0375 | 11,031.56836 |
| 0.05 | 14,615.32792 |
| 0.0625 | 18,152.57085 |
| 0.075 | 21,643.46826 |
| 0.1 | 28,487.06614 |
How to read the result
Up to z of about 0.1, cz/H₀ is a reasonable distance estimate; beyond that use a cosmology calculator. The choice of H₀ matters: measurements from the cosmic microwave background (Planck, about 67.4) and from the local distance ladder (SH0ES, about 73) disagree by several percent, the so-called Hubble tension, so distances scale by the same percentage. For nearby galaxies (within a few Mpc), their own motions of a few hundred km/s can swamp the expansion.
Common mistakes
- Treating the relativistic Doppler velocity as the true cosmological recession speed at high z.
- Using H₀ in different units, such as km/s/kpc.
- Applying d = cz/H₀ to galaxies at z = 1 or more, where it is badly wrong.
Frequently asked questions
What does 1/H₀ mean?
It is the Hubble time; for 70 km/s/Mpc it is about 14 billion years, close to (but not the same as) the age of the universe.
Can galaxies recede faster than light?
In cosmology yes, for very distant galaxies; that is space expanding, not motion through space, so it does not break relativity.
Why does the Andromeda galaxy have a blueshift?
It is close enough that its motion towards the Milky Way is larger than the local expansion.
Sources: Hubble E., A relation between distance and radial velocity among extra-galactic nebulae, PNAS 15, 168 (1929) · Planck Collaboration, Planck 2018 results VI. Cosmological parameters, A&A 641, A6 (2020) · Riess A.G. et al., A comprehensive measurement of the local value of the Hubble constant, ApJ Letters 934, L7 (2022)