A surface in a liquid may be charged by dissociation of surface groups (e.g. silanol groups for glass or silica surfaces) or by adsorption of charged molecules such as polyelectrolyte from the surrounding solution. This results in the development of a wall surface potential which will attract counterions from the surrounding solution and repel co-ions. In equilibrium, the surface charge is balanced by oppositely charged counterions in solution. The region near the surface of enhanced
counterion concentration is called the electrical double layer (EDL). The EDL can be approximated by a sub-division into two regions. Ions in the region closest to the charged wall surface are strongly bound to the surface. This immobile layer is called the Stern or Helmholtz layer. The region adjacent to the Stern layer is called the diffuse layer and contains loosely associated ions that are comparatively mobile. The total electrical double layer due to the formation of the counterion layers results in electrostatic screening of the wall charge and minimizes the Gibbs free energy of EDL formation.
The thickness of the diffuse electric double layer is known as the Debye screening length . At a distance of two Debye screening lengths the electrical potential energy is reduced to 2 percent of the value at the surface wall.
with unit of , where
*  is the number density of ion i in the bulk solution,
*  is the valency of the ion (for example, H has a valency of +1, and Ca has a valency of +2),
*  is the vacuum permittivity,  is the relative static permittivity,
*  is the Boltzmann constant.
The repulsive free energy per unit area between two planar surfaces is shown as
where
*  is the reduced surface potential, ,
*  is the potential on the surface.
The interaction free energy between two spheres of radius R is
Combining the van der Waals interaction energy and the double layer interaction energy, the interaction between two particles or two surfaces in a liquid can be expressed as
where W(D) is the repulsive interaction energy due to electric repulsion, and W(D) is the attractive interaction energy due to van der Waals interaction.