Comoving Distance & Lookback Time Calculator

Compute comoving distance, lookback time, luminosity distance, and angular diameter distance for any redshift in flat ΛCDM cosmology.

🌌 Comoving Distance & Lookback Time Calculator
Cosmology preset
Hubble constant H₀
km/s/Mpc
Matter density Ωm
Dark energy density ΩΛ
Object preset (optional)
Redshift z
Comoving Distance dC
Lookback Time tL
Luminosity Distance dL
Angular Diameter Distance dA
Lookback Time Fraction

🌌 What is Comoving Distance?

Comoving distance is the spatial separation between two objects measured in coordinates that stretch with the expansion of the universe. If two galaxies are at rest with respect to the cosmic expansion (no peculiar velocity), their comoving distance remains constant over time regardless of how fast the universe is expanding. The comoving distance to a galaxy at redshift z also equals the proper distance today (at the current cosmic time), making it the most useful measure for cosmological calculations.

To compute the comoving distance in an expanding universe, you cannot simply multiply the speed of light by the age of the object's light. As photons travel from a distant galaxy to Earth, the universe expands underneath them, stretching their wavelengths (producing the redshift) and adding extra path length. The comoving distance integral accounts for this: d_C = (c/H₀) × ∫₀^z dz′/E(z′), where E(z) = H(z)/H₀ is the dimensionless Hubble parameter. In the standard flat ΛCDM model, E(z) = √(Ω_m(1+z)³ + Ω_Λ). The denominator E(z) is larger at high redshift (where matter dominates and expansion was faster), so each unit of redshift at high z contributes less comoving distance than the same unit at low z.

Lookback time t_L is the time elapsed since the light was emitted. A lookback time of 13 Gyr means you are seeing the galaxy as it appeared 13 billion years ago. It is computed by a similar integral: t_L = (1/H₀) × ∫₀^z dz′/[(1+z′)E(z′)]. The extra factor (1+z′) converts from redshift to cosmic time. This calculator simultaneously computes four standard cosmological distances for any input redshift: comoving distance d_C, lookback time t_L, luminosity distance d_L = (1+z)d_C (used for flux measurements), and angular diameter distance d_A = d_C/(1+z) (used for angular size calculations).

This calculator uses numerical integration (Simpson's rule, 1,000 to 8,000 steps depending on z) with any of four standard cosmologies: Planck 2018 (H₀ = 67.4 km/s/Mpc, Ω_m = 0.315, Ω_Λ = 0.685), Planck 2015, WMAP9, or the SH0ES local measurement. The Hubble tension — the 5σ disagreement between Planck and SH0ES — directly affects the distance scale: the SH0ES value gives distances about 8% smaller than Planck at the same redshift.

📐 Formula

dC = (c / H₀) × ∫₀z dz′ / E(z′)     tL = (1 / H₀) × ∫₀z dz′ / [(1+z′) E(z′)]
E(z) = √[Ωm(1+z)³ + ΩΛ + Ωk(1+z)²] — dimensionless Hubble parameter; Ωk = 1 − Ωm − ΩΛ
c = 299,792.458 km/s (speed of light); c/H₀ is the Hubble distance (4,449 Mpc for H₀ = 67.4)
1/H₀ in Gyr = 977.78 / H₀ (where H₀ in km/s/Mpc); equals 14.507 Gyr for H₀ = 67.4
dL = (1+z) × dC (luminosity distance; use with F = L / 4πdL²)
dA = dC / (1+z) (angular diameter distance; physical size D subtends angle θ = D / dA)
Planck 2018: H₀ = 67.4 km/s/Mpc, Ωm = 0.315, ΩΛ = 0.685 (flat: Ωk = 0)

📖 How to Use This Calculator

Steps

1
Select a cosmology preset — Planck 2018 is the default and most widely used. Choose Custom to enter your own H₀, Ωm, and ΩΛ. The calculator adds Ωk = 1 − Ωm − ΩΛ automatically; a warning appears if the cosmology is not flat.
2
Enter the redshift z or use an object preset — the Object Preset dropdown fills in the redshift for the Virgo Cluster (z = 0.00366), Coma Cluster (z = 0.023), 3C 273 (z = 0.158), a typical SDSS galaxy (z = 0.5), GN-z11 (z = 10.957), or the CMB (z = 1100).
3
Read the four distance measures — Comoving distance dC is the present-day proper separation. Lookback time tL is when the light was emitted (in Gyr or Myr). Luminosity distance dL is for flux-luminosity calculations. Angular diameter distance dA is for physical-size-to-angle conversions.

💡 Example Calculations

Example 1 — Virgo Cluster (z = 0.00366)

Nearest galaxy cluster, Planck 2018 cosmology. At z = 0.00366, the expansion correction is negligible.

1
At z = 0.00366, E(z) ≈ 1.001 (essentially 1). Integral ≈ z = 0.00366 with <0.01% correction from Ω_m and Ω_Λ.
2
dC = (c/H₀) × 0.003657 = (299792.458/67.4) × 0.003657 = 4449.4 × 0.003657 = 16.28 Mpc = 53.1 Mly.
3
tL = (977.78/67.4) × 0.003655 = 14.507 × 0.003655 = 0.05303 Gyr = 53.0 Myr. Note: at small z, the lookback time in Myr equals the comoving distance in Mly to good approximation.
dC = 16.3 Mpc (53.1 Mly), tL = 53.0 Myr, dL = 16.4 Mpc, dA = 16.2 Mpc.
Try this example →

Example 2 — Quasar 3C 273 (z = 0.158)

Brightest known quasar, Planck 2018 cosmology. At z = 0.158, the expansion history begins to matter.

1
E(0.158) = √(0.315 × 1.158³ + 0.685) = √(0.315 × 1.5522 + 0.685) = √(1.1739) = 1.0835. The integral is reduced relative to the flat z/1 approximation because E(z) > 1 in the matter-influenced regime.
2
Numerical integration (1000 steps): ∫₀^0.158 1/E(z) dz ≈ 0.1519. dC = 4449.4 × 0.1519 = 676 Mpc = 2,205 Mly.
3
tL: ∫₀^0.158 1/[(1+z)E(z)] dz ≈ 0.1421. tL = 14.507 × 0.1421 = 2.062 Gyr. You are observing 3C 273 as it appeared 2.06 billion years ago.
dC = 676 Mpc (2,205 Mly), tL = 2.06 Gyr, dL = 783 Mpc, dA = 583 Mpc.
Try this example →

Example 3 — Galaxy GN-z11 (z = 10.957)

One of the most distant known galaxies, discovered by Hubble. At z = 10.957, the universe was only ~420 million years old.

1
At z = 10.957, matter completely dominates: E(10.957) = √(0.315 × 11.957³ + 0.685) ≈ √(0.315 × 1710 + 0.685) ≈ √(539.3) = 23.22. The integrand 1/E(z) is very small at these redshifts.
2
Numerical integration (4000 steps): ∫₀^10.957 1/E(z) dz ≈ 2.177. dC = 4449.4 × 2.177 = 9,685 Mpc = 31,600 Mly.
3
tL: ∫₀^10.957 1/[(1+z)E(z)] dz ≈ 0.9232. tL = 14.507 × 0.9232 = 13.39 Gyr. GN-z11 is seen as it appeared just 420 million years after the Big Bang (13.797 − 13.39 = 0.41 Gyr).
dC = 9,685 Mpc (31,600 Mly), tL = 13.39 Gyr, dL = 115,920 Mpc, dA = 810 Mpc.
Try this example →

Example 4 — CMB Last Scattering Surface (z = 1100)

The cosmic microwave background is the most distant light we can observe, emitted 380,000 years after the Big Bang when the universe first became transparent.

1
At z = 1100, the universe was 0.091% of its current size. E(1100) ≈ √(0.315 × 1101³) ≈ √(0.315 × 1.334e9) ≈ √(4.2e8) ≈ 20,484. The integrand is negligibly small above z = 100.
2
Numerical integration (8000 steps): ∫₀^1100 1/E(z) dz ≈ 3.183. dC = 4449.4 × 3.183 = 14,157 Mpc = 46,190 Mly. This is the radius of the observable universe.
3
tL ≈ 13.797 Gyr (essentially the entire age of the universe minus 380,000 years). The dA = 14,157/1101 = 12.86 Mpc shows that despite being 46 Gly away, patches of the CMB subtend surprisingly large angles on the sky (the first CMB acoustic peak is at ~1 degree).
dC = 14,157 Mpc (46,190 Mly) — radius of observable universe. tL = 13.797 Gyr. dA = 12.86 Mpc.
Try this example →

❓ Frequently Asked Questions

What is the comoving distance?+
The comoving distance d_C is the separation between two objects measured in coordinates that expand with the universe, so objects at rest in the Hubble flow maintain constant comoving separation. It equals the present-day proper distance to an object at redshift z: d_C = (c/H₀) × ∫₀^z dz'/E(z'). For Planck 2018 cosmology, the Hubble distance c/H₀ = 4,449 Mpc sets the overall scale, and the dimensionless integral is always less than this for any finite z.
What is lookback time?+
Lookback time is how long ago the observed light was emitted. For a galaxy at z = 1 in Planck 2018 cosmology, the lookback time is about 7.7 Gyr, meaning you observe the galaxy as it appeared 7.7 billion years ago. The formula is t_L = (1/H₀) × ∫₀^z dz'/[(1+z')E(z')]. For z → ∞, the lookback time approaches the age of the universe (13.797 Gyr in Planck 2018).
What is the difference between luminosity distance and comoving distance?+
The luminosity distance d_L = (1+z) × d_C accounts for two effects of redshift on observed flux: each photon's energy is reduced by 1/(1+z), and photons arrive at 1/(1+z) the original rate. Together these reduce the observed flux by 1/(1+z)². To preserve the inverse-square law F = L/(4πd²), you must use d_L = (1+z)d_C rather than d_C. At z = 0.158, d_L ≈ 783 Mpc but d_C ≈ 676 Mpc, a 16% difference.
Why does angular diameter distance decrease at high redshift?+
The angular diameter distance d_A = d_C/(1+z) peaks near z ≈ 1.5 (about 1,860 Mpc in Planck 2018 cosmology) and decreases at higher z. A galaxy at z = 10 has d_A ≈ 810 Mpc, smaller than at z = 1.5. This means a fixed physical object (say, a 10 kpc star-forming region) actually subtends a larger angle at z = 10 than at z = 1.5 — high-redshift galaxies do not appear progressively smaller as you push to higher z. This counterintuitive result is a genuine prediction of ΛCDM that is observationally confirmed.
What does the Hubble tension mean for these distances?+
The Hubble tension (H₀ = 67.4 from Planck vs H₀ = 73.0 from SH0ES) propagates directly into cosmological distances. For z = 1, Planck gives d_C ≈ 3,310 Mpc while SH0ES gives d_C ≈ 3,080 Mpc, a 7% difference. For Type Ia supernovae used to measure H₀ via the distance ladder, this tension has been scrutinized extensively but persists across independent probes as of 2025, suggesting a possible systematic in one or both methods, or new physics beyond standard ΛCDM.
What is the size of the observable universe?+
The observable universe has a comoving radius equal to the comoving distance to the cosmic microwave background last-scattering surface (z ≈ 1100), which is about 14,163 Mpc = 46.2 Gly in Planck 2018 cosmology. The diameter of the observable universe is therefore about 93 Gly. Because the universe expanded while the CMB photons were travelling, this is much larger than the naive 13.8 Gly (the age of the universe × c). Beyond this radius, any signals emitted at the Big Bang have not yet had time to reach us.
What is the comoving distance to Andromeda?+
Andromeda (M31) is approaching us (it is blueshifted, z ≈ −0.001) so the cosmological distance formula does not apply — it is not receding. The proper distance to Andromeda is determined from Cepheid parallax and tip-of-the-red-giant-branch methods, giving about 0.77 Mpc = 2.51 Mly. Use this calculator for objects with z > 0 (receding); for nearby blueshifted objects, use direct distance ladder methods.
How accurate is the numerical integration in this calculator?+
The calculator uses Simpson's rule with 1,000 to 8,000 steps depending on z (more steps at higher z where E(z) varies more steeply). For z < 10, the error is well below 0.01%. For z near 1,100 (the CMB), the radiation density Ω_r (omitted in this calculator) contributes a ~1% correction to comoving distance. For lookback time, the error is negligible across all z because the integrand is small at high z regardless of Ω_r.
Can I use this for galaxy survey analysis?+
Yes, for typical photometric and spectroscopic redshifts (z < 3), this calculator gives comoving distances accurate to better than 0.1% for flat ΛCDM. For precision work in galaxy surveys (converting from redshift-space to comoving-space coordinates, computing volumes, clustering correlation functions), you will also want to include peculiar velocity corrections and, at z > 5, the radiation density term. The formulas here follow the standard Hogg (1999) notation used across the observational cosmology literature.
What are the units Mpc and Gly?+
Mpc (megaparsec) = 10⁶ parsecs = 3.0857 × 10²² metres = 3.2616 million light-years. Gly (gigalight-year) = 10⁹ light-years = 9.461 × 10²⁵ metres. The conversion is 1 Mpc = 3.2616 Mly, so 1 Gpc = 3.2616 Gly. The Virgo Cluster at 16.3 Mpc = 53.2 Mly. The observable universe at 14,163 Mpc = 46.2 Gly. Astronomers prefer Mpc because it matches the natural scale of galaxy surveys; Gly gives more intuitive human-scale numbers.
What is Omega_m and Omega_Lambda?+
Ω_m (omega matter) is the present-day matter density (baryonic + dark matter) as a fraction of the critical density ρ_crit = 3H₀²/(8πG). For Planck 2018, Ω_m = 0.315, meaning 31.5% of the total energy content is in matter. Ω_Λ = 0.685 is the dark energy (cosmological constant) fraction, making up 68.5%. For a flat universe, these sum to 1. Matter density scales as (1+z)³ (diluted by volume), while dark energy density is constant, explaining why matter dominated at early times and dark energy dominates today (since z ≈ 0.3).
What is the light travel distance and how is it different from comoving distance?+
The light travel distance is c × t_L — the distance light would have covered at speed c in the lookback time. For z = 1, t_L = 7.73 Gyr, giving a light travel distance of 7.73 Gly. But the comoving distance to z = 1 is about 10,800 Mly (3.3 Gpc). The factor ~1.4 difference arises because space expanded while the light travelled, so the galaxy is now much farther away than the naive c × t estimate. The light travel distance is sometimes called the lookback distance and is the most common source of confusion in popular science descriptions of cosmological distances.

What is the comoving distance?

The comoving distance d_C between two objects is the spatial separation measured in coordinates that expand with the universe, so that the distance between two objects at rest in the Hubble flow is constant over time. It equals the proper distance today (at the current cosmic time). For a flat ΛCDM universe, d_C = (c/H₀) × ∫₀^z dz'/E(z') where E(z) = √(Ω_m(1+z)³ + Ω_Λ). It is the most natural measure of distance for cosmological calculations.

What is lookback time?

Lookback time is the time elapsed since light left the source and arrived at Earth. It equals the age of the universe minus the age of the universe when the light was emitted. For Planck 2018 cosmology and a galaxy at z = 1, the lookback time is about 7.7 Gyr — meaning you are observing the galaxy as it appeared 7.7 billion years ago. Lookback time is computed as t_L = (1/H₀) × ∫₀^z dz'/[(1+z')E(z')].

What is the difference between comoving distance and proper distance?

The proper distance is the physical separation between two objects at a given moment in cosmic time. For a galaxy at rest in the Hubble flow, the proper distance today equals the comoving distance, but the proper distance at the time of emission was d_proper(t_emit) = d_C / (1+z), which is the angular diameter distance. In other words: comoving distance is the present-day separation, angular diameter distance is the separation at the time the light was emitted, and luminosity distance is a larger quantity that preserves the inverse-square law for flux.

What is the luminosity distance?

The luminosity distance d_L relates the observed flux F of an object to its intrinsic luminosity L via L = 4πd_L²F. For a flat universe d_L = (1+z) × d_C. The extra (1+z) factor comes from two effects: the photon energies are redshifted by 1/(1+z) and the photon arrival rate is also reduced by 1/(1+z). The luminosity distance is used to calibrate Type Ia supernovae and underpins the discovery of dark energy.

What is the angular diameter distance?

The angular diameter distance d_A is defined so that a rod of physical size D at redshift z subtends an angle θ = D/d_A (in radians) on the sky. It equals d_A = d_C / (1+z) for a flat universe. The angular diameter distance has a counterintuitive property: it reaches a maximum at z ≈ 1.5 in Planck 2018 cosmology and then decreases at higher redshifts. This means very high-z galaxies subtend a larger angle per unit physical size than those at z ~ 1, making them appear bigger.

What is the Hubble tension?

The Hubble tension is the 5σ disagreement between the value of H₀ measured by Planck (67.4 km/s/Mpc) from the CMB power spectrum and the value measured by the SH0ES collaboration (73.04 km/s/Mpc) from Type Ia supernovae calibrated with Cepheid distances. A higher H₀ means the universe is expanding faster, making it younger and assigning smaller distances to high-z objects. The tension is unresolved as of 2025 and may indicate new physics beyond the standard ΛCDM model.

What is the comoving distance to the CMB?

The CMB photons last scattered at z ≈ 1100 when the universe was 380,000 years old. In Planck 2018 cosmology, the comoving distance to the last scattering surface is approximately 14,163 Mpc = 46,200 Mly. This is also known as the radius of the observable universe. The diameter of the observable universe is therefore about 93 Gly. Objects beyond 14,163 Mpc comoving are in principle unobservable, as their light has not had time to reach us.

Why does E(z) appear in the comoving distance formula?

E(z) = H(z)/H₀ is the dimensionless Hubble parameter. The Hubble parameter H(z) gives the expansion rate of the universe at redshift z. In flat ΛCDM, E(z) = √(Ω_m(1+z)³ + Ω_Λ). The comoving distance integral 1/E(z) is large where E(z) is small (the expansion is slow, so light travels far per unit redshift), and small where E(z) is large (rapid expansion at high z). This is why most of the comoving distance to the CMB is accumulated at low-to-moderate redshifts.

What does Ω_m + Ω_Λ = 1 mean?

In the Friedmann equation, the total energy density determines the spatial curvature of the universe. Ω_m is the fractional density in matter (baryonic + dark matter), Ω_Λ is the fractional density in dark energy (cosmological constant). If Ω_m + Ω_Λ = 1, the universe is spatially flat (zero curvature). CMB observations from Planck confirm flatness to within 0.5%. A flat universe means parallel geodesics stay parallel, and the sum of angles in a large triangle is exactly 180 degrees.

How is comoving distance different from light-travel distance?

The light-travel distance (sometimes called the lookback distance) is c × t_L, the speed of light times the lookback time. For z = 1 in Planck 2018 cosmology: t_L ≈ 7.73 Gyr, so light-travel distance ≈ 7.73 Gly. But the comoving distance to z = 1 is about 3,310 Mpc ≈ 10,800 Mly. The difference arises because space itself was expanding while the light was travelling, so the source is now much farther away than the distance implied by how long the light travelled.

What is a megaparsec?

A megaparsec (Mpc) is one million parsecs. One parsec equals 3.0857 × 10¹³ km = 3.2616 light-years. One megaparsec = 3.2616 million light-years = 3.0857 × 10²² metres. Cosmological distances are routinely measured in Mpc: the Milky Way and Andromeda are about 0.77 Mpc apart, the Virgo Cluster is about 16 Mpc away, and the observable universe extends to about 14,163 Mpc comoving.

Can this calculator handle redshifts above z = 1100?

This calculator supports z up to 2,000. For z > 1100 you enter the radiation-dominated era where the Ω_r(1+z)⁴ term becomes significant and cannot be ignored. The E(z) formula used here omits the radiation density Ω_r (≈ 9.4 × 10⁻⁵), which introduces < 0.01% error for z < 100 but grows to a few percent near z = 1100. For the CMB at z = 1100, the error from neglecting Ω_r is about 1% in comoving distance and negligible for lookback time (which is dominated by low-z cosmic time).