Star Color Temperature Calculator
The color of a star is a direct read-out of its surface temperature. Because a star radiates approximately as a blackbody, the wavelength where it shines brightest is set entirely by temperature: blue means hot, red means cool. This calculator applies Wien's displacement law in both directions. Enter a peak emission wavelength to get the temperature, or enter a temperature to get the peak wavelength. It uses the CODATA value of Wien's displacement constant.
Fill the wavelength field for temperature, or the temperature field for wavelength.
Wien's displacement law
peak wavelength (m) = b / temperature (K)
temperature (K) = b / peak wavelength (m)
b = 2.897771955e-3 m*K (Wien's displacement constant)
Wavelengths here are entered in nanometres and converted to metres internally (1 nm = 1e-9 m). The constant b is the CODATA value, fixed by the SI definitions of fundamental constants.
Worked example
A star peaking at 502 nanometres has a temperature of 2.897771955e-3 / 502e-9 = 5,772.45 K, close to the Sun's surface temperature. Conversely, a 5,772 K surface peaks at 2.897771955e-3 / 5,772 = 5.02e-7 m, which is 502.04 nanometres.
Star color temperature: frequently asked questions
How does color reveal a star's temperature?
A star radiates roughly as a blackbody, and the wavelength at which it emits most strongly depends only on its temperature. Hotter stars peak at shorter (bluer) wavelengths, cooler stars at longer (redder) wavelengths. Wien's displacement law makes this exact: peak wavelength times temperature is a constant.
What is Wien's displacement law constant?
Wien's displacement constant is approximately 2.897771955 times 10 to the power minus 3 metre-kelvin, a value fixed by the 2019 SI definitions through fundamental constants. Peak wavelength equals this constant divided by temperature in kelvin. This calculator uses the CODATA value.
Why is the Sun's peak in the green but it looks white?
The Sun's surface temperature of about 5,772 K puts its blackbody peak near 502 nanometres, in the green part of the spectrum. It still looks white to our eyes because it emits strongly across all visible wavelengths; our color perception averages the full spectrum rather than picking out the single peak.
Sources
- Wien's displacement constant: NIST CODATA, Wien wavelength displacement law constant (2.897771955e-3 m*K).
Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.