What pH is measuring
pH is the negative base-10 logarithm of the hydrogen ion (more precisely hydronium) concentration in mol/L:
pH = −log₁₀[H⁺]
The logarithm is what makes pH practical. Pure water at 25 °C has [H⁺] = 1 × 10⁻⁷ mol/L, so its pH is exactly 7. Cola has [H⁺] ≈ 1.8 × 10⁻⁴, giving pH ≈ 3.74. Gastric juice is around pH 1.5. These span three orders of magnitude, and the one-digit difference between them is the whole reason pH is measured rather than concentration.
Inverting gives the other direction:
[H⁺] = 10⁻ᵖᴴ
Worked example
A solution has [H⁺] = 1.8 × 10⁻⁴ mol/L.
pH = −log₁₀(1.8 × 10⁻⁴) = 4 − log₁₀(1.8) = 4 − 0.2553 = 4.74.
At 25 °C, Kw = 1 × 10⁻¹⁴, so [OH⁻] = 10⁻¹⁴ ÷ 1.8 × 10⁻⁴ = 5.6 × 10⁻¹¹ mol/L, and pOH = 14 − 4.74 = 9.26.
The pH + pOH = 14 identity only holds at 25 °C. Body temperature is 37 °C, where Kw is about 2.5 × 10⁻¹⁴ and neutral pH is 6.81, not 7. A solution that reads 7.00 on a meter is very slightly alkaline at 37 °C. This matters in physiology and in any high-temperature process.
Strong acids, weak acids and buffers
For a strong acid the concentration of the acid is [H⁺], so the calculation above applies directly. Hydrochloric, nitric and sulfuric (first proton) acids behave this way.
For a weak acid it does not: only a fraction of the molecules ionise, and the fraction depends on the Ka. A 0.1 M acetic acid solution has a pH near 2.9, not 1.0, because Ka ≈ 1.8 × 10⁻⁵ means roughly 1% dissociates.
A buffer resists pH change because a weak acid and its conjugate base are both present. The Henderson–Hasselbalch equation gives the working pH:
pH = pKa + log₁₀([A⁻] ÷ [HA])
This is the practical form: you can set a target pH by choosing the ratio, which is how buffer recipes are designed. Useful working points: buffer capacity is greatest when the ratio is 1:1, and it falls off by a factor of 10 for every unit of pH away from pKa — the "one unit either side" rule of thumb.
Reading a number honestly
Two digits in a pH means a factor of about 1.2 in concentration, so significant figures should match the measurement. A pH meter reading of "4.76" is reporting to about 1% accuracy at best, and electrode drift of a few hundredths of a pH unit per day is normal. Near neutral this matters most: 6.9 versus 7.1 is a genuine difference in hydrogen concentration, even though both look like "about 7".