The Nernst equation is used to calculate the voltage of an electrochemical cell or to find the concentration of one of the components of the cell.
The Nernst equation:
Ecell = E0cell - (RTnF)InQ
Ecell = cell potential under nonstandard conditions (V)
E0cell = cell potential under standard conditions
R = gas constant, which is 8.31 (volt−coulomb)(mol−K)
T = temperature (K)
n = number of moles of electrons exchanged in the electrochemical reaction (mol)
F = Faraday's constant, 96500 coulombs/mol
Q = reaction quotient, which is the equilibrium expression with initial concentrations rather than equilibrium concentrations
Sometimes it is helpful to express the Nernst equation differently:
Ecell = E0cell - (2.303∗RTnF)logQ
at 298K, Ecell = E0cell - (0.0591Vn)log Q