Understanding the Wien's law and Stefan-Boltzmann star calculator — concept and principle
This calculator treats a star as a blackbody and uses two classic radiation laws. Wien's displacement law gives the wavelength at which the star's spectrum peaks, and the Stefan-Boltzmann law gives its total luminosity relative to the Sun from its radius and surface temperature. It is used to connect a star's colour, temperature, size and power output.
How it is calculated
- Peak wavelength: λ_max = b ÷ T, with b = 2.897771955 × 10⁻³ m·K. With T in kelvin, λ_max (nm) = 2,897,771.955 ÷ T.
- Luminosity: L = 4πR²σT⁴. Dividing by the Sun's value gives L/L☉ = (R/R☉)² × (T/5772 K)⁴, where 5772 K is the IAU nominal solar effective temperature.
Enter R in solar radii and T as the effective (surface) temperature in kelvin.
The principle
Any hot, opaque body emits a continuous spectrum whose shape depends only on temperature (Planck's law). As temperature rises, the peak moves to shorter wavelengths: red stars are cool, blue stars hot. Wien's law is the position of that peak. Integrating Planck's law over all wavelengths gives σT⁴ watts per square metre (σ = 5.670374419 × 10⁻⁸ W m⁻² K⁻⁴), and multiplying by the surface area 4πR² gives total power. Because temperature enters to the fourth power, a small change in T has a large effect: doubling T multiplies luminosity by 16.
Worked example
- Defaults (the Sun): T = 5772 K, R = 1 R☉.
- λ_max = 2,897,771.955 ÷ 5772 = 502.0394932 nm, in the blue-green part of the visible spectrum.
- L = 1² × (5772 ÷ 5772)⁴ = 1 L☉, as expected.
- For comparison, a star with the same radius at 11,544 K would peak at about 251 nm and shine 16 times brighter.
| Surface temperature (K) | Peak wavelength (nm) |
|---|---|
| 1,443 | 2,008.157973 |
| 2,886 | 1,004.078986 |
| 4,329 | 669.385991 |
| 5,772 | 502.0394932 |
| 7,215 | 401.6315946 |
| 8,658 | 334.6929955 |
| 11,544 | 251.0197466 |
How to read the result
Peak wavelengths below about 400 nm mean hot blue or white stars; above about 700 nm, cool red stars. Luminosity tells you the total energy output; main-sequence stars range from well under 0.01 L☉ for red dwarfs to many thousands of L☉ for massive blue stars. Giants can be very luminous despite low temperatures because R² is large.
Common mistakes
- Entering temperature in °C instead of kelvin.
- Expecting the Sun to "look green": the eye sees the whole mix of wavelengths, which appears white.
- Forgetting that the peak in frequency is not at the same place as the peak in wavelength (for the Sun about 880 nm when plotted per frequency).
Frequently asked questions
Why does the Sun look white or yellow, not green?
Its spectrum is broad, covering all visible colours, and the combination appears white; the atmosphere scatters blue light, making it look yellowish near the horizon.
Can I find a star's radius from L and T?
Yes: R/R☉ = √(L/L☉) × (5772/T)².
Does Wien's law work for planets and people?
Yes. A body at 300 K peaks near 9.7 µm in the infrared, which is why thermal cameras work in that band.
Sources: CODATA 2018 recommended values of the fundamental physical constants (NIST) · IAU 2015 Resolution B3 on nominal solar and planetary values · Carroll B.W. and Ostlie D.A., An Introduction to Modern Astrophysics, 2nd ed.