How do you calculate temperature with Wien's law?
For an ideal blackbody spectrum expressed as energy radiance per unit wavelength, Wien's displacement law is λmax T = b. Use b ≈ 2.897771955×10⁶ nm·K, so T = 2,897,771.955/λmax when the peak wavelength is in nanometres.
An invented peak at 500 nm gives T ≈ 5795.54 K. The calculation requires the wavelength-density peak of a thermal continuum. It does not use the position of an arbitrary bright emission line, the centre of an absorption line or the colour of one camera pixel.
This guide builds the calculation from its units, compares three original Planck curves and explains why a peak plotted per unit frequency gives a different answer unless the matching convention is used. All numerical examples are illustrative blackbody models, not measurements of named stars.
What a blackbody model represents
An ideal blackbody is a thermal-radiation reference whose equilibrium spectrum depends on temperature. Its spectrum is broad: it emits across a range of wavelengths rather than at a single colour. A maximum identifies the highest spectral density in the chosen representation, not the only radiation emitted.
NASA's explanation of stellar continua notes that a blackbody curve can describe the broad shape of a star's spectrum even though stars are not perfect blackbodies. The distinction matters when using a simple formula as an introduction to stellar temperature.
A stellar spectrum also has structure, including absorption features and departures from an ideal continuum. A peak-based estimate is therefore a model-dependent temperature estimate. It is not automatically the temperature at every atmospheric depth and certainly not a direct measurement of a star's core.
Before calculating, identify what the plotted vertical axis measures. A label such as intensity or brightness without a bandwidth unit leaves an important part of the problem unspecified.
Keep kelvin and wavelength units consistent
The NIST constants table gives the wavelength displacement constant as 2.897771955…×10⁻³ m·K. The same constant is approximately 2897.771955 μm·K or 2,897,771.955 nm·K. These are unit conversions, not three alternative physical laws.
With λmax = 0.5 μm, divide 2897.771955 by 0.5. With λmax = 500 nm, divide 2,897,771.955 by 500. Both give the same temperature. Using the micrometre constant with a numerical wavelength in nanometres creates a factor-of-one-thousand error.
Temperature must be absolute. Convert Celsius using T(K) = t(°C)+273.15 before multiplying or dividing by temperature. A hypothetical object at 26.85°C is at 300 K, with a wavelength peak near 9.659 μm. Inserting 26.85 into the denominator would describe a very different temperature.
The symbol is K, without a degree sign. Keep the original input precision separate from the many digits available in a physical constant: an approximate measured peak cannot justify an arbitrarily precise inferred temperature.
Seven temperature-to-peak examples
| T (K) | λmax (nm) | λmax (μm) |
|---|---|---|
| 300 | 9659.239850 | 9.659239850 |
| 1000 | 2897.771955 | 2.897771955 |
| 3000 | 965.923985 | 0.965923985 |
| 4500 | 643.949323 | 0.643949323 |
| 6000 | 482.961993 | 0.482961992 |
| 10000 | 289.777196 | 0.289777196 |
| 20000 | 144.888598 | 0.144888598 |
The 3000 K and 6000 K examples make the inverse relation visible. Doubling the temperature halves the wavelength peak, from about 965.924 nm to 482.962 nm. This comparison uses kelvin and the same spectral-density definition in both rows.
A 300 K model peaks far beyond visible wavelengths, while a 20,000 K model has a much shorter peak. Neither statement means that the entire spectrum lies on one side of the peak. The broad distribution still extends away from its maximum.
Use the product as a quick audit: multiply each row's temperature by its unrounded peak in nanometres. The result should return b. Small residual differences after using the displayed rounded values are rounding effects, not a temperature-dependent constant.
Recover temperature from the continuum peak
| λmax (nm) | T (K) |
|---|---|
| 400 | 7244.429888 |
| 500 | 5795.543910 |
| 700 | 4139.674221 |
| 1000 | 2897.771955 |
| 10000 | 289.777196 |
For the 500 nm example, convert 500 nm to 5×10⁻⁷ m if using SI units. Then T = 2.897771955×10⁻³/(5×10⁻⁷) = 5795.54391 K. Returning to λmax = b/T recovers 500 nm.
For 1000 nm, the inferred temperature is half as large. This follows directly from the reciprocal relation and is a useful error check. A longer wavelength peak does not imply a hotter blackbody under this definition.
The table does not mean that every source with a feature at 500 nm has this temperature. An isolated spectral line can sit near that wavelength for reasons involving a particular atomic transition. First decide whether the observed feature is the broad thermal continuum peak to which the model applies.
Where the peak relation comes from
The wavelength form of Planck's law is Bλ(T) = 2hc²/[λ⁵(exp(hc/(λkT))−1)], with vacuum wavelength λ in metres. Here h is Planck's constant, c the speed of light and k Boltzmann's constant. The spectral radiance is per unit wavelength, area and solid angle.
Introduce x = hc/(λkT). At the non-zero wavelength-density maximum, differentiation gives 5(1−e⁻ˣ) = x. Its positive non-zero solution is approximately 4.965114232. Substitution gives b = hc/(kx), which explains why λmax T is constant.
The equation also has the limiting root x = 0, but that is not the finite-wavelength maximum sought here. A numerical solver must select the positive non-zero root rather than accepting the trivial endpoint.
For this guide's calculations, h = 6.62607015×10⁻³⁴ J·s, c = 299792458 m/s and k = 1.380649×10⁻²³ J/K. A spectrum evaluated per metre can be converted to a per-nanometre density by multiplying by 10⁻⁹. That constant unit change does not move its wavelength peak.
Compare three original blackbody curves
| λ (nm) | 3000 K | 4500 K | 6000 K |
|---|---|---|---|
| 300 | 0.005617977 | 0.152546995 | 0.519973715 |
| 500 | 0.261510791 | 0.843901419 | 0.997140803 |
| 700 | 0.754180770 | 0.983835241 | 0.748121514 |
| 1000 | 0.997140803 | 0.671585718 | 0.373950489 |
| 1500 | 0.671585718 | 0.279402341 | 0.124795437 |
| 2000 | 0.373950489 | 0.124795437 | 0.050445156 |
The curves have the same drawn maximum because each was divided by its own peak. This makes the displacement easy to compare, but prevents the image from answering which surface emits more absolute radiance at a given wavelength.
The sampled maximum can fall a little away from the analytic peak because samples are 5 nm apart. The footnote reports rounded analytic peaks, while the table supplies independently reproducible model values at six specific wavelengths.
A plot should state its normalization. Without that information, equal-height curves can accidentally suggest equal energy output. That conclusion would not follow from this chart.
Why frequency and wavelength peaks are not reciprocal
Astropy's blackbody documentation distinguishes Bλ and Bν and provides separate peak definitions. A density per unit frequency distributes the same radiation into different intervals from a density per unit wavelength.
With ν = c/λ, the densities obey Bλ = Bν c/λ² when expressed in compatible SI bandwidth units. The factor varies with wavelength, so changing variables changes the height pattern and can move the maximum. Merely relabelling a horizontal axis does not perform that density conversion.
| T (K) | λmax of Bλ (nm) | νmax of Bν (THz) | c/νmax (nm) |
|---|---|---|---|
| 3000 | 965.923985 | 176.367772710 | 1699.814277 |
| 4500 | 643.949323 | 264.551659065 | 1133.209518 |
| 6000 | 482.961993 | 352.735545420 | 849.907138 |
For Bν, the frequency peak is νmax ≈ 5.878925757×10¹⁰ T Hz. At 6000 K, it is about 352.736 THz. Converting that frequency to a wavelength gives about 850 nm, which is not the approximately 483 nm maximum of Bλ at the same temperature.
There is no contradiction: both describe the same thermal radiation with different bandwidth definitions. If you take the reciprocal of a frequency-density peak and insert it into the wavelength Wien law, the inferred temperature will be wrong.
A logarithmic horizontal scale introduces another distinction. Plotting the same Bλ values on a logarithmic axis does not itself turn them into power per logarithmic interval. That latter quantity involves λBλ, which has its own peak.
Peak position, peak height and total output scale differently
| T (K) | λmax ratio | Bλ peak-height ratio | Total surface-exitance ratio |
|---|---|---|---|
| 3000 | 1.000000000 | 1.000000 | 1.000000 |
| 4500 | 0.666666667 | 7.593750 | 5.062500 |
| 6000 | 0.500000000 | 32.000000 | 16.000000 |
| 9000 | 0.333333333 | 243.000000 | 81.000000 |
For ideal blackbodies, wavelength peak position scales as T⁻¹, Bλ peak height as T⁵, and total surface radiant exitance as T⁴. Thus doubling T halves the peak wavelength, multiplies the unnormalized peak height by 32 and multiplies the integrated surface output by 16.
The NASA Goddard radiation-law explanation connects a hotter spectrum's shift toward shorter wavelengths with its larger total output. The distinction between peak height and area is essential: a curve's maximum is a density at one location, while the total requires integration across wavelengths.
Total surface exitance is F = σT⁴. For an ideal spherical emitter, luminosity is L = 4πR²σT⁴. A change in radius can therefore alter luminosity without changing temperature or the Wien peak. At equal T, doubling the radius multiplies luminosity by four.
Brightness received by an observer also depends on distance and other conditions. The magnitude and flux guide explains a different observable from the surface spectrum discussed here.
Propagate a small peak-wavelength uncertainty
For T = b/λ, a small wavelength uncertainty gives σT ≈ bσλ/λ² = Tσλ/λ, treating b as known. The fractional uncertainty is approximately the same size in T and λ, while their changes have opposite signs.
At 500 nm, a small 20 nm uncertainty corresponds to a first-order temperature uncertainty of about 231.82 K, or 4%. The exact temperatures at 480 and 520 nm are asymmetric around the central estimate because reciprocal functions are curved.
| λmax (nm) | T (K) | T − T(500 nm) (K) |
|---|---|---|
| 480 | 6037.024906 | 241.480996 |
| 490 | 5913.820316 | 118.276406 |
| 500 | 5795.543910 | 0.000000 |
| 510 | 5681.905794 | -113.638116 |
| 520 | 5572.638375 | -222.905535 |
These endpoints are sensitivity examples, not automatically a statistical confidence interval. A real interval requires a measurement model, including how the continuum and peak were estimated. Instrument calibration, spectral coverage and model mismatch can matter more than the rounding of b.
If observations cover only one side of the peak, the highest observed data point may be merely the end of the available wavelength range. Applying Wien's law to that endpoint as though a peak had been measured would conceal missing information.
Use the result within the model's limits
A continuum-based temperature differs from a radial velocity inferred through the displacement of an identified line. The Doppler guide explains the latter. Temperature changes a thermal distribution's shape; motion can shift its wavelength scale. An observed spectrum must be interpreted in an appropriate frame.
Likewise, the peak alone does not supply a radius, distance or total luminosity. A temperature estimate becomes more informative when combined with other independently constrained quantities, while keeping their uncertainties separate.
Do not identify the peak wavelength with the source's entire perceived colour. Human vision combines a range of wavelengths, and a thermal spectrum is broad. A one-colour label is an inadequate substitute for the measured spectrum and its calibration.
A useful calculation record contains the chosen spectral density, vacuum wavelength units, kelvin temperature, whether the curve is normalized, and the model assumptions. These details let another reader reproduce the estimate and recognize when a different spectrum needs a fuller analysis.
Frequently asked questions
What is Wien's displacement formula in nanometres?
For the maximum of blackbody radiance per unit wavelength, λmax in nm multiplied by T in K is approximately 2,897,771.955 nm·K. Divide that constant by either quantity to find the other.
Can I put Celsius directly into Wien's law?
No. Convert to kelvin first by adding 273.15 to the Celsius temperature. The relation uses absolute temperature.
Why do frequency and wavelength spectra have different peaks?
They are densities over different bandwidth intervals. The conversion includes a wavelength-dependent factor, so the reciprocal of the Bν peak frequency is not the Bλ peak wavelength.
Why are the three curves in this guide equally high?
Each curve is divided by its own peak to compare shapes. This normalization hides the absolute radiance increase with temperature; it does not mean the sources emit equal energy.
Does a 500 nm spectral line imply a temperature near 5800 K?
No. The calculation applies to a thermal continuum's wavelength-density maximum. An isolated emission or absorption line is a different spectral feature.
Does Wien's law give a star's core temperature or distance?
No. It gives a temperature estimate under a stated thermal-spectrum model. Core conditions, radius, distance and luminosity require additional physical information.