Wien's Displacement Law for a blackbody (not to be confused with Wien's blackbody function) was derived in 1893 by the German physicist Wilhelm Wien. It relates the maximum wavelength of blackbody radiation to the temperature of the object, greatly simplifying the mathematics of the situation. It can be stated mathematically as:

lambdamax = 0.0029/T

lambdamax = wavelength of maximum emission (in metres)
T = temperature of object (in kelvins)

As a star is an almost perfect blackbody, this relationship can be used to determine the star's temperature from its spectrum. For example, yellow stars, such as our sun, have their maximum emissions at a wavelength of approximately 5 x 10-7 m (500 nm). A simple calculation gives a surface temperature of 5800 K. Note that this is only the surface temperature and that the interior can (and does) have a much higher temperature.