The main purpose of this article is to cast the quantum mechanical electron density, obtained via the Schrödinger–Poisson solver, into a classical form. The Thomas–Fermi (T–F) equation states that the electron density n is dependent on the electrostatic potential Φ. The electrostatic potential is determined by Poisson’s equation. In order to account for quantum effects, such as confinement and tunneling, we set out to dervive an effective potential, Φ*, that when used in place of Poisson’s potential in the original T–F equation will mimic the solution of the Schrödinger equation. This total potential is then used directly to calculate the electron density. Thus, Φ* effectivley washes out the intricacies of the wave functions and yields the electron density. The validity of the T–F equation, for a two-dimensional electron gas at low temperatures, is demonstrated through the solution of a single-electron distribution in fixed square and triangular potential wells. Self-consistent inversion-layer charge densities for single-gate and double-gate metal–oxide–silicon structures are also presented. © 2004 American Institute of Physics.