Cosmology

Age of the Universe Calculator

How old is the universe, and how far away is a galaxy at a given redshift? Enter the Hubble constant and matter density — try the Hubble-tension values side by side — and get the age, look-back time and cosmological distances.

Real Larzscript running in your browser454 automated checksOpen source · MITNo sign-up · your inputs never leave your device

Choose the cosmology

Age of the universe today
—
Hubble time 1/H₀
—
Look-back time to the galaxy
—
Age of the universe when its light left
—
Comoving distance
—
Luminosity distance
—
Angular-diameter distance
—

Age of the universe for different Hubble constants

At your matter density. The two dots are the local (73) and microwave-background (67.4) measurements.

Show the Larzscript program that just ran
Run a calculation to see the exact program.

This is the real program the page sent to the Larzscript interpreter (compiled to WebAssembly) in your browser. The library it imports is the same code the automated tests check.

How the age of the universe is calculated

In a flat universe containing matter (density parameter Ωm) and dark energy (ΩΛ = 1 − Ωm), the expansion rate at redshift z is H(z) = H₀·E(z) with

E(z) = √(Ωm(1+z)³ + ΩΛ)

The comoving distance to a galaxy at redshift z is (c/H₀)·∫0z dz′/E(z′), and the age of the universe is the integral of dt = da/(aH) from the Big Bang to today, both evaluated numerically here by Simpson's rule. For a matter-plus-dark-energy universe the age even has an exact closed form, t = 2/(3H₀√ΩΛ)·asinh(√(ΩΛ/Ωm)), which the library's tests use to check the numerical integration.

Worked examples, computed above

With the Planck 2018 parameters the universe is 13.796 billion years old and the Hubble time 1/H₀ is 14.507 billion years. A galaxy at redshift 1 has a comoving distance of 3 401.3 Mpc (11.09 Gly); we see it as it was 7.951 billion years ago, when the universe was 5.846 billion years old.

In a universe of matter alone (Einstein–de Sitter, Ωm = 1) with H₀ = 70 the age would be 9.3123 billion years — exactly two thirds of the Hubble time, which clashed with the estimated ages of the oldest stars — one of the arguments for dark energy that was settled by the supernova observations of 1998.

What is verified

Comoving distances are compared with an independent 200,000-step integration for eight combinations of H₀, Ωm and redshift up to z = 1100; ages are compared with the exact closed form; and matter-only universes are compared with the exact analytic result 2c/H₀·(1 − 1/√(1+z)). The Planck 2018 age (13.80 Gyr), the comoving distance to z = 1 (3.4 Gpc) and the Hubble-tension ordering are asserted.

Limits: flat ΛCDM without radiation or spatial curvature. Radiation matters only in the first ~50,000 years and changes today's age by a few million years at most; the published Planck age of 13.797 Gyr includes it, this calculation gives 13.796.

Frequently asked questions

How old is the universe?

About 13.8 billion years. The Planck satellite's measurement of the cosmic microwave background, interpreted with the standard flat ΛCDM model (H₀ = 67.4 km/s/Mpc, matter density Ωm = 0.315), gives 13.796 billion years in this calculation — the published value is 13.797 ± 0.023 billion years.

What is the Hubble constant?

The rate at which the universe is expanding today: a galaxy at distance d recedes at speed H₀ × d. It is quoted in kilometres per second per megaparsec. A value of 70 means a galaxy 100 megaparsecs away recedes at 7,000 km/s.

What is the Hubble tension?

Two careful ways of measuring H₀ disagree. The early-universe route (the microwave background) gives about 67.4, while the local distance ladder (supernovae calibrated with Cepheid stars) gives about 73.0 — a mismatch of roughly five standard deviations that nobody has explained. Switch between the two presets above: the higher value gives a universe 1.1 billion years younger (12.738 billion).

What is the difference between comoving, luminosity and angular-diameter distance?

They answer different questions in an expanding universe. Comoving distance is today's distance to a galaxy (for z = 1: 11.09 billion light-years). Luminosity distance is what makes the galaxy look as dim as it does: 22.19 billion light-years, larger by 1 + z. Angular-diameter distance, 1.701 Gpc, is what relates its true size to the angle it covers in the sky.

Can objects be more than 13.8 billion light-years away?

Yes. The universe kept expanding while the light travelled, so light-travel time is not the same as distance. The edge of the observable universe is about 46 billion light-years away in comoving terms. In this model the cosmic microwave background (z ≈ 1100) has a comoving distance of 45.45 billion light-years, although its light set out when the universe was only about 471 693 years old.

Every number on this page is computed by the open-source larzscript-cosmos library (astro, physconst, physmath), written in Larzscript, and checked against independent references in its test suite. How it is verified →

All physics calculators → · Science calculators hub · Chemistry calculators →