If you heat a nail in a flame, it first glows dark red, then orange and, if you could heat it much more, it would come to look white and then bluish white. Stars follow exactly the same rule: their color is a thermometer. In this lesson we are going to turn that idea into numbers, and along the way we will see two functions that dominate the eleventh grade at work: the exponential and the logarithm.
1. What is a blackbody?

A blackbody is an ideal object that absorbs all the radiation that reaches it, reflecting nothing. If it is also in thermal equilibrium, it emits light with a spectrum that depends only on its temperature , not on the material it is made of.
A star is not a perfect blackbody (its atmosphere produces absorption lines), but its gas is so dense and opaque that the light leaving its surface closely resembles one. That is why we define the effective temperature of a star as the temperature of the blackbody that would emit the same energy per square meter.
2. Planck’s law and the exponential function
In 1900, Max Planck found the formula that describes how much energy a blackbody emits at each wavelength. We are not going to derive it (that requires quantum physics), but we are going to read it:
where:
- is the spectral radiance: power emitted per unit area, solid angle and wavelength (in );
- is the wavelength (m) and the temperature (K);
- is Planck’s constant;
- is the speed of light;
- is Boltzmann’s constant;
- is the base of the exponential function.
The formula is easier to understand with a single dimensionless variable, , which compares the energy of a photon of wavelength with the thermal energy . Since ,
Worked example 1: the Sun in two colors. With K:
- at nm (green), and ;
- at nm (far ultraviolet), and .
Going from 500 to 100 nm, the factor rises times, but the exponential in the denominator lowers the emission times. The exponential wins by a landslide: that is why the Planck curve plunges to the left of the maximum. It is the Wien tail, where .
Worked example 2: doubling the temperature. At nm, a star at 5772 K emits times more than one at 2886 K. In the ultraviolet, a moderate change in temperature produces an exponential change in emission. By contrast, in the region of small (long wavelengths, infrared and radio) the approximation gives : the emission is simply proportional to . That is the Rayleigh–Jeans law, and it is the reason radio telescopes measure temperatures directly.
What matters is the shape of the curve: an asymmetric hump that rises quickly (exponentially) at short wavelengths and falls slowly (as ) at long ones. As increases, the hump grows at all wavelengths and its maximum shifts to the left.
3. Wien’s law: the maximum moves
The wavelength at which the Planck curve has its maximum is inversely proportional to the temperature:
( is Wien’s displacement constant; it corresponds to , the maximum of ). If the temperature doubles, is halved.
Worked example 3: the Sun. With :
It falls right in the visible spectrum (380–750 nm), in the blue-green region.
Worked example 4: Betelgeuse ():
in the near infrared. The visible part of its spectrum is dominated by red: that is why we see it as orange.
Worked example 5: the human body ():
Thermal infrared: exactly what thermal cameras “see”.
Worked example 6: the other way around. A star emits its maximum at . We solve for :
That is the case of Sirius A (): its maximum is in the ultraviolet and we see it as bluish white.
4. Stefan–Boltzmann law: how much energy comes out

If we add up the energy of all wavelengths (the area under the Planck curve), we obtain the flux emitted by each square meter of surface:
( is the Stefan–Boltzmann constant). The fourth power is enormous: if doubles, is multiplied by .
A star is (almost) a sphere of radius and area , so its luminosity (total power) is
Worked example 7: the luminosity of the Sun. With and :
Comparing with the Sun
Dividing by the same formula for the Sun, the constants cancel:
Worked example 8: the radius of Betelgeuse. Betelgeuse is estimated to have and (approximate values: published estimates vary quite a bit). We solve for the radius:
Betelgeuse is about 800 times larger than the Sun: . Placed where the Sun is, it would reach beyond the orbit of Mars. (Joyce et al. 2020 give , of the same order.)
Notice the key idea: the temperature comes from the color and the luminosity from the brightness and the distance; with both, the Stefan–Boltzmann law gives us the size of a star that we cannot see as a disk.
Logarithms: the law as a straight line
Stellar luminosities range from to . To handle ten orders of magnitude we take logarithms. Since the logarithm turns products into sums and powers into products (, ):
Worked example 9: Rigel with logarithms. , K: , so .
That equation says that, at fixed radius, is a straight line of slope 4 as a function of . That is why astronomers draw the Hertzsprung–Russell diagram on logarithmic axes, and why the simulator uses a logarithmic scale on its sliders (from 1000 to 40 000 K, each equal displacement multiplies by the same factor) and on the vertical axis when you turn it on: each division is a factor of 10, so a red dwarf and a blue supergiant fit on the same graph. The magnitudes of the previous lesson, , are the same idea.
5. Color in numbers: the B−V index

Astronomers measure color by comparing the brightness of the star through a blue filter (B, ~440 nm) and a visual one (V, ~550 nm). Since magnitudes are logarithmic, the difference is a ratio of fluxes: a blue star has negative or close to 0 and a red one, . For a blackbody there is an approximate formula (Ballesteros, 2012):
For the Sun, , and the formula gives . The simulator shows the estimated for each temperature.
6. Why are there no green stars?

Move the slider to about 5000–6000 K: the maximum of the curve falls in the green. And the color of the circle? White.
The reason is that the Planck curve is very wide: much wider than the visible spectrum. When its maximum is in the green, the curve is almost flat between blue and red (for the Sun, ), so the star emits similar amounts of all colors, and we perceive the mixture of all colors as white. To see green we would need a narrow curve with a peak only in the green, and that of a hot body cannot have that shape. That is why the sequence of stellar colors goes from red to orange, yellow-white, white and bluish white, never passing through green.
A subtle detail: the position of the maximum depends on how you measure the spectrum. If instead of per unit wavelength it is measured per unit frequency, the Sun’s maximum is near 880 nm, in the infrared. The maximum is not “the color” of the star: the color depends on the shape of the whole curve within the visible range.
Simulator: Planck curves
- Set the Sun (5772 K) and press Pin curve. Double the temperature (11 544 K): the new curve lies above at all wavelengths and its maximum is at half the (Wien’s law).
- Turn on the logarithmic scale of the vertical axis and pin curves at 3000, 6000, 12 000 and 24 000 K: on a log scale, the curves look like shifted copies. Compare the vertical separation between them in the ultraviolet (enormous: exponential tail) and in the far infrared (small: Rayleigh–Jeans region).
- Choose the Betelgeuse preset and read ; compare with example 8. Then Sirius A and Rigel.
- Find the temperature at which the displayed color stops being orange and turns white. Does it coincide with the maximum in the green?
- T
- 5,772 K
- λmax
- 502 nm
- B−V
- 0.65
- σT⁴
- 6.29 × 10⁷ W/m²
- L/L☉
- 1.00
- Mbol
- 4.74
Activity: measuring the solar constant with a can
Materials: an aluminum can painted matte black (or covered with black tape), a thermometer (kitchen or digital), water, a graduated cylinder or a scale, a clock, a piece of cardboard for shade, a clear day around noon.
- Measure the mass of water (for example 200 g) and put it in the can. Measure the diameter of the can and compute the area of the face that will receive the Sun (lay it on its side, with its side toward the Sun; treat it as a cylinder of projected area ).
- Keep the can in the shade until the water is at room temperature; write down .
- Expose it to the Sun with the black face perpendicular to the rays. Stir gently and write down the temperature every minute for 10 minutes.
- The absorbed power is , with the specific heat of water. The solar flux at ground level is . With 200 g, and a flux of , the water should rise about 7 °C in 10 min.
- Outside the atmosphere the flux is (IAU 2015 nominal value). Compute what fraction reached your can and, with , the luminosity of the Sun: with m.
- Solve for the temperature of the Sun: .
Final question: what temperature did you get and how far is it from 5772 K? Why does the error in affect so little? (Hint: the fourth root reduces the relative error to one quarter.) What do you lose to the atmosphere, to the angle and to the heat the can gives off to the air?
Exercises
Basic
- Compute for a red dwarf with . In which region of the spectrum is it?
Show solution
: near infrared.
- A star has its maximum at . What is its temperature?
Show solution
.
- How many watts does each square meter of your skin () emit according to ?
Show solution
(although you also absorb almost the same from your surroundings).
Intermediate
- A star has the same radius as the Sun and twice the temperature. How many times more luminous is it? And if it has the same temperature but twice the radius?
Show solution
; with twice the radius, .
- Two stars have the same temperature, but one is 100 times more luminous. How many times larger is its radius? Solve it with logarithms: .
Show solution
. In general at fixed .
- Sirius A has and . Compute and check it with the simulator.
Show solution
(the published value is ≈ 25).
Challenge
- Compute for the Sun at and at nm. In which of the two does the approximation hold? In which does ? Compute in each case the relative error of the approximation.
Show solution
At 10 μm: ; versus : a 13 % error, the Rayleigh–Jeans approximation is tolerable and improves at longer wavelengths. At 200 nm: ; and : the error of neglecting the is : Wien tail.
- By how much is the flux from a surface multiplied when going from 3000 K to 30 000 K? Express the result as a power of 10 and explain why the simulator’s logarithmic scale is useful for comparing these curves.
Show solution
: ten thousand times. On a linear scale the cool curve would be squashed against the axis; on a logarithmic scale each factor of 10 takes up the same space and both curves can be seen.
- A white dwarf has and . Estimate its radius in and in km. Compare it with the radius of Earth (6371 km).
Show solution
, that is, : the size of Earth!
✦ Mini-quiz
Key takeaways
- A blackbody emits according to its temperature; the Planck curve has an exponential tail at short and falls as at long ones.
- Wien: with m·K. Sun: 502 nm; Betelgeuse: 805 nm.
- Stefan–Boltzmann: and ; in logarithms, .
- With the temperature (from the color) and the luminosity (from the brightness and the distance) one obtains the radius of a star.
- There are no green stars: the curve is too wide; a maximum in the green looks white.
🍎 Teacher guide
- Time
- 3 sessions of 55 min
- Colombian national standard (MEN)
- Mathematics, Grades 10 to 11, numerical thinking: “I establish relations and differences between different notations of real numbers in order to decide on their use in a given situation”; metric thinking: “I design strategies to tackle measurement situations that require specific degrees of precision”; variational thinking (taken up from Grades 8 to 9): “I analyze in Cartesian graphical representations the change behaviors of specific functions belonging to families of polynomial, rational, exponential and logarithmic functions”. Natural Sciences, Grades 10 to 11, physical environment: “I use biological, physical and chemical models to explain the transformation and conservation of energy”; I approach knowledge as a natural scientist: “I take measurements with suitable instruments and equipment”, “I use mathematics to model, analyze and present data and models in the form of equations, functions and conversions” and “I interpret results taking into account the order of magnitude of the experimental error”; science, technology and society: “I analyze the potential of natural resources for obtaining energy for different uses”.
- Evidence of learning
- Explains with the exponent x = hc/(λkT) why the Planck curve falls exponentially in the ultraviolet, computes λmax and L for real stars, solves for R with the logarithmic form of the Stefan–Boltzmann law and estimates the temperature of the Sun from the solar constant measured with a can.
Materials
- Black can, thermometer, water, scale or graduated cylinder, clock (per group)
- Scientific calculator with eˣ and log
- Computer or tablet with the simulator
- Photocopy of the table of constants (h, c, k_B, σ, b, R☉, T☉, S☉)
Suggested sequence
Session 1. Planck, the exponential and Wien (55 min). Opening with the red-hot nail (5 min). Reading of Planck’s law with the variable and examples 1 and 2 on the calculator (20 min). Wien’s law with examples 3–6 (15 min). Guided challenge in the simulator, steps 1 and 2 (10 min). Closing: exercises 1 and 2.
Session 2. Stefan–Boltzmann and logarithms (55 min). Example 7 and the form compared with the Sun (15 min); the radius of Betelgeuse and the logarithmic form with Rigel (20 min); simulator, steps 3 and 4 (10 min); exercises 4, 5 and 6 (10 min).
Session 3. The solar constant (55 min). Can activity at noon (30 min; with the data taken, the calculation can be done in the classroom): from to and from to with the fourth root (15 min). Mini-quiz (10 min). Challenges 7–9 as homework; number 7 is the best assessment of how well the exponential is handled.
Common mistakes
- Believing that the maximum of the curve is “the color” of the star. Section 6 and the simulator experiment at 5500 K.
- Thinking that a hotter star emits less in the red because “it is blue”. Show that the hot curve lies above at all wavelengths.
- Using T in degrees Celsius in T⁴ or in b/T. Everything in kelvin.
- Confusing flux (per m²) with luminosity (total): forgetting the factor 4πR².
- In the activity, not correcting for the angle of incidence or not waiting for the initial thermal equilibrium; comment on the order of magnitude of the error.