Distance Modulus Calculator Formula

Understand the math behind the distance modulus calculator. Each variable explained with a worked example.

Formulas Used

Distance Modulus (m - M)

modulus = app_mag - abs_mag

Distance

distance_pc = pow(10, (app_mag - abs_mag + 5) / 5)

Distance (ly)

distance_ly = pow(10, (app_mag - abs_mag + 5) / 5) * 3.26156

Variables

VariableDescriptionDefault
app_magApparent Magnitude (m)1.43
abs_magAbsolute Magnitude (M)-5.14

How It Works

Distance Modulus

The distance modulus (m - M) connects apparent and absolute magnitudes to distance.

Formula

d = 10^((m - M + 5) / 5) parsecs

This is the inverse of the magnitude-distance relation and is fundamental to the cosmic distance ladder.

Worked Example

A Cepheid variable has m = 1.43 and M = -5.14.

app_mag = 1.43abs_mag = -5.14
  1. 01Distance modulus = m - M = 1.43 - (-5.14) = 6.57
  2. 02d = 10^((6.57 + 5)/5) = 10^(11.57/5) = 10^2.314
  3. 03d ≈ 206 pc ≈ 672 ly

Ready to run the numbers?

Open Distance Modulus Calculator