Astronomical Distance Calculator
Work out how far away a star or galaxy is. Convert between kilometres, au, light-years and parsecs, find distances from parallax, from the distance modulus or from Hubble’s law, and see how long the light has been travelling.
How to Use
- Pick a method: Parallax, Distance modulus, Hubble’s law, or Convert for plain unit conversion.
- Use the Find menu to choose the unknown, such as a distance from a parallax or a parallax from a distance. The answer appears in its own highlighted field.
- Enter the known values: a parallax in mas, arcseconds or µas, magnitudes (with optional extinction), a recession velocity or a redshift, or a distance in km, au, light-years or parsecs.
- For Hubble’s law, choose H₀: 67.4 km/s/Mpc from the Planck satellite, 73.04 from the SH0ES team, or your own value.
- Read the results, the distance in every unit and the light-travel time under the diagram, and check Show Work for each step.
Worked Example
Proxima Centauri from its parallax. Gaia Data Release 3 gives a parallax of 768.0665 ± 0.0499 mas, which is 0.7680665″. The distance is d = 1 ÷ 0.7680665 = 1.302 pc; times 3.2616 that is 4.246 light-years, or 268,551 au, so its light set off 4.246 years ago. With an apparent V magnitude of 11.13, its absolute magnitude is 11.13 − 5 log₁₀(1.302 ÷ 10) = 15.56: far too faint to see without a telescope, despite being the nearest star to the Sun.
Andromeda from its distance modulus. McConnachie’s 2012 survey of Local Group galaxies gives Andromeda (M31) a true distance modulus of 24.47. Then d = 10^(24.47 ÷ 5 + 1) = 10^5.894 = 783.4 kpc, which is 2.555 million light-years.
The common mistake: using milliarcseconds as arcseconds. Catalogues list parallaxes in mas. Putting Proxima’s 768.0665 straight into d = 1 ÷ p gives 0.001302 pc, about 268.6 au, less than nine times Neptune’s distance from the Sun. Divide by 1,000 first: 0.7680665″ gives the right 1.302 pc. A similar slip is using the natural log in the distance modulus, which turns Andromeda’s 783.4 kpc into 1,335 pc.
Show Work
Formulas
Measuring the Universe
Stellar parallax was predicted as soon as Copernicus put the Earth in motion, but it is so small that nobody measured it until 1838, when Friedrich Bessel found about a third of an arcsecond for the star 61 Cygni. Thomas Henderson (Alpha Centauri) and Friedrich Struve (Vega) published parallaxes at around the same time. The word parsec, a parallax of one arcsecond, was coined by Herbert Hall Turner in 1913. Space missions changed the scale: ESA’s Hipparcos (1989–1993) measured about 118,000 stars, and Gaia, launched in 2013, has measured parallaxes for well over a billion; its third data release in 2022 is the source of the Proxima Centauri value used here.
The magnitude scale goes back to the star catalogues of ancient Greece, and Norman Pogson put it on a mathematical footing in 1856, making 5 magnitudes exactly a factor of 100 in brightness. That is where the 5 log₁₀ in the distance modulus comes from. In 1929 Edwin Hubble, building on Georges Lemaître’s 1927 work, showed that galaxies recede at speeds proportional to their distance. Its slope H₀ is still argued over: the Planck satellite (2018) gives 67.4 ± 0.5 km/s/Mpc, while Riess and the SH0ES team (2022) find 73.04 ± 1.04 from Cepheids and supernovae.
Unit definitions follow the IAU: the astronomical unit fixed at 149,597,870,700 m in 2012 and the parsec defined as 648,000/π au in 2015. Star data: Gaia DR3 (Proxima Centauri), the Hipparcos new reduction by van Leeuwen, 2007 (Sirius, 379.21 ± 1.58 mas), V magnitudes from the SIMBAD database, and the Andromeda modulus from McConnachie (2012).
About This Tool
This calculator works out astronomical distances four ways: from a parallax (or the parallax a distance would give), from the distance modulus with optional extinction, from Hubble’s law with a choice of H₀, and by plain conversion between km, au, light-years and parsecs up to gigaparsecs. Each result comes with the light-travel time, the distance in every unit and a picture: the parallax geometry, the object on a distance ladder beside well-known stars and galaxies, or its place on the Hubble diagram with both measured values of H₀.
Everything runs in your browser; nothing you enter is sent anywhere.
Related tools: Inverse-Square Law Calculator, Black-Body Radiation Calculator, and Hohmann Transfer Orbit Calculator.
Frequently Asked Questions
How do you find a star’s distance from its parallax?
As Earth goes round the Sun, a nearby star shifts against the far background. Half that shift, in arcseconds, is the parallax p, and the distance in parsecs is d = 1 ÷ p. Gaia DR3 measures Proxima Centauri’s parallax as 768.0665 mas (0.7680665″), so it is 1 ÷ 0.7680665 = 1.302 pc, or 4.246 light-years, away.
How many light-years are in a parsec?
One parsec is 3.2616 light-years. The IAU defines it as 648,000/π au = 206,264.8 au, which is 3.0857 × 10¹⁶ m. A light-year, the distance light travels in a Julian year of 365.25 days, is 9.4607 × 10¹⁵ m or 63,241.08 au.
What is the distance modulus?
It is the difference between how bright something looks (apparent magnitude m) and how bright it really is (absolute magnitude M, its brightness at 10 pc): m − M = 5 log₁₀(d ÷ 10 pc). Andromeda’s modulus of 24.47 gives 10^(24.47 ÷ 5 + 1) = 783.4 kpc, or 2.555 million light-years. Sirius, at magnitude −1.46 and 2.637 pc, has M = 1.434.
What is the Hubble tension?
Two precise ways of measuring the expansion rate disagree. The Planck satellite’s map of the early universe gives H₀ = 67.4 ± 0.5 km/s/Mpc; the SH0ES team’s Cepheids and supernovae give 73.04 ± 1.04, a 5-sigma difference by their account. A galaxy 100 Mpc away recedes at 6,740 km/s on one value and 7,304 km/s on the other, and 1/H₀ is 14.51 against 13.39 billion years.
Why can’t Hubble’s law give the distance to Andromeda?
Andromeda is moving towards us at about 300 km/s, because it is bound to our Local Group by gravity. At 0.783 Mpc the expansion would only carry it away at 67.4 × 0.783 = 52.8 km/s, far less than its own motion. Hubble’s law is only useful beyond roughly 10 Mpc, and z ≈ v/c only holds for small redshifts, below about 0.1.
How do I use the Astronomical Distance Calculator?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Do I need to install or sign up for anything?
Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.
Is my information private?
Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.
Common Use Cases
Star catalogues
Turn a Gaia parallax into a distance: 10 mas is 100 pc, which is 326.2 light-years.
Light-travel time
Sunlight takes 499.0 s (8.317 minutes) to cross 1 au; a signal from a probe at Neptune’s 30.07 au takes 4.168 hours.
Standard candles
A star of known absolute magnitude 0 seen at magnitude 10 is 1,000 pc away, but only 631 pc if 1 magnitude of dust dims it.
Galaxy redshifts
A galaxy at z = 0.01 recedes at 2,998 km/s, putting it 41.04 Mpc away with the SH0ES H₀ or 44.48 Mpc with Planck’s.
Astronomy homework
Convert between units: 1 pc = 3.2616 ly = 206,264.8 au, and Andromeda at 783.4 kpc is 2.555 million light-years.
Last updated: