Heat a piece of iron and its color changes from dull red to orange and yellow, and at still higher temperatures it looks whitish. Nothing has been painted on it and no colored light is shining on it. In 1847 Draper heated many different substances in the same furnace and found that all of them begin to glow dull red at about 800 K (525 °C). The body itself is giving off light according to its temperature.
To study light that does not depend on the material, one considers a body that absorbs all the light falling on it, and calls it a blackbody. In practice a small hole in the wall of a closed cavity is used. Light that enters the hole is reflected many times by the inner walls and absorbed along the way, and almost none of it comes back out through the hole. The hole acts as a surface that absorbs all the light falling on it.
When the walls of the cavity are held at a fixed temperature, the light coming out of the hole no longer depends on what the walls are made of. In 1860 Kirchhoff showed that in thermal equilibrium a body that absorbs light well also emits it well, and that the ratio of emission to absorption depends only on temperature and wavelength, whatever the material. If it depended on the material, energy would keep moving from one of two cavities at the same temperature to the other, against the second law of thermodynamics.
Split the light from the hole by wavelength and measure the strength at each one, and the result is a curve with a single peak. This is the spectrum of blackbody radiation, and it is the curve in the figure. Raising the temperature raises the whole curve and moves the peak toward shorter wavelengths. By the late 1890s Lummer and Pringsheim were measuring this curve precisely at the Physikalisch-Technische Reichsanstalt in Berlin.
The product of the peak wavelength \lambda_{\mathrm{max}} and the temperature T is constant: \lambda_{\mathrm{max}}T = 2.9 \times 10^{-3} m·K. This is the Wien displacement law. At 1500 K, \lambda_{\mathrm{max}} is 1.9 μm, in the infrared, longer than visible light (wavelengths of 0.4 to 0.7 μm). Iron melts at about 1800 K, so the peak for hot iron is always in the infrared.
The color still changes because the shape of the curve within the visible range changes. At 800 K the red end of the visible range is the strongest and the strength falls steeply toward blue, so only red is seen. As the temperature rises, the difference between red and blue becomes smaller, and the color passes through orange and yellow toward white. The peak enters the visible range only above about 4000 K; for the Sun, whose surface is at about 5800 K, it lies near 0.5 μm, in the green.
Rayleigh (1900) and Jeans (1905) tried to derive this curve from classical physics. There are two things to do: count how many ways the field in the cavity can vibrate at each frequency, and decide how much energy one such vibration holds on average. Multiplying the two gives the energy at each frequency.
The electromagnetic waves inside the cavity are reflected by the walls and form standing waves. In a cube with sides of length L, a wave forms a standing wave only if an integer number of half wavelengths fits exactly into L along each of the three directions. Calling those integers n_x, n_y and n_z, the frequency is \nu = \dfrac{c}{2L}\sqrt{n_x^2 + n_y^2 + n_z^2}.
The number of vibrations with frequency below \nu is the number of points with integer coordinates inside one eighth of a sphere of radius \dfrac{2L\nu}{c}. The number of points is proportional to the volume of the sphere, so it grows as \nu^3, and the number in a fixed frequency interval grows as \nu^2. Doubling the frequency puts four times as many vibrations in an interval of the same width.
An electromagnetic wave has two directions of polarization, so the count is doubled. Dividing by the volume of the cavity, the number of vibrations per unit volume and per unit frequency is \dfrac{8\pi\nu^2}{c^3}. The side L of the cube does not appear in the result.
Next is the energy of one vibration. In classical statistical mechanics, a system in thermal equilibrium holds on average \dfrac{1}{2}kT for each term in its energy that is a square, such as kinetic or potential energy. This is the equipartition of energy. A vibration of the electromagnetic field has two such terms, one electric and one magnetic, so its average is kT. k is the Boltzmann constant, and the frequency does not appear anywhere.
Multiplying the two gives the energy per unit volume and per unit frequency, u(\nu) = \dfrac{8\pi\nu^2}{c^3}kT. This is the Rayleigh-Jeans law. Written per unit wavelength it is \dfrac{8\pi kT}{\lambda^4}, which grows 16 times when the wavelength is halved. It is the curve in the figure that keeps rising.
At long wavelengths this formula agrees well with measurement. The strengths that Rubens and Kurlbaum measured in the infrared in 1900 were proportional to temperature at long wavelengths, just as the formula says. The disagreement is at short wavelengths: the measured curve falls after its peak, while the formula keeps rising.
Adding up all frequencies means adding \nu^2 without limit, so the energy in the cavity comes out infinite. A cavity at any temperature would then hold almost all of its energy at ultraviolet and X-ray frequencies, which is not what happens. Ehrenfest later called this disagreement the ultraviolet catastrophe.
At short wavelengths, a formula that Wien had proposed in 1896 agreed well with measurement. It is the cube of the frequency multiplied by e^{-b\nu/T}, where b is a constant chosen to fit the data. In 1900, however, infrared measurements showed that this formula falls below the measured values at long wavelengths. No formula yet agreed at both long and short wavelengths.
In October 1900 Planck found and presented a formula that agreed at both. When Rubens compared it with his own measurements, it matched at every wavelength. Planck had built it so that the strength is proportional to temperature at long wavelengths and approaches Wien's formula at short ones, and he could not yet say why it had this form. In December he derived it from the assumption that the energy of a vibration takes only discrete values.
The assumption is that a vibration of frequency \nu can hold only the energies 0, h\nu, 2h\nu, 3h\nu and so on, integer multiples of h\nu. h is the constant introduced for this, later called the Planck constant. The spacing h\nu is proportional to frequency, so the higher the frequency, the wider the gaps between the allowed values.
In thermal equilibrium, the probability of a state of energy E is proportional to e^{-E/kT}, which is called the Boltzmann factor. kT is the typical amount of energy available from heat; at room temperature, 300 K, it is about 0.026 eV. One electronvolt, 1 eV, is the energy an electron gains when accelerated through 1 V, 1.6 \times 10^{-19} J.
When the frequency is low and h\nu is much smaller than kT, the vibration has a good chance of rising above 0 and moves among many values. The left side of the figure shows this case. The allowed values are finely spaced and differ little from a continuum.
When the frequency is high and h\nu is much larger than kT, the probability of being in the state h\nu is e^{-h\nu/kT}, almost zero. For visible light of wavelength 0.5 μm, h\nu is about 2.5 eV, about 96 times kT at 300 K. e^{-96} is about 2 \times 10^{-42}, so such a vibration is almost always in the state of energy 0. The right side of the figure shows this case.
In classical physics every vibration held kT on average, however high its frequency. With discrete values, high-frequency vibrations hold almost no energy. However many more vibrations there are at short wavelengths, the number that actually hold energy does not grow, so there is no divergence.
Now compute the average energy of one vibration using the discrete values. With x = \dfrac{h\nu}{kT}, the probability of the state with energy nh\nu is proportional to e^{-nx}. The sum of these weights is a geometric series, 1 + e^{-x} + e^{-2x} + \cdots = \dfrac{1}{1 - e^{-x}}.
The average energy is the sum of each state's energy multiplied by its probability. Dividing h\nu(0 + e^{-x} + 2e^{-2x} + \cdots) by the sum of the weights and simplifying gives the average \dfrac{h\nu}{e^{h\nu/kT} - 1}. The frequency now appears, and that is the difference from the classical kT.
When h\nu is much smaller than kT, e^{h\nu/kT} - 1 is nearly \dfrac{h\nu}{kT}, and the average returns to kT. When h\nu is much larger than kT, the average is h\nu e^{-h\nu/kT}, which decreases exponentially as the frequency rises.
Multiplying this by the number of vibrations, \dfrac{8\pi\nu^2}{c^3}, gives Planck's formula. The energy per unit volume and per unit frequency is u(\nu) = \dfrac{8\pi h\nu^3}{c^3}\dfrac{1}{e^{h\nu/kT} - 1}.
At low frequencies it equals the Rayleigh-Jeans law \dfrac{8\pi\nu^2}{c^3}kT, and at high frequencies it takes the form of Wien's formula, \dfrac{8\pi h\nu^3}{c^3}e^{-h\nu/kT}. In each range where one of the two formulas had agreed with measurement, Planck's formula gives the same values as that formula. The constant b in Wien's formula turns out to be \dfrac{h}{k}.
The curve in the figure is this formula plotted against wavelength, and the dots stand for measurements. The measurements of Rubens and Kurlbaum and of Lummer and Pringsheim lay on this curve at every temperature and every wavelength.
The Wien displacement law also follows from the formula. Differentiating the formula written per unit wavelength to find the peak, the peak is where \dfrac{hc}{\lambda kT} is about 4.965, so \lambda_{\mathrm{max}}T = \dfrac{hc}{4.965k} = 2.9 \times 10^{-3} m·K. At body temperature, 310 K, the peak is at 9.3 μm, and infrared thermometers measure light at these wavelengths. For the cosmic microwave background at 2.7 K, the peak is near 1 mm.
The energy summed over all wavelengths is also finite and proportional to the fourth power of the temperature. The energy leaving 1 m² of a blackbody surface each second is \sigma T^4, with \sigma = \dfrac{2\pi^5k^4}{15c^2h^3} = 5.67 \times 10^{-8} W/(m²·K⁴). This is the Stefan-Boltzmann law. Stefan found it from measurements in 1879 and Boltzmann derived it from thermodynamics in 1884; Planck's formula now gives its coefficient.
Planck's formula contains two constants whose values were not yet known, h and k. k sets the thermal energy per molecule of a gas, but at the time the mass of a single molecule was not well known, so neither was the exact value of k.
Planck used two values that had already been measured: the constant of the displacement law, \dfrac{hc}{4.965k}, and the constant of the Stefan-Boltzmann law, \sigma = \dfrac{2\pi^5k^4}{15c^2h^3}. The first fixes \dfrac{h}{k} and the second fixes \dfrac{k^4}{h^3}, so together they give h and k separately.
The values Planck gave in December 1900 were h = 6.55 \times 10^{-34} J s and k = 1.346 \times 10^{-23} J/K. Today's values are h = 6.626 \times 10^{-34} J s and k = 1.381 \times 10^{-23} J/K, so both were within 3%.
With k known, dividing the gas constant R by k gives the number of molecules in one mole, the Avogadro number; Planck's value was 6.17 \times 10^{23}. Dividing the charge carried by one mole of singly charged ions, the Faraday constant, by this number then gives the elementary charge, 1.56 \times 10^{-19} C. That is about 2% from today's 1.602 \times 10^{-19} C, closer to it than the direct measurements of the time.
Planck himself regarded dividing energy into units of h\nu as an assumption made to derive a formula that fits the measurements. Whether the energy of a vibration really is discrete, or whether this is only a way of counting, cannot be decided from blackbody radiation alone.
In 1905 Einstein took light itself to consist of particles each carrying energy h\nu, and used this to explain the photoelectric effect. The h that Millikan later obtained from photoelectric measurements agrees with the value from blackbody radiation to within 1%. The left of the figure is the blackbody curve and the right is the photoelectric line, and both give the same h.
h is now a constant with a defined value, h = 6.62607015 \times 10^{-34} J s. Since 2019 the kilogram has been defined from this value.