Distance Modulus Calculator

Find stellar distance from apparent and absolute magnitude.

Physics and EnergyUpdated 2026-11-202 min read
Distance Modulus Calculator
How bright the star looks from Earth.
How bright the star would look at 10 parsecs.
Distance modulus
...
Distance in parsecs...
Distance in light years...

What it does

The distance modulus links how bright a star looks with how bright it really is. Apparent magnitude measures the light received at Earth. Absolute magnitude is the magnitude the star would have if it were placed at a standard distance of 10 parsecs.

The University of Nebraska astronomy classroom explains that comparing apparent brightness with intrinsic luminosity works because of the inverse square law. A light bulb carried into the distance looks dimmer in a predictable way, and the same logic applies to stars.

The distance modulus is m minus M. Since the magnitude scale is logarithmic and five magnitudes correspond to a factor of 100 in brightness, the relation becomes m minus M = 5 log10(d) - 5 when d is in parsecs.

This tool computes the modulus from the two magnitudes and then solves for distance in parsecs and light years. It is the same method parallax users apply once a distance is known, run in the opposite direction.

The result assumes no interstellar extinction. Dust between us and the star makes it look dimmer, which inflates the apparent magnitude and overstates the distance unless corrected.

How to use

  1. Enter the apparent magnitude as seen from Earth.
  2. Enter the absolute magnitude at 10 parsecs.
  3. Read the distance modulus, which is the first magnitude minus the second.
  4. Check the distance in parsecs from the inverse relation.
  5. Convert to light years using the value shown.
  6. Try m = 5 and M = 0 to confirm a modulus of 5 and a distance of 100 parsecs.

Formula

m - M = 5 log10(d) - 5, with d in parsecs. Therefore d = 10^((m - M + 5)/5).
m
Apparent magnitude, the brightness observed from Earth.
M
Absolute magnitude, the brightness at a distance of 10 parsecs.
m - M
Distance modulus.
d
Distance to the object in parsecs.

The engine works with base ten logarithms through the power expression, so no logarithm table is needed. Magnitudes are limited to a range that keeps the resulting distance finite and displayable.

Worked example

Example: modulus 5

A star has apparent magnitude 5 and absolute magnitude 0.

  1. The distance modulus is m - M = 5 - 0 = 5.
  2. A modulus of 5 means the star is dimmer than it would look at 10 parsecs by five magnitudes.
  3. Five magnitudes correspond to a brightness factor of 100, and brightness falls with distance squared.
  4. The distance is therefore 10 times the standard 10 parsecs, so 100 parsecs.
  5. Using the formula: d = 10^((5 + 5)/5) = 10^2 = 100 parsecs.
  6. In light years that is 100 x 3.261563777 = 326.16 ly.
  7. The tool reports modulus 5.000, distance 100.00 pc and 326.16 ly.

Reference table

Distance modulus and distance
Distance modulusDistance parsecsDistance light years
01032.62
5100326.16
101,0003,261.56
1510,00032,615.64
-513.26

Limits

  • Interstellar extinction is not included and makes real distances larger than this simple estimate.
  • The method needs an independent estimate of absolute magnitude.
  • Magnitudes must be measured in the same band, such as visual magnitude.
  • The tool does not propagate uncertainty in either magnitude.

Common mistakes

  • Subtracting absolute from apparent magnitude in the wrong order.
  • Using a logarithm base other than ten.
  • Forgetting that the distance in the formula is in parsecs.
  • Comparing magnitudes from different filters.
  • Ignoring dust extinction when the line of sight passes through the galactic plane.

Try it yourself

Quick checks. Answers sit tucked under each question.

What distance corresponds to a modulus of 5?

100 parsecs, or about 326.16 light years.

What does a distance modulus of zero mean?

The object is at the standard distance of 10 parsecs.

How does distance change when the modulus rises by 5?

It increases by a factor of 10, because distance is a power of ten in the modulus relation.

Questions

What is distance modulus?

Apparent magnitude minus absolute magnitude, a logarithmic measure of how far away an object is.

What is absolute magnitude?

The magnitude a star would have if it were 10 parsecs away.

Why is there a minus five in the formula?

Because absolute magnitude is defined at 10 parsecs, and log10 of 10 is one.

How is this related to parallax?

Parallax gives distance geometrically for nearby stars. Distance modulus gives it from brightness once absolute magnitude is known.

What is the effect of dust?

Dust dims the star, increasing apparent magnitude and making the calculated distance too large unless corrected.

Can this be used for galaxies?

Yes, when a reliable absolute magnitude or standard candle calibration is available.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.