Distance Modulus Calculator
The distance to a star or galaxy from the difference between its apparent and absolute magnitudes — the distance modulus — allowing for interstellar extinction, or the absolute magnitude from a known distance.
Brightness falls with the square of distance, and five magnitudes is a factor of 100, so m − M = 5 log₁₀(d ÷ 10 pc).
How the distance modulus calculator works
Brightness falls with the square of distance, and five magnitudes is a factor of 100, so m − M = 5 log₁₀(d ÷ 10 pc). Dust along the line of sight dims the object further by an extinction A, which must be subtracted from the modulus or the distance comes out too large. Standard candles — Cepheids, RR Lyrae stars, type Ia supernovae — are objects whose absolute magnitude is known, which is what makes the method work.
Formula: m − M − A = 5 log₁₀(d) − 5; d = 10^((m − M − A + 5) ÷ 5) pc
Worked examples
| Inputs | Result | Note |
|---|---|---|
| m 12.5, M −3.5, A 0.3 | 13.804 kpc | 13.8 kpc |
| A type Ia supernova at m 19, M −19.3 | 457.088 Mpc | 457 Mpc |
| Absolute magnitude of a star at 100 pc with m 7 | M = 2 | M = 2 |
FAQFrequently asked questions
What is a standard candle?
An object whose absolute magnitude is known from physics: Cepheid variables from their pulsation period, RR Lyrae stars (about +0.6), type Ia supernovae (about −19.3), the tip of the red giant branch. Measure its apparent magnitude and the modulus gives the distance.
Why does extinction matter?
Interstellar dust dims and reddens starlight — about 1 magnitude per kiloparsec in the Galactic plane. Leaving it out makes objects seem farther: 0.3 magnitudes of extinction is a 15% error in distance.
How is extinction measured?
From reddening: compare the observed colour with the intrinsic colour for the spectral type, and multiply the colour excess by about 3.1 for the visual extinction. Dust maps of the sky give it for a given direction and distance.
What is a parsec?
The distance at which one astronomical unit subtends one arcsecond — 3.26 light-years, 3.086 × 10¹⁶ m. It is the natural unit of the parallax method, and the distance modulus is defined at 10 of them.
Where these figures come from
- NIST — CODATA 2018 fundamental physical constants — G and the speed of light
- IAU 2015 Resolution B3 — nominal solar and planetary conversion constants — the astronomical unit, solar mass and planetary radii
- CSIRO Space and Astronomy — Australia's national science agency
Last checked: September 2026. Constants are CODATA 2018 (G, c) and IAU 2015 nominal values (solar and planetary parameters).