Nernst equation describes potential of electrochemical cell as a function of concentrations of ions taking part in the reaction:
Where Q is a reaction quotient and n is number of electrons exchanged. For constant temperature expression RT/F has constant value. To simplify calculations it is often combined with conversion factor between natural logarithm (denoted here by ln) and decimal logarithm (denoted here by log) to form value of 0.0591 (for 25°C). Thus for example for half reaction of MnO4- in acidic media:
MnO4- + 8H+ + 5e- -> Mn2+ + 4H2O
potential is given by
To be precise we should use not concentrations, but thermodynamic activities of the ions present in the solution.
When applied to the full cell formed from half cells present on inside and outside of glass pH electrode, Nernst equation takes form:
or (using pH definition)
pH inside of the electrode has constant value, thus it can be included in the potential part of the equation:
This form of the equation describes behavior of the glass electrode used for pH measurements.
It is necessary to add two remarks here. First, above equation assumes ideal response from the glass electrode. Second, 0.0591 value was calculated for 25°C temperature. In most cases electrode doesn't behave as ideal and the temperature is not exactly 25°C, thus slope of the electrode response is not 0.0591. To overcome these problems electrode should be calibrated before each use or series of uses.