The standard potential of an electrochemical cell requires standard conditions (ΔG°) for all of the reactants. When reactant concentrations differ from standard conditions, the cell potential will deviate from the standard potential. In the 20th century German chemist Walther Nernst proposed a mathematical model to determine the effect of reactant concentration on electrochemical cell potential.
In the late 19th century, Josiah Willard Gibbs had formulated a theory to predict whether a chemical reaction is spontaneous based on the free energy
Here ΔG is change in Gibbs free energy, ΔG° is the cell potential when Q is equal to 1, T is absolute temperature (Kelvin), R is the gas constant and Q is the reaction quotient, which can be calculated by dividing concentrations of products by those of reactants, each raised to the power of its stoichiometric coefficient, using only those products and reactants that are aqueous or gaseous.
Gibbs' key contribution was to formalize the understanding of the effect of reactant concentration on spontaneity.
Based on Gibbs work, Nernst extended the theory to include the contribution from electric potential on charged species. As shown in the previous section, the change in Gibbs free energy for an electrochemical cell can be related to the cell potential. Thus, Gibbs theory becomes
Here n is the number of electrons (in moles), F is the Faraday constant (in coulombs/mole), and ΔE is the cell potential (in volts).
Finally, Nernst divided through by the amount of charge transferred to arrive at a new equation which now bears his name:
Assuming standard conditions (T = 298 K or 25 °C) and R = 8.3145 J/(K·mol), the equation above can be expressed on base-10 logarithm as shown below:
Note that  is also known as the thermal voltage V and is found in the study of plasmas and semiconductors as well. The value 0.05916 V in the above equation is just the thermal voltage at standard temperature multiplied by the natural logarithm of 10.