Imagine that the electrons trapped within a metal are in a potential well.. Inside the metal, the potential energy is zero, but at the edges of the metal there are high potential wells. In this simple model, the electrons are trapped within the metal but are free to move about inside the well.

The energies of the electrons will be quantized, but the spacing between allowed energy levels will be very small since the potential well has a large value. Recall that the allowed energy levels of a particle confined to a box of length L is given by $E = \frac{n^{2} h^{2}}{8 m L^{2}}$. For a cube of 1 cm on a side, the number of states with energy between 5.0 eV and 5.5 eV is in the order of 10^{22}. To deal with such large numbers which are so closely spaced such that it seems continuous, we need to use statistical methods.

Electron density is the measure of the number of electrons per unit volume.

The density of states, g(E), is a quantity that tells us the number of available states per unit volume for a particular energy level E. More specifically, the number of available states per unit volume that have energy between E and E + dE is given by g(E) dE.

$$g \left( E \right) = \frac{8 \sqrt{2} \pi m^{\frac{3}{2}}_{e}}{h^{3}} E^{\frac{1}{2}}$$