Skip to content
Omnikalc

Distance modulus calculator: how far away is an object, from its apparent and absolute magnitude?

Enter the apparent magnitude, the absolute magnitude and the extinction to get the distance modulus and the distance in parsecs, light-years, kiloparsecs and megaparsecs.

Updated on
Your inputs

Value out of range

Value out of range

mag

Value out of range

Results

Distance

13,804 pc

Distance modulus
15.70 mag
Distance in light-years
45,022 ly
Distance in kiloparsecs
13.8 kpc
Distance in megaparsecs
0.0138 Mpc

The distance of a star follows from how much fainter it looks than it really is. The distance modulus calculator takes the apparent magnitude, the absolute magnitude and the dust extinction and gives the distance modulus and the distance in parsecs, light-years, kiloparsecs and megaparsecs.

How the calculation works

  • Enter the apparent magnitude m (how bright the object looks) and the absolute magnitude M (how bright it would look at 10 parsecs).
  • Enter the extinction A, the dimming by interstellar dust along the line of sight, in magnitudes (0 if you ignore it).
  • The distance modulus is μ = m − M − A, which is 5 log₁₀(d) − 5 with d in parsecs.
  • The distance is d = 10^(μ/5 + 1) parsecs. The result is also given in light-years, kiloparsecs and megaparsecs.

Example

A Cepheid variable star has an absolute magnitude M = −3.5 (from its period) and looks like m = 12.5, with 0.3 mag of dust extinction. The distance modulus is 12.5 + 3.5 − 0.3 = 15.70 mag, so the distance is 10^(15.7/5 + 1) = about 13,800 pc, or 45,020 light-years. That is outside the solar neighborhood but inside our galaxy.

Why it matters

The distance modulus is the standard language of extragalactic distance measurement. It links the standard candles to the cosmic distance ladder, from Cepheids in the nearest galaxies to supernovae at cosmological distances, and it is used to compare the distances of galaxies, clusters and stars in a single unit.

Good to know

The formula assumes that the absolute magnitude is known and that the magnitudes are measured in the same photometric band, with the extinction in that band. In practice, standard candles have a scatter of 0.1 to 0.5 magnitude, which means a distance uncertainty of 5 to 25 %, and the extinction is itself uncertain. At cosmological distances, the redshift also dims and reddens the light (the K-correction), which the calculator does not include, and the distance is a luminosity distance.

The star distance calculator gives the distance of near stars from their parallax, the redshift calculator and the Hubble law calculator cover the distant galaxies, and the stellar luminosity calculator links the absolute magnitude to the power of a star.

Frequently asked questions

What is the distance modulus?

It is the difference between the apparent magnitude m and the absolute magnitude M of an object, μ = m − M. Since brightness falls as the square of the distance, the modulus is a direct measure of distance: μ = 5 log₁₀(d / 10 pc). A modulus of 0 means 10 parsecs, 5 means 100 parsecs and 10 means 1,000 parsecs.

What are apparent and absolute magnitude?

The apparent magnitude is how bright the object looks from the Earth, on a logarithmic scale where a lower number is brighter and 5 magnitudes are a factor of 100 in brightness. The absolute magnitude is the apparent magnitude that the object would have at a standard distance of 10 parsecs, so it measures the true luminosity. The Sun has M = 4.83 and m = −26.74.

Where does the absolute magnitude come from?

From standard candles, objects of known luminosity: Cepheid variables and RR Lyrae stars, whose period gives the luminosity, and type Ia supernovae, which all peak at about M = −19.3. A star on the main sequence has an absolute magnitude that can be estimated from its spectral type. Comparing it with the apparent magnitude then gives the distance.

Why take the extinction into account?

Interstellar dust absorbs and scatters light, so the object looks fainter than the distance alone would give. If it is ignored, the distance is overestimated. Near the plane of the galaxy, the extinction in the visible is about 1 to 2 magnitudes per kiloparsec, and an error of 1 mag changes the distance by 60 %.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.