Comoving Distance Calculator Formula

Understand the math behind the comoving distance calculator. Each variable explained with a worked example.

Formulas Used

Comoving Distance

comoving_dist_mpc = (2.998e5 * redshift) / hubble_constant

Distance (Mly)

comoving_dist_mly = (2.998e5 * redshift) / hubble_constant * 3.2616

Variables

VariableDescriptionDefault
redshiftRedshift (z)0.1
hubble_constantHubble Constant (H0)(km/s/Mpc)70

How It Works

Comoving Distance Approximation

At low redshifts the comoving distance is well approximated by the linear Hubble relation.

Formula

d = c z / H0

  • *c* = 299 800 km/s (speed of light)
  • *z* = observed redshift
  • *H0* = Hubble constant
  • The result is in Mpc. For z above about 0.3, higher-order corrections become important.

    Worked Example

    A galaxy at redshift z = 0.1 with H0 = 70 km/s/Mpc.

    redshift = 0.1hubble_constant = 70
    1. 01d = c z / H0
    2. 02d = 299800 * 0.1 / 70
    3. 03d = 29980 / 70
    4. 04d ≈ 428.3 Mpc ≈ 1396 Mly

    Frequently Asked Questions

    What is comoving distance?

    It is the distance between two objects measured in a reference frame that expands with the universe. It remains constant as the universe grows.

    When does this linear approximation break down?

    For redshifts above about 0.3, the non-linear effects of the expansion history (matter and dark energy content) become significant.

    How does comoving distance differ from luminosity distance?

    Luminosity distance accounts for the dimming of light due to expansion: d_L = d_comoving * (1 + z). It is always larger than the comoving distance.

    Ready to run the numbers?

    Open Comoving Distance Calculator