Spectroscopic parallax or main sequence fitting[1] is an astronomical method for measuring the distances to stars.
The spectroscopic parallax technique can be applied to any main sequence star for which a spectrum can be recorded.
The method depends on the star being sufficiently bright to provide a measurable spectrum, which as of 2013 limits its range to about 10,000 parsecs.
The true distance to the star may be different than the one calculated due to interstellar extinction.
[3] The method ultimately derives from the spectroscopic studies of sunspots and stars by Walter Sydney Adams and Ernst Arnold Kohlschütter.