Use Hubble’s law to estimate a galaxy’s distance from its recessional velocity (or do the reverse), with optional redshift input for low z and built-in unit conversions. This is a linear approximation that works best for relatively nearby galaxies, so the calculator also flags when your inputs may be outside that range.
Advanced options
Results
How to use this calculator
- Choose what you want to find: Distance or Velocity.
- Enter the Hubble constant H0 in km/s/Mpc (a common classroom value is about 70, but measured values differ by method).
- Open Advanced options if you want to use redshift z instead of entering velocity directly, or if you want different units.
- If solving for Distance: enter recessional velocity v (pick km/s or fraction of the speed of light, c). If using redshift mode, enter z instead.
- If solving for Velocity: enter distance d (pick Mpc, Gpc, million light-years, or light-years).
- Optional: choose an H0 preset, or enter an H0 plus/minus value to see a range of possible answers.
- Click Calculate.
- Read the results: the main estimate, the low-z redshift estimate, the Hubble time, the v/c gauge, and any reasonableness warnings.
Methodology
This calculator uses the linear (low-redshift) form of Hubble's law: recessional velocity v equals the Hubble constant H0 times distance d, so v = H0 * d and d = v / H0 [4]. Distances are handled internally in megaparsecs (Mpc) and velocities in kilometers per second (km/s). If you choose Redshift (z) mode, it first converts redshift to an approximate recessional velocity using v = c * z, where c is the speed of light (exactly 299792.458 km/s) [1]. It also reports an estimated redshift from a velocity input using z = v / c; this z estimate is labeled as a small-z approximation and is not intended for high redshift cosmology.
Unit conversions: 1 Mpc is converted to light-years using 1 Mpc = 3.26156e6 light-years [2]. The calculator can display distance in Mpc, Gpc (1000 Mpc), million light-years (Mly, where 1 Mly = 1,000,000 light-years), or light-years (ly). Velocity can be entered in km/s or as a fraction of c; if a fraction is entered, it is converted to km/s by multiplying by c [1].
Hubble time: the Hubble time t_H is computed as 1 / H0, with H0 converted from (km/s)/Mpc to 1/s by dividing by the number of kilometers in 1 Mpc, then converted to years and then to billions of years (Gyr). This is presented as an order-of-magnitude expansion timescale, not the exact age of the universe [4].
H0 uncertainty range: if you enter a plus/minus value, the calculator computes H0_low = H0 - plus/minus and H0_high = H0 + plus/minus, then recomputes the requested output using those bounds. For distance (d = v / H0), the smaller H0 gives the larger distance, and the larger H0 gives the smaller distance; the calculator reports the interval accordingly.
Reasonableness checks: the calculator warns when v/c is large (for example near or above 1) because the low-z conversion v = c * z and the simple interpretation of v/c are not reliable in that regime [1]. It also warns when z is above about 0.1 because the linear Hubble-law approximation becomes increasingly inaccurate as redshift grows and more complete cosmology is needed. It also reminds you that different measurement approaches give different published H0 values, so results can shift if you change H0 or apply an uncertainty range [3]. Inputs are validated to prevent negative distance, negative velocity, negative z, and non-positive H0, and to prevent H0 minus uncertainty from becoming non-positive.