Nernst equation is the one which relates the cell potential and the concentration of the species involved in an electrochemical reaction. Let us consider an electrochemical cell for which the overall redox reaction is,
xA + yB = lC + mD The reaction quotient Q is,
The reaction quotient Q is,
$$
\frac{[\mathrm{C}]^{1}[\mathrm{D}]^{\mathrm{m}}}{[\mathrm{A}]^{\mathrm{x}}[\mathrm{B}]^{y}}
$$
We know that,
$$
\begin{aligned}
&\Delta \mathrm{G}=\Delta \mathrm{G}^{0}+\mathrm{RT} \ln \mathrm{Q} \\
&\Delta \mathrm{G}=-\mathrm{nFE}_{\text {cell }} \\
&\Delta \mathrm{G}^{0}=-\mathrm{nFE}^{0} \text { cell }
\end{aligned}
$$
equation (1) becomes
$$
-n F E=-n F E^{0}+R T \ln Q
$$
Subsitute the \(Q\) value in equation (2)
$$
-\mathrm{nFE}_{\text {cell }}=-\mathrm{nFE}^{0} \text { cell }+\mathrm{RT} \ln \frac{[\mathrm{C}]^{1}[\mathrm{D}]^{\mathrm{m}}}{[\mathrm{A}]^{\mathrm{x}}[\mathrm{B}]^{\mathrm{y}}}
$$
Divide the whole equation (3) by - \(\mathrm{nF}\)
$$
\begin{aligned}
&\mathrm{E}_{\text {cell }}=\mathrm{E}_{\text {cell }}^{\circ}-\frac{R T}{n F} \ln \left(\frac{[\mathrm{C}]^{1}[\mathrm{D}]^{m}}{[\mathrm{~A}]^{\mathrm{x}}[\mathrm{B}]^{\mathrm{y}}}\right) \\
&\mathrm{E}_{\text {cell }}=\mathrm{E}_{\text {cell }}^{\circ}-\frac{2.303 R T}{n F} \log \left(\frac{[\mathrm{C}]^{1}[\mathrm{D}]^{m}}{[\mathrm{~A}]^{\mathrm{x}}[\mathrm{B}]^{y}}\right)
\end{aligned}
$$
This is called the Nernst equation.
At \(25^{\circ} \mathrm{C}(298 \mathrm{~K})\) equation (4) becomes,
$$
\begin{aligned}
&\mathrm{E}_{\text {cell }}=\mathrm{E}_{\text {cell }}^{\circ}-\frac{2.303 \times 8.314 \times 298}{n x 96500} \log \left(\frac{\left[\left.\mathrm{C}\right|^{1}[\mathrm{D}]^{\mathrm{m}}\right.}{[\mathrm{A}]^{x}[\mathrm{~B}]^{y}}\right) \\
&\mathrm{E}_{\text {cell }}=\mathrm{E}_{\text {cell }}^{\circ}-\frac{0.0591}{n} \log \left(\frac{\left[\mathrm { C } | ^ { 1 } \left(\left.\mathrm{D}\right|^{m}\right.\right.}{|\mathrm{A}|^{x}\left[\left.\mathrm{~B}\right|^{y}\right.}\right)
\end{aligned}
$$