$$m-M = 5(log(d)-1)
m IS APPARENT MAGNITUDE/BRIGHTNESS measured at some distance d.
M IS ABSOLUTE MAGNITUDE/BRIGHTNESS magnitude measured FROM 10 PARSECS.
d is measured in parsecs (1 parsec = 3.26 ly)
By convention, THE STAR vega IS ASSIGNED m =0 (measured from earth).
Hence M for vega is .66 since vega is 25 ly (7.7 parsec) from earth.
Note, the lower the number m the brighter the star/object. Negative numbers are both possible and common (e.g., for the moon, m = -13 measured from earth)$$