Main sequence fitting
Main sequence fitting also uses the HR-diagram to determine distance but is always applied to clusters of stars.
Star clusters formed at the same time from the same cloud of gas and dust and are in a group where they are gravitationally bound. This conveniently means that they are all located at about the same distance.
As the name of the method suggests, it is limited to star clusters that are still on the Main Sequence in the HR-diagram. This means that they are fusing hydrogen to helium and are in Luminosity Class V (this has been explained in our EBook Stellar Radiation). Whether a cluster is on the Main Sequence depends on the age of the cluster. If the cluster is too old, stars will have left the Main Sequence. This is a limitation of the method.
Main sequence fitting places the stars of the cluster on the HR-diagram with the vertical position initially derived from their apparent magnitude.
On the diagram nearby main sequence stars are plotted whose distances are well-known from trigonometric parallax where absolute magnitude is used as the y-axis variable (idialised by the red line in the diagram). The vertical position of the cluster is now systematically different from the reference Main Sequence stars due to the unknown absolute magnitude. By shifting the cluster's stars to fit the actual main sequence, the vertical displacement is now used as a measure of distance, that can be calculated with the distance modulus.
Potential difficulties with main sequence fitting are related to whether all stars plotted are actually on the main sequence. Some stars may have already left the Main Sequence and will appear more to the upper right in the diagram. Foreground main sequence stars that not belong to the cluster will appear brighter and above the cluster main sequence stars. Background main sequence stars appear fainter and below the cluster main sequence stars.