Stellar Magnitude & Distance Modulus Calculator
Convert between apparent magnitude, absolute magnitude and distance with m − M = 5 log d − 5 + A, including an optional interstellar extinction term.
Stellar Magnitude Calculator
Background.
Two different numbers are called a star's "magnitude", and confusing them is one of the most common mistakes in amateur astronomy. Apparent magnitude, m, is how bright something looks from here — it depends on the object's real output, on how far away it is, and on how much dust the light crossed. Absolute magnitude, M, is how bright it would look from a standard distance of exactly 10 parsecs, so it strips the distance out and describes the object itself. The bridge between them is the distance modulus, m − M = 5 log₁₀(d/pc) − 5 + A, and this calculator solves it for whichever of the three quantities you are missing.
The 10-parsec reference is not arbitrary trivia — it is the definition. ESA's own education material puts it plainly: absolute magnitude is "what the apparent magnitude of that star would be if it were placed exactly 10 parsecs away from the Sun". Set the distance on this page to 10 and the modulus comes out exactly zero, and m and M are equal. Anything closer than 10 pc has a negative modulus, because it looks brighter than its absolute magnitude; anything further has a positive one.
Magnitudes run backwards, and by a specific factor. Pogson's 1856 convention fixed five magnitudes as exactly a hundredfold in brightness, so one magnitude is 100^(1/5) = 2.5118864 and the sign is negative — brighter objects have smaller, often negative, numbers. That is why Sirius at m = −1.46 is brighter than Vega at m = 0.03, and why the Sun's apparent magnitude of about −26.8 is such an extreme number.
The caveat that matters most, and it belongs here rather than in a footnote: **the relation is band-agnostic but not band-mixing**. It works in the V band, in Gaia's G band, in bolometric magnitudes, in anything — provided m, M and A are all measured in the same one. A catalogue V magnitude combined with a bolometric absolute magnitude produces a distance that is simply wrong, and nothing in the arithmetic will warn you, because the equation has no idea which filter you used. This calculator does not know either, and says so on every result.
The second caveat is extinction. Interstellar dust dims starlight, so a real observed magnitude is fainter than the pure inverse-square value. If you ignore that — leave A at zero when it should not be — the dimming gets misread as distance, and the object comes out **further away than it really is**. In directions well out of the Galactic plane the effect is small; along the plane it can be several magnitudes, which is a factor of several in inferred distance. The extinction field lets you correct for it if you have an estimate for that specific line of sight, and the result note tells you which mode you are in.
On conventions: magnitudes are dimensionless, distance is in parsecs (converted to light-years at the exact IAU ratio 3.2615637772), and extinction is constrained to be zero or positive because dust cannot brighten anything. A distance of zero is rejected, because the modulus contains log₁₀(d). All arithmetic runs at 40 significant digits and is rounded only at the end.
What is stellar magnitude calculator?
The distance modulus is the difference between an object's apparent and absolute magnitudes, μ = m − M. Because absolute magnitude is defined as the apparent magnitude at 10 parsecs, and flux falls as the inverse square of distance, the modulus is a pure function of distance: μ = 5 log₁₀(d/pc) − 5. Adding interstellar extinction A, which dims the source in the same band, gives the full observed form m − M = 5 log₁₀(d/pc) − 5 + A.
Each of the three quantities can be the unknown. Given m and a distance, M = m − 5 log₁₀(d) + 5 − A. Given M and a distance, m = M + 5 log₁₀(d) − 5 + A. Given both magnitudes, d = 10^((m − M − A + 5)/5). This last form is how standard candles work: if you know an object's intrinsic brightness — a Cepheid from its period, a Type Ia supernova from its light-curve shape — measuring how bright it looks gives its distance directly.
The modulus is a convenient logarithmic ruler in its own right. It is 0 at 10 pc, −5 at 1 pc, +5 at 100 pc, +10 at 1 kpc and +25 at 1 Mpc; every factor of ten in distance is exactly five magnitudes. Extragalactic distances are routinely quoted as moduli rather than in parsecs for exactly this reason.
How to use this calculator.
- Pick which of the three quantities you are solving for.
- Enter the two you have. Make sure both magnitudes are in the same photometric band — mixing a V magnitude with a bolometric one gives a wrong answer silently.
- Enter an extinction estimate if you have one for that line of sight. Leave it at zero only if you know the sightline is clean, or accept that the distance will come out too large.
- Read the primary result, and check the true (geometric) modulus against the observed one to see how much of the dimming you attributed to dust.
- If you need a distance to start from, get it from a parallax on the parallax distance calculator; if you need to compare two objects' brightnesses, use the apparent magnitude calculator.
The formula.
Start from the inverse-square law. An object at distance d delivers a flux (10/d)² times what the same object would deliver at 10 pc. Convert that ratio to magnitudes with the Pogson factor of −2.5 log₁₀ and you get m − M = −2.5 log₁₀((10/d)²) = 5 log₁₀(d/10) = 5 log₁₀(d) − 5. Add A for extinction, which dims the source and therefore increases m, and the full relation is m − M = 5 log₁₀(d) − 5 + A.
The three solves are algebraic rearrangements of that one line, so all three modes return the identical result set. The distance solve, d = 10^((m − M − A + 5)/5), is the one that carries the extinction subtlety: because A is subtracted before the exponentiation, a larger extinction gives a **smaller** distance. That is the correct direction — if part of the observed dimming is dust, less of it is distance. Sirius illustrates it: with A = 0 the solve returns 2.6371 pc, and with A = 0.5 it returns 2.0947 pc.
Rounding stage: no intermediate rounding anywhere. All arithmetic runs at 40 significant digits in a private decimal context, and rounding happens once at the return boundary — magnitudes to ten decimal places, distances and the flux ratio to twelve significant digits (decimal-place rounding would flatten a very small or very large distance to a meaningless value).
The interpretation bands are decided on the unrounded distance against the exact 10 pc reference, so the boundary behaviour is deterministic: below 10 pc the modulus is negative, at exactly 10 pc it is exactly zero, above it is positive.
Invalid-domain behaviour: a distance of zero or below raises a field error, since log₁₀(d) is undefined at zero and the flux ratio would be infinite. A negative extinction raises an error, because dust cannot brighten a source. A magnitude pair implying a distance outside 10⁻¹⁰⁰ to 10¹⁰⁰ parsecs raises an error too — that almost always means m and M were entered in the wrong boxes or in different bands, and the message says so rather than returning a number with 80 zeros in it.
A worked example.
Sirius is the brightest star in the night sky, and both numbers needed here come from SIMBAD. Its V magnitude is −1.46, and its parallax is 379.21 ± 1.58 mas from the Hipparcos new reduction (van Leeuwen 2007). Inverting the parallax gives d = 1000/379.21 = 2.6370612589 pc. The geometric distance modulus is μ = 5 log₁₀(2.6370612589) − 5 = 5 × 0.4211202 − 5 = −2.8943989071. It is negative because Sirius is much closer than the 10-parsec reference. The absolute magnitude follows: M_V = m − μ = −1.46 − (−2.8943989071) = 1.4343989071. So a star that dominates the winter sky at m = −1.46 would be an unremarkable 1.43-magnitude star if it sat at 10 parsecs — Sirius looks spectacular mostly because it is close, not because it is exceptionally luminous. The flux ratio makes the same point numerically: at 2.6370612589 pc, Sirius delivers (10/2.6370612589)² = 14.38 times the flux it would deliver from 10 pc. Now switch on some extinction to see the direction of the effect. With A = 0.5 magnitudes, solving for M with the same m and d gives 0.9343989071 — the star must be intrinsically brighter than we thought, because some of the light we are missing was absorbed rather than spread out. And solving the other way, for distance from m = −1.46 and M = 1.4343989071 with A = 0.5, returns 2.0946922147 pc instead of 2.6370612589 pc: attributing half a magnitude of the dimming to dust brings the star closer. Both directions are what the equation says, and both are the opposite of what people usually guess. A note on precision: the parallax carries a 0.42% uncertainty, so the distance is good to about three significant figures and the absolute magnitude to about two decimals. The calculator prints ten. Read only what your input supports.
Frequently asked questions.
What is the difference between apparent and absolute magnitude?
What is the distance modulus formula?
Can I mix a V magnitude with a bolometric absolute magnitude?
What happens if I ignore interstellar extinction?
Why does adding extinction make the distance smaller?
Why is the magnitude scale backwards, and what is 2.512?
Where do I get the distance to put in?
What does the flux ratio output mean?
References& sources.
- [1]European Space Agency, Science & Technology education resource, "Stellar Distances" (retrieved 2026-07-29). States that absolute magnitude is "what the apparent magnitude of that star would be if it were placed exactly 10 parsecs away from the Sun", gives M = m − 5 log(D/10) and D = 10^((m−M+5)/5), and states the Pogson step: "the difference between each step on the scale is equal to a decrease in brightness of 2.512 and (2.512)⁵ = 100". Independent of the IAU documents below; open access.
- [2]Mamajek, E. E., et al. (2015), "IAU 2015 Resolution B2 on Recommended Zero Points for the Absolute and Apparent Bolometric Magnitude Scales", arXiv:1510.06262 (retrieved 2026-07-29). Defines absolute bolometric magnitude at 10 pc via L₀ = 3.0128 × 10²⁸ W and apparent bolometric magnitude via f₀ = 2.518021002 × 10⁻⁸ W m⁻², gives the parsec as exactly (648000/π) au, and independently quotes M_bol(Sun) ≈ 4.739996 and m_bol(Sun) ≈ −26.832 — the published pair used as this page's independent test. Open-access preprint of an adopted IAU resolution.
- [3]SIMBAD astronomical database (CDS, Strasbourg), object "Sirius" (alf CMa): V = −1.46 (reference 2002yCat.2237....0D, quality flag C, no quoted uncertainty) and parallax 379.21 ± 1.58 mas (reference 2007A&A...474..653V). Retrieved 2026-07-29. Both inputs to the worked example. Independent data centre; open access.
- [4]van Leeuwen, F. (2007), "Validation of the new Hipparcos reduction", Astronomy & Astrophysics 474, 653–664; arXiv:0708.1752 (retrieved 2026-07-29). The astrometric re-reduction supplying SIMBAD's Sirius parallax; reports "an improvement by a factor 2.2 in the total weight compared to the catalogue published in 1997". Peer-reviewed; open-access preprint.
- [5]International Astronomical Union, "Measuring the Universe" (IAU public archive, retrieved 2026-07-29). Source of the exact astronomical unit (IAU 2012 Resolution B2, 149 597 870 700 m) and the light-year (9,460,730,472,580.8 km), used for the parsec-to-light-year conversion reported alongside every distance here.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 682 calculators remain free
- No billing is enabled