Electron degeneracy pressure is a particular manifestation of the more general phenomenon of quantum degeneracy pressure. The Pauli exclusion principle disallows two identical half-integer spin particles (electrons and all other fermions) from simultaneously occupying the same quantum state. The result is an emergent pressure against compression of matter into smaller volumes of space. Electron degeneracy pressure results from the same underlying mechanism that defines the electron orbital structure of elemental matter. For bulk matter with no net electric charge, the attraction between electrons and nuclei exceeds (at any scale) the mutual repulsion of electrons plus the mutual repulsion of nuclei; so absent electron degeneracy pressure, the matter would collapse into a single nucleus. In 1967, Freeman Dyson showed that solid matter is stabilized by quantum degeneracy pressure rather than electrostatic repulsion. Because of this, electron degeneracy creates a barrier to the gravitational collapse of dying stars and is responsible for the formation of white dwarfs.
When electrons are squeezed together too closely, the exclusion principle requires them to have different energy levels. To add another electron to a given volume requires raising an electron's energy level to make room, and this requirement for energy to compress the material manifests as a pressure.
Electron degeneracy pressure in a material can be computed as
where ħ is the reduced Planck constant, me is the mass of the electron, and ρN is the free electron density (the number of free electrons per unit volume).
When particle energies reach relativistic levels, a modified formula is required.
This pressure is derived from the energy of each electron with wave number k = 2π/λ, having