Stellar Magnitude & Distance Modulus Calculator
Solve m − M = 5 log₁₀ d − 5 + A for absolute magnitude, apparent magnitude or distance in parsecs, with optional interstellar extinction in the same band.
Stellar Magnitude Calculator
Background.
Seen from Alpha Centauri, 1.34 parsecs away, the Sun would be a bright but unremarkable star of about magnitude 0.5. From Earth it is magnitude −26.7. Nothing about the Sun differs between the two views except distance, and the distance modulus is the formula that turns one view into the other.
Astronomers keep two magnitudes for this reason. Apparent magnitude, m, is what a photometer measures from here. Absolute magnitude, M, is the apparent magnitude the object would have at exactly 10 parsecs, so it describes the object rather than our vantage point. Their difference depends only on distance and on any dust in between: m − M = 5 log₁₀ d − 5 + A, with d in parsecs and A the extinction in magnitudes. Give any two of m, M and d and the third follows.
The scale is logarithmic and runs backwards. In 1856 Norman Pogson fixed five magnitudes as exactly a factor of 100 in brightness, so each magnitude is a factor of about 2.512, and brighter objects carry smaller numbers, negative for the brightest. Every factor of ten in distance adds exactly five magnitudes, which lets the modulus double as a distance scale: 0 at 10 pc, +10 at 1 kpc, +25 at 1 Mpc.
Two mistakes catch people out. The first is mixing photometric bands: m, M and A must all belong to one band, whether V, Gaia G or bolometric, and the arithmetic has no way of noticing if they do not. The second is forgetting dust. Extinction makes a star look fainter, and with A left at zero that dimming is read as extra distance, so the star comes out farther away than it really is.
What is stellar magnitude calculator?
The distance modulus, μ = m − M, is how much fainter an object looks than it would at the 10-parsec reference, or how much brighter if it is closer than that. Because flux falls with the square of distance, a star at d parsecs delivers (10/d)² of its 10-parsec flux, which in magnitudes is μ = 5 log₁₀ d − 5. Interstellar extinction adds to the observed value. Both versions are reported: the observed modulus m − M, which includes the dust, and the true or geometric modulus 5 log₁₀ d − 5, which is distance alone.
How to use this calculator.
- Under 'What do you want to find?', choose absolute magnitude (from m and distance), apparent magnitude (from M and distance) or distance (from m and M).
- Enter the two quantities you know, taking both magnitudes from the same band: catalogue V magnitudes pair with V-band absolute magnitudes, Gaia G with G, bolometric with bolometric.
- Enter distance in parsecs. For a nearby star, take it from the parallax: 1,000 divided by the parallax in milliarcseconds.
- Enter the extinction for that line of sight, in the same band, if you have an estimate. Zero is reasonable for nearby stars and for sightlines well away from the plane of the Milky Way; elsewhere, any dust you leave out pushes the distance outward.
- Compare the observed and true distance moduli in the results; the gap between them is exactly the extinction you entered.
The formula.
Start with the inverse-square law. The same object seen from d parsecs and from 10 parsecs gives a flux ratio of (10/d)². Pogson's definition turns a flux ratio into a magnitude difference with −2.5 log₁₀, so m − M = −2.5 log₁₀((10/d)²) = 5 log₁₀(d/10) = 5 log₁₀ d − 5. Dust dims the source and so raises m, which gives the full form m − M = 5 log₁₀ d − 5 + A.
The three solves are rearrangements of that line: M = m − (5 log₁₀ d − 5) − A, m = M + (5 log₁₀ d − 5) + A, and d = 10^((m − M − A + 5)/5). In the last, A is subtracted before the power of ten, so more extinction means a shorter distance; one magnitude of dust shrinks it by a factor of 10^0.2 = 1.585. Light-years come from 1 pc = 3.2615637772 ly, which follows from the IAU's exact astronomical unit and parsec and a light-year defined on the Julian year.
The relation is exact for a steady point source seen through empty space. It cannot know which band your numbers belong to, whether your extinction estimate is right, or whether the star varies. Distance must be greater than zero, extinction cannot be negative, and a magnitude pair implying a distance outside 10⁻¹⁰⁰ to 10¹⁰⁰ parsecs is refused, since that almost always means swapped boxes or mixed bands.
A worked example.
Sirius, the brightest star in the night sky, has a V magnitude of −1.46 in SIMBAD and a Hipparcos parallax of 379.21 milliarcseconds. Its distance is therefore 1,000 ÷ 379.21 = 2.6371 pc, or 8.6009 light-years. The geometric modulus is 5 × log₁₀ 2.6371 − 5 = 5 × 0.42112 − 5 = −2.8944, negative because Sirius is closer than 10 pc. With no extinction, M = −1.46 − (−2.8944) = 1.4344. At the reference distance Sirius would be a star of magnitude 1.43, one of many of that brightness rather than the standout it is; most of its brilliance in our sky comes from being near. The flux ratio makes the same point: (10 ÷ 2.6371)² = 14.38, so we receive over fourteen times the light we would from 10 pc. The parallax carries an uncertainty of 1.58 mas, about 0.42 percent, which shifts the modulus by only about 0.009 magnitudes, so the absolute magnitude is good to roughly a hundredth.
Frequently asked questions.
How far away would Sirius have to be to disappear from naked-eye view?
Why does adding extinction bring the star closer?
Can I check the formula with the Sun?
What goes wrong if I mix a V magnitude with a bolometric one?
How much extinction should I expect?
How is this used to measure distances to other galaxies?
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 an independent check on this page. 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.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 5 cited below
- Method
- m − M = 5 log₁₀(d ⁄ pc) − 5 + A ⇒ d = 10^((m − M − A + 5)⁄5)
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled