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

    Ready to run the numbers?

    Open Comoving Distance Calculator