Consider following general reaction taking place in the galvanic cell.
aA + bB → cC + dD
The cell voltage is given by,

Where,
T → temperature
R → Gas constant
F → Faraday
n → Number of electrons in the redox cell reaction.
At 25°C,

This is Nernst equation for cell potential. It is used to calculate cell potential and electrode potentials.