Redshift Calculator

Compute cosmological distances, lookback time and recession velocity from redshift z.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

The redshift calculator converts a cosmological redshift z into the full set of quantities astronomers use every day: comoving distance, luminosity distance, angular diameter distance, lookback time, scale factor, CMB temperature at that epoch, and distance modulus. It also works backwards — enter a recession velocity or a pair of wavelengths and it derives z for you. A spectral-line table shows where Hα, Lyman-α, Ca K, Mg II and other lines fall in the observed spectrum at your chosen z, so you can instantly tell whether a feature falls in the optical, near-infrared or beyond.

How it works

The redshift definition

Redshift is defined by comparing the rest-frame wavelength λ₀ of a spectral line (known from laboratory measurements) to its observed wavelength λ:

z = (λ − λ₀) / λ₀ = λ / λ₀ − 1

A positive z means the light has been stretched (source receding); a negative z means it has been compressed (source approaching, e.g. Andromeda at z ≈ −0.001).

Recession velocity — special-relativistic Doppler

For a source moving at velocity v relative to the observer, the special-relativistic Doppler formula links v and z exactly:

(z + 1)² = (1 + β) / (1 − β) where β = v/c

Solving for β:

β = ((z+1)² − 1) / ((z+1)² + 1)

This always keeps v below c for any finite z, unlike the Hubble approximation v = z·c which breaks down above z ≈ 0.3.

Cosmological distances (flat ΛCDM)

In modern cosmology distances are computed by integrating along the light path, weighted by how fast the universe was expanding at each moment. The comoving distance is:

D_C = (c / H₀) × ∫₀ᶻ dz′ / E(z′)

where E(z) = sqrt(Ω_m(1+z)³ + Ω_Λ) captures the combined effect of matter and dark energy. The calculator uses 1 000-step numerical integration with the Planck 2018 parameters H₀ = 67.4 km/s/Mpc, Ω_m = 0.315, Ω_Λ = 0.685.

From D_C the other distances follow directly:

  • Luminosity distance D_L = (1 + z) × D_C — used to infer intrinsic brightness.
  • Angular diameter distance D_A = D_C / (1 + z) — governs apparent angular size.
  • Distance modulus μ = 5 log₁₀(D_L / 10 pc) = 5 log₁₀(D_L·10⁵) for D_L in Mpc.

Lookback time

t_LB = (1/H₀) × ∫₀ᶻ dz′ / ((1+z′) × E(z′))

This tells you how many billion years ago the light was emitted. The age of the universe when the photon set out is 13.787 − t_LB Gyr.

Scale factor and CMB temperature

The scale factor a = 1/(1+z) expresses how compressed the universe was relative to today. At z = 1, a = 0.5 — the universe was half its current linear size. The cosmic microwave background temperature at redshift z scales as T(z) = 2.725 × (1+z) K.

Worked example — galaxy at z = 1

A typical deep-field galaxy at z = 1:

QuantityValue
Scale factor a0.5
Recession velocity~179,875 km/s (0.600 c)
Comoving distance~3 300 Mpc (10.8 Gly)
Luminosity distance~6 600 Mpc (21.5 Gly)
Lookback time~7.7 Gyr
Distance modulus~44.1 mag
CMB temperature~5.45 K

The Hα emission line (rest 656.3 nm, red visible light) is observed at 656.3 × 2 = 1312.6 nm — well into the near-infrared, which is why high-z galaxy surveys rely on infrared detectors such as JWST NIRCAM.

Formula note

The integrals for D_C and t_LB have no closed-form solution in general ΛCDM, so this calculator uses straightforward Riemann summation with 1 000 and 2 000 equal-width steps respectively. The relative error is well below 0.01 % for z up to a few thousand (CMB surface at z ≈ 1100 is supported). Everything runs locally in your browser — no network requests are made.

Ad placeholder (rectangle)