What is the conversion between redshift $z$ and lightyears?

When an article says that some object is at a distance of $z = 1$, then what distance are we talking about in light years or parsec?


3 Answers 3


You need to solve this problem

$$ H(a) = \frac{\dot{a}}{a} \tag{1} $$

where $a = 1 / (1 + z)$ is the scale factor, $H$ is the Hubble parameter and follows the Friedmann equation

$$ \left(\frac{H(z)}{H_0}\right)^2 = \Omega_{m,0}(1 + z)^{3} + \Omega_{\Lambda,0} + \Omega_{\gamma,0}(1 + z)^{4} = E(z) \tag{2} $$

and I have assumed that the curvature is flat. Replacing (2) in (1) you get

$$ t = \int_{1 / (1 + z)}^{1}\frac{{\rm d}a}{aH(a)} = \frac{1}{H_0}\int_{1 / (1 + z)}^{1}\frac{{\rm d}a}{aE^{1/2}(a)} $$

In this case $t$ is the age of the universe at that particular redshift. There are many online tools that allow you to calculate this number if you know the cosmology $(\Omega_{m,0}, \Omega_{\Lambda}, \cdots)$

  • $\begingroup$ What is $E(z)$? $\endgroup$ Mar 24, 2017 at 20:45
  • $\begingroup$ @ja72 $E(z)=(H(z)/H_0)^{2}$ $\endgroup$
    – caverac
    Mar 27, 2017 at 11:56
  • $\begingroup$ I not forgot an excellent user also of TeX.SE. $\endgroup$
    – Sebastiano
    Jul 19, 2020 at 23:27
  • 1
    $\begingroup$ @Sebastiano Always such a pleasure to hear from you $\endgroup$
    – caverac
    Jul 20, 2020 at 2:26
  • $\begingroup$ @caverac Same also for me :-) $\endgroup$
    – Sebastiano
    Jul 20, 2020 at 8:07

caverac answers excellently how long time a photon that was emitted from a galaxy observed at redshift $z$ has been traveling, i.e. how far do we look into the past. And this is closely related to the distance to that object (which is what you request).

In cosmology, several distance measures are used. I'm guessing the one you're interested in is the current distance to the given object, say a galaxy, at redshift $z$. That is, if we froze the Universe in time right now and laid out measuring rods from here to that galaxy, how far would it be (other distances include the distance when the light was emitted, and the distance that satisfies the inverse-square law).

This distance (which today is equal to the so-called "comoving distance") is not simply equal to the speed of light $c$ times the time $t$ it took to get here (which is given in caverac's answer). The reason is that during the journey of the photon, the Universe has expanded. To get the correct distance, you need to integrate over the expansion: $$ d(z) = \frac{c}{H_0} \int_0^z \frac{dz'}{E(z')}, $$ where $H_0$ is the Hubble constant and $E(z)$ (defined in caverac's answer) is a function of redshift and the densities of the components of the Universe (matter, dark energy, radiation).

For instance, for $z=1$, $d=3.4\,\mathrm{Gpc} =$ 11 billion lightyears.

So, calculating the distance is not straightforward, but you can use online calculators like the one referred to in caverac's answer, or, if you know Python, you can use the following$^\dagger$ (assuming negligible radiation in a flat Universe):

from astropy.cosmology import Planck15
from astropy import units as u
z = 1
d = Planck15.comoving_distance(z)
print('Distance in million lightyears:', d.to(u.Mlyr))

Or you can refer to this figure which I made, using the above piece of code:


$^\dagger$This piece of code uses the popular astronomy package astropy, which can be installed with pip install astropy.

  • 1
    $\begingroup$ This would be better if you included a link to whatever cosmolopy is, since my Python says ImportError: No module named cosmolopy when I try importing it $\endgroup$
    – Kyle Kanos
    Nov 22, 2016 at 14:47

Things can be a little more subtle than they might first look, because of the many kinds of distances one can define in cosmology.

The light travel time distance, which is basically $c(t_0-t_e)$ where $t_0$ is the present time and $t_e$ the time when the light currently perceived from this object was emitted at. Since $H = \frac{1}{a}\frac{da}{dt}$ :

\begin{equation} d_{\Delta t} = c\int_{t_e}^{t_0} dt = c\int_{1/(1+z)}^{1} \dfrac{da}{a H(a)} \end{equation}

This distance is not directly accessible experimentally. It can be computed from the redshift - which is easily measured - provided you know the cosmology, i.e. the relation between the expansion rate $H$ and the scale factor $a$. This entirely depends on the content of the universe.

The comoving distance, which can be defined as the physical distance at the present time between two immobile points in the Hubble flow, is given by : \begin{equation} \chi = c\int_{t_e}^{t_0} \dfrac{dt}{a(t)} = c\int_{1/(1+z)}^{1} \dfrac{da}{a^2 H(a)} \end{equation} This distance also has a very strong meaning - it is constant by definition -, but not one that makes it easier to measure directly.

Another kind of distance is the luminosity distance. It is defined as the distance $d_L$ such that the flux received from a source of light of power $P$ follows the inverse square law : \begin{equation} F = \dfrac{P}{4\pi d_L^2} \end{equation} This distance accounts for the effects of the dilution of energy following the expansion of the wavefront, as well as the "energy loss" due to the redshift. For a flat geometry, this distance is : \begin{equation} d_L = (1+z) \chi \end{equation} This distance can be measured if $P$ is known.

Other distances can be defined, which are more useful depending on the context. For nearby objects, they all tend to $\sim cz/H_0$.


Not the answer you're looking for? Browse other questions tagged or ask your own question.