# Calculating distance using absolute and apparent visual magnitudes

1. Jul 6, 2010

### Bugsy23

Is there an equation for calculating the distance of a star if you have the values for apparent visual magnitude and absolute visual magnitude?

2. Jul 6, 2010

### Janus

Staff Emeritus
You can use

$$\log D = \frac{m-M}{5}+1.513$$

Where:
M is absolute magnitude
m is apparent magnitude
D is the distance in light years.