Apparent magnitude, absolute magnitude and distance are related by an equation:
m  M = 5 log d  5
m is the apparent magnitude of the object
M is the absolute magnitude of the object
d is the distance to the object in parsecs
The expression m  M is called the distance modulus and is a measure of distance to the object. An object with a distance modulus of 0 is exactly 10 parsecs away. If the distance modulus is negative, the object is closer than 10 parsecs, and its apparent magnitude is brighter than its absolute magnitude. If the distance modulus is positive, the object is farther than 10 parsecs and its apparent magnitude is less bright than its absolute magnitude.
The following table gives values of d corresponding to different values of m  M.
Distance modulus mM

Distance d (parsecs)

4

1.6

3

2.5

2

4.0

1

6.3

0

10

1

16

2

25

3

40

4

63

5

100

10

10^3

20

10^5

To understand distance modulus better, have a go at some calculations and questions based on distance modulus.