By measuring the properties from a star's spectrum, the position of a main sequence star on the H-R diagram can be found. From this the star's absolute magnitude is estimated. A comparison of this value with the apparent magnitude allows the approximate distance to be determined, after correcting for interstellar extinction of the luminosity because of gas and dust.