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. Here is a look at the Nernst equation and an example of how to apply it to solve a problem.
### The Nernst Equation

Ecell = E0cell - (RT/nF)lnQ
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*RT/nF)logQ

at 298K, Ecell = E0cell - (0.0591 V/n)log Q

### Nernst Equation Example

A zinc electrode is submerged in an acidic 0.80 M Zn2+ solution which is connected by a salt bridge to a 1.30 M Ag+ solution containing a silver electrode. Determine the initial voltage of the cell at 298K.
Unless you've done some serious memorizing, you'll need to consult the standard reduction potential table, which will give you the following information:

E0red: Zn2+aq + 2e- → Zns = -0.76 V

E0red: Ag+aq + e- → Ags = +0.80 V

Ecell = E0cell - (0.0591 V/n)log Q

Q = [Zn2+]/[Ag+]2

The reaction proceeds spontaneously so E0 is positive. The only way for that to occur is if Zn is oxidized (+0.76 V) and silver is reduced (+0.80 V). Once you realize that, you can write the balanced chemical equation for the cell reaction and can calculate E0:

Zns → Zn2+aq + 2e- and E0ox = +0.76 V

2Ag+aq + 2e- → 2Ags and E0red = +0.80 V

which are added together to yield:

Zns + 2Ag+aq → Zn2+a + 2Ags with E0 = 1.56 V

Now, applying the Nernst equation:

Q = (0.80)/(1.30)2

Q = (0.80)/(1.69)

Q = 0.47

E = 1.56 V - (0.0591 / 2)log(0.47)

E = 1.57 V