The Nernst equation can be used to calculate the equilibrium constant of a galvanic cell in standard condition. It can also be used to calculate the cell potential in non-standard conditions given the current temperature and the reaction quotient.

where is the number of moles of exchanged between the oxidizing reducing agent and the oxidizing agent (i.e. number of moles of electrons on either side of balanced redox half-reactions).

Derivation

\begin{align}\Delta G & = \Delta G ^\circ + RT \ln Q \\ - nF \xi & = -nF\xi^\circ + RT \ln Q \\ \xi & = \xi^\circ - \frac{RT}{nF} \ln Q \end{align}