What This Hubble's Law Distance Calculator Does
This calculator uses the simple, linear form of Hubble's Law to estimate how far away a distant galaxy or quasar is, based on its redshift and an assumed value of the Hubble constant. It is designed for educational use and quick order-of-magnitude distance estimates at relatively low redshift.
When you enter a redshift z and a value for the Hubble constant H0, the tool first converts redshift to recessional velocity using the low-redshift approximation, and then converts that velocity to a distance in megaparsecs (Mpc) and light-years. This makes the connection between cosmic expansion, redshift, and distance more concrete.
What Is Hubble's Law?
In the late 1920s, Edwin Hubble and other astronomers noticed that most galaxies appear to be moving away from us, and that their recessional velocity increases roughly in proportion to their distance. This empirical relationship is known as Hubble's Law.
In its simplest (linear) form, Hubble's Law is written as:
Hubble's Law (velocity–distance relation)
where:
- v is the galaxy's recessional velocity, typically in kilometers per second (km/s).
- H0 is the Hubble constant, the present-day expansion rate of the universe, in units of km/s/Mpc.
- d is the proper distance to the galaxy, in megaparsecs (Mpc).
The Hubble constant acts like a proportionality factor linking distance to recession speed. A commonly used rounded value is about 70 km/s/Mpc, meaning that for every megaparsec of distance, recession speed increases by roughly 70 km/s.
How Redshift Relates to Velocity
Light from distant galaxies is observed to be shifted toward longer (redder) wavelengths. This cosmological redshift, denoted by z, is defined as the fractional change in wavelength:
Here, λ is the observed wavelength and λ0 is the rest (laboratory) wavelength of the same spectral line.
For relatively small redshifts (typically z ≲ 0.1), cosmological redshift can be related to recessional velocity with a simple approximation:
where c is the speed of light, approximately 299,792 km/s. Combining this with Hubble's Law gives a convenient expression for distance in the low-redshift regime:
This is the approximation used by this calculator.
How This Calculator Estimates Distance
The calculator follows a straightforward sequence of steps when you click the compute button:
- Input redshift z: You supply a measured redshift, typically obtained from spectroscopy of a galaxy or quasar. The redshift is dimensionless.
- Input the Hubble constant H0: By default, the field is set to 70 km/s/Mpc. This is a rounded, commonly used estimate consistent with many modern cosmological measurements.
- Compute recessional velocity v: The tool uses the approximation v ≈ z × c, with c taken as 299,792 km/s. This gives a velocity in km/s.
- Compute distance d in megaparsecs: Using Hubble's Law, it divides the recessional velocity by H0:
- Convert Mpc to light-years: One megaparsec is approximately 3.26156 million light-years. The calculator multiplies the distance in Mpc by 3.26156 × 106 to express the distance in light-years.
The result is typically presented in both megaparsecs and light-years, which helps connect the cosmic distance scale to more familiar units.
Key Quantities and Units
- Redshift z: A dimensionless measure of how much light has been stretched by cosmic expansion. For nearby galaxies used in this simple approximation, z is usually less than about 0.1.
- Hubble constant H0: The present-day rate of cosmic expansion, usually quoted in km/s/Mpc. Different experiments give values around 67–74 km/s/Mpc.
- Megaparsec (Mpc): A distance unit equal to one million parsecs. One parsec is roughly 3.26 light-years, so 1 Mpc ≈ 3.26 million light-years.
- Light-year: The distance light travels in one year in vacuum, about 9.46 × 1012 km. Light-years are helpful for intuition but less convenient in cosmology calculations than Mpc.
- Recessional velocity v: The apparent speed at which a galaxy recedes due to cosmic expansion, in km/s. At low redshift, this is approximately z × c, but at high redshift, the relationship is more subtle.
Worked Example
To see how the pieces fit together, consider a galaxy with a measured redshift of z = 0.02. Suppose we adopt the default Hubble constant:
- Redshift: z = 0.02
- Hubble constant: H0 = 70 km/s/Mpc
- Compute recessional velocity using v ≈ z × c:
- v ≈ 0.02 × 299,792 km/s ≈ 5,996 km/s (often rounded to about 6,000 km/s).
- Compute distance in Mpc from Hubble's Law:
- dMpc = v / H0 ≈ 5,996 / 70 ≈ 85.7 Mpc.
- Convert Mpc to light-years:
- 1 Mpc ≈ 3.26156 million light-years.
- dly ≈ 85.7 × 3.26156 million ≈ 279.6 million light-years.
The calculator will carry out these steps instantly and display the result. The key point is that a seemingly small redshift of 0.02 already corresponds to a galaxy hundreds of millions of light-years away.
Interpreting the Results
The numeric output from a Hubble's Law distance calculation can be placed into a few broad categories:
- Distances of a few Mpc: These correspond to galaxies in the very local universe, such as members of the Local Group and nearby galaxy groups. For such small distances, random motions (peculiar velocities) can be as large as or larger than the Hubble expansion signal.
- Tens of Mpc: Galaxies in the nearby universe, including many well-studied clusters. Hubble's Law becomes more reliable, though peculiar velocities still introduce noticeable scatter.
- Hundreds of Mpc: Large-scale structure and rich clusters at moderate redshift. Here, cosmic expansion clearly dominates over local motions.
- Thousands of Mpc: The distant universe, where more sophisticated cosmological models (beyond the simple linear approximation) are usually required.
Because the calculator also returns distances in light-years, you can directly compare the result to the age of the universe (~13.8 billion years) to get an intuitive sense of scale. However, remember that the light-travel distance in light-years is not the same as the true cosmological distance in an expanding universe; the calculator provides only a linear approximation.
Comparison: Example Distances for Different Redshifts
The table below shows approximate distances for several small redshift values using a Hubble constant of 70 km/s/Mpc. The values are rounded and assume the same low-redshift approximation used in the calculator.
| Redshift z |
Approx. velocity v (km/s) |
Distance d (Mpc) |
Distance (million light-years) |
| 0.005 |
≈ 1,500 |
≈ 21 |
≈ 68 |
| 0.010 |
≈ 3,000 |
≈ 43 |
≈ 140 |
| 0.020 |
≈ 6,000 |
≈ 86 |
≈ 280 |
| 0.050 |
≈ 15,000 |
≈ 214 |
≈ 700 |
| 0.100 |
≈ 30,000 |
≈ 429 |
≈ 1,400 |
These values are meant as rough guides, not precision cosmological distances. At redshifts approaching 0.1 and beyond, full cosmological models that include matter density, dark energy, and curvature give more accurate results than the simple linear formula used here.
The Hubble Constant Debate (Brief Overview)
The default Hubble constant of 70 km/s/Mpc is a convenient rounded value that lies between two major families of modern measurements:
- Cosmic microwave background (CMB)–based estimates (for example, from the Planck satellite) typically find values around 67–68 km/s/Mpc, assuming a standard cosmological model.
- Local distance ladder measurements (for example, using Cepheid variable stars and Type Ia supernovae, such as the SH0ES project) often yield values around 73–74 km/s/Mpc.
The tension between these methods is an active area of research in cosmology. This calculator does not attempt to resolve that debate; instead, it lets you see how choosing different plausible values of H0 affects the inferred distances. For a given redshift, a larger Hubble constant produces a smaller distance, and a smaller Hubble constant produces a larger distance.
Limitations and Assumptions
This tool makes several simplifying assumptions that are important to keep in mind when interpreting its results:
- Low-redshift approximation: The relation v ≈ z × c is only accurate for relatively small redshifts (roughly z ≲ 0.1). At higher redshift, the relationship between redshift, velocity, and distance becomes non-linear.
- Linear Hubble's Law: The calculator assumes the simple linear form v = H0 d. In reality, the expansion rate of the universe has changed over cosmic time, so the exact relation between redshift and distance depends on the full cosmological model.
- No explicit cosmological parameters: Parameters such as matter density, dark energy density, and spatial curvature are not included. Many professional cosmology tools allow you to vary these quantities to obtain more accurate distances at moderate and high redshift.
- Peculiar velocities ignored: Nearby galaxies have significant individual motions (peculiar velocities) due to gravitational interactions. These can be several hundred km/s and can dominate over the Hubble expansion for very small distances, making Hubble's Law alone a poor distance indicator for the nearest galaxies.
- Measurement uncertainties: Real-world redshift measurements have errors, and published values of H0 come with uncertainties. This calculator does not propagate those uncertainties; it returns a single, best-estimate value based on your inputs.
- Educational focus: The results are intended for learning, back-of-the-envelope checks, and approximate scaling, not for high-precision cosmological analysis.
For more accurate work at higher redshifts, astronomers use full cosmological distance calculators that integrate the expansion history of the universe under a specified cosmological model (often ΛCDM, which includes dark energy and cold dark matter).
Practical Uses and Next Steps
Despite its simplicity, Hubble's Law remains a powerful conceptual tool and a useful approximation in several contexts:
- Classroom demonstrations: In physics and astronomy courses, students can use redshift data to estimate distances and visualize the expanding universe.
- Order-of-magnitude checks: Researchers and enthusiasts can quickly verify that a quoted redshift corresponds to a plausible distance scale.
- Exploring parameter choices: By varying H0, you can see how different assumed expansion rates affect inferred distances.
To go further, you might compare the distances from this simple tool with those from more complete cosmology distance tools that include luminosity distance, angular-diameter distance, and comoving distance. You can also explore related unit converters for parsecs, light-years, and kilometers to build intuition about astronomical scales.