Wolfram Alpha:

```Planck's Radiation Law
----------------------

From the assumption that the electromagnetic
modes in a cavity were quantized in energy with
the quantum energy equal to Planck's constant
times the frequency, Planck derived a radiation
formula.  The average energy per "mode" or
"quantum" is the energy of the quantum times
the probability that it will be occupied (the
Bose - Einstein distribution function):

E = hν/(ehν/kT - 1)

This average energy times the density of
such states, expressed in terms of either
frequency or wavelength

ρ(ν) = dns/dν = (8π/c3)ν2
ρ(λ) = dns/dλ = 8π/λ4

gives the energy density, the Planck

Sν = (8πh/c3)(ν3/ehν/kT - 1)

Sλ = (8πhc/λ5)(1/ehν/λkT - 1)

The Planck radiation formula is an example
of the distribution of energy according to
Bose-Einstein statistics.  The above
expressions are obtained by multiplying the
density of states in terms of frequency or
wavelength times the photon energy times the
Bose-Einstein distribution function with
normalization constant A = 1.

To find the radiated power per unit area from
a surface at this temperature, multiply the
energy density by c/4.  The density above is
for thermal equilibrium, so setting inward =
outward gives a factor of 1/2 for the radiated
power outward. Then one must average over all
angles, which gives another factor of 1/2 for
the angular dependence which is the square of
the cosine. ```