How to Calculate pH: Strong and Weak Acids, Bases and Buffers

pH from concentration for strong and weak acids and bases, polyprotic acids, the Henderson-Hasselbalch equation, why 10⁻⁸ M HCl is not pH 8, and how temperature moves neutral pH.

· 11 min read

Illustration for the pH Calculator guide

pH is a compact way to write how acidic or basic a solution is. Calculating it is easy for a strong acid, needs one equilibrium step for a weak acid, and needs a little care for very dilute solutions, polyprotic acids and buffers. This post works through each case with the formulas, the shortcuts and the places the shortcuts fail. Every number below comes from the pH Calculator, which solves the full charge balance rather than relying on approximations.

What pH means

The Danish chemist Søren Sørensen introduced pH in 1909 while studying enzymes at the Carlsberg Laboratory in Copenhagen. It is the negative base-10 logarithm of the hydrogen ion concentration:

pH = −log₁₀[H⁺]

with [H⁺] in moles per litre. Strictly, IUPAC defines pH through the activity of hydrogen ions rather than the concentration; the two agree closely in dilute solutions, and concentrations are what this post and the calculator use. Each pH unit is a factor of ten, so pH 3 has ten times the [H⁺] of pH 4 and a thousand times that of pH 6.

A pH scale from 0 to 14 coloured red through green to violet, with [H+] from 1 to 10 to the minus 14 mol per litre below it. Marked values: 0.1 M HCl at 1.0, 0.01 M sulfuric acid at 1.85, 0.1 M acetic acid at 2.88, a 1 to 1 acetate buffer at 4.76, pure water at 50 degrees at 6.63, pure water at 25 degrees at 7.00, blood at 7.35 to 7.45, 0.1 M ammonia at 11.12 and 0.01 M NaOH at 12.00
A pH scale from 0 to 14 coloured red through green to violet, with [H+] from 1 to 10 to the minus 14 mol per litre below it. Marked values: 0.1 M HCl at 1.0, 0.01 M sulfuric acid at 1.85, 0.1 M acetic acid at 2.88, a 1 to 1 acetate buffer at 4.76, pure water at 50 degrees at 6.63, pure water at 25 degrees at 7.00, blood at 7.35 to 7.45, 0.1 M ammonia at 11.12 and 0.01 M NaOH at 12.00

Water, pOH and Kw

Water ionises slightly: H₂O ⇌ H⁺ + OH⁻. The product of the two ion concentrations is a constant at a given temperature:

Kw = [H⁺][OH⁻] = 1.0 × 10⁻¹⁴ at 25 °C

Taking logs gives pH + pOH = pKw = 14.00 at 25 °C, where pOH = −log₁₀[OH⁻]. So once you know one of pH, pOH, [H⁺] or [OH⁻], you know all four. A solution with [H⁺] = 3.2 × 10⁻⁵ M has pH 4.49, pOH 9.51 and [OH⁻] = 3.1 × 10⁻¹⁰ M.

Kw rises with temperature because ionisation absorbs heat:

TemperaturepKwNeutral pH
0 °C14.947.47
10 °C14.537.27
20 °C14.177.08
25 °C14.007.00
30 °C13.836.92
40 °C13.546.77
50 °C13.266.63

Neutral means [H⁺] = [OH⁻], which is pH 7.00 only at 25 °C. Pure water at 50 °C has pH 6.63 and is still neutral, not acidic. The calculator lets you choose the temperature, which sets pKw.

Strong acids and bases

Strong acids such as HCl, HBr, HI, HNO₃ and HClO₄ dissociate completely in water, so [H⁺] equals the acid concentration (times the number of protons, for the fully strong ones):

  • 0.1 M HCl: [H⁺] = 0.1 M, pH 1.00
  • 0.001 M HNO₃: pH 3.00

Strong bases such as NaOH and KOH supply one OH⁻ each; Ca(OH)₂ and Ba(OH)₂ supply two:

  • 0.01 M NaOH: [OH⁻] = 0.01, pOH 2.00, pH 12.00
  • 0.01 M Ca(OH)₂: [OH⁻] = 0.02, pH 12.30

The trap: very dilute acids

The shortcut pH = −log C fails when the acid is so dilute that water's own H⁺ matters. Applied to 10⁻⁸ M HCl it gives pH 8, which would make an acid solution basic. The fix is to include water in the charge balance: [H⁺] = C + [OH⁻] = C + Kw ÷ [H⁺]. Solving the quadratic:

[H⁺] = (C + √(C² + 4 Kw)) ÷ 2 = 1.05 × 10⁻⁷ M, pH 6.98

Slightly acidic, as it should be. The same effect appears for any acid or base below about 10⁻⁶ M.

Weak acids

A weak acid HA only partly dissociates, HA ⇌ H⁺ + A⁻, with an acid dissociation constant:

Ka = [H⁺][A⁻] ÷ [HA], and pKa = −log₁₀ Ka

The smaller the pKa, the stronger the acid. Starting from a formal concentration C and ignoring water, if x dissociates then [H⁺] = [A⁻] = x and [HA] = C − x:

Ka = x² ÷ (C − x)

That is a quadratic you can solve exactly, x = (−Ka + √(Ka² + 4 Ka C)) ÷ 2. If x is small compared with C (less than about 5%), drop it from the denominator to get the familiar shortcut:

[H⁺] ≈ √(Ka × C), so pH ≈ ½ (pKa − log₁₀ C)

Worked example: acetic acid

Acetic acid has pKa 4.76, so Ka = 1.74 × 10⁻⁵. For 0.1 M:

  • Shortcut: √(1.74 × 10⁻⁵ × 0.1) = 1.32 × 10⁻³ M, pH 2.88
  • Exact: x = 1.310 × 10⁻³ M, pH 2.883, and 1.31% of the acid is dissociated

The shortcut works because so little dissociates. Dilute it to 0.001 M and 12.3% dissociates; the exact pH is 3.91 while the shortcut gives 3.88. Hydrofluoric acid (pKa 3.17) at 0.1 M is 7.9% dissociated, pH 2.10 exact versus 2.09 from the shortcut. As a rule, trust the shortcut when C ÷ Ka is above about 400.

Common pKa values at 25 °C, as commonly tabulated in the CRC Handbook of Chemistry and Physics:

AcidpKa
Formic acid3.75
Lactic acid3.86
Benzoic acid4.20
Acetic acid4.76
Carbonic acid (CO₂ + H₂O)6.35, 10.33
Ammonium ion (NH₄⁺)9.25
Hydrocyanic acid9.21
Phosphoric acid2.15, 7.20, 12.35
Citric acid3.13, 4.76, 6.40

Weak bases

A weak base B takes a proton from water, B + H₂O ⇌ BH⁺ + OH⁻, with Kb = [BH⁺][OH⁻] ÷ [B]. Tables often list the pKa of the conjugate acid BH⁺ instead; the two are linked by pKa + pKb = pKw. The calculation mirrors the weak acid one, giving [OH⁻] ≈ √(Kb × C).

For 0.1 M ammonia: pKa of NH₄⁺ is 9.25, so pKb = 4.75 and Kb = 1.78 × 10⁻⁵. [OH⁻] = 1.32 × 10⁻³ M, pOH 2.88 and pH 11.12. About 1.3% of the ammonia molecules are protonated.

Polyprotic acids

Acids with more than one proton lose them in steps, each with its own pKa. Usually the steps are far enough apart that only the first matters for pH, but not always.

Sulfuric acid is the classic case. Its first proton is strong, the second has pKa 1.99. For 0.01 M H₂SO₄, treating both protons as strong gives [H⁺] = 0.02 M and pH 1.70; treating only the first as strong gives pH 2.00. Neither is right. Solving the second equilibrium, x(0.01 + x) ÷ (0.01 − x) = 10⁻¹·⁹⁹, gives x = 0.0042 M, so [H⁺] = 0.0142 M and pH 1.85. Only 42% of the second proton is released at this concentration.

Phosphoric acid at 0.1 M: the first pKa (2.15) dominates. The exact pH is 1.63, with 23% of the acid in the H₂PO₄⁻ form. The shortcut √(Ka C) gives 1.58, off by 0.06 because 23% dissociation is too much for the approximation.

The calculator handles all steps at once by writing a single charge-balance equation:

[H⁺] + [cations] = [OH⁻] + [anions]

with each acid form's share (its "alpha fraction") written in terms of [H⁺] and the Ka values, then solving numerically. It makes no assumptions about which terms are negligible.

Buffers and the Henderson-Hasselbalch equation

A buffer is a mixture of a weak acid and its conjugate base (or a weak base and its conjugate acid) that resists changes in pH. Rearranging the Ka expression and taking logs gives the Henderson-Hasselbalch equation:

pH = pKa + log₁₀([A⁻] ÷ [HA])

When acid and base are equal, pH = pKa. Ten times more base raises the pH by one unit, ten times more acid lowers it by one.

Curves showing the share of acetic acid (falling) and acetate (rising) between pH 2 and 8. They cross at 50 percent at pH 4.76, the pKa, and a shaded band from pH 3.76 to 5.76 marks the useful buffer range
Curves showing the share of acetic acid (falling) and acetate (rising) between pH 2 and 8. They cross at 50 percent at pH 4.76, the pKa, and a shaded band from pH 3.76 to 5.76 marks the useful buffer range

Worked example: an acetate buffer

0.05 M acetic acid with 0.1 M sodium acetate: pH = 4.76 + log₁₀(0.1 ÷ 0.05) = 4.76 + 0.30 = 5.06. The exact charge-balance answer is 5.061, so the equation is excellent here.

To design a buffer, run the equation backwards: [A⁻] ÷ [HA] = 10^(pH − pKa). For pH 5.00 with acetate you need a base-to-acid ratio of 10^(0.24) = 1.74. For pH 7.40 with phosphate, use the H₂PO₄⁻ / HPO₄²⁻ pair (pKa2 7.20) in a ratio of 10^(0.20) = 1.58.

When Henderson-Hasselbalch fails

The equation assumes the amounts of HA and A⁻ you put in are the amounts present at equilibrium. That breaks down when the buffer is very dilute or the pKa is far from 7, because then the acid's own dissociation (or the base's protonation) shifts the ratio. A 10⁻⁴ M formic acid / formate buffer (pKa 3.75) has an exact pH of 4.27, not 3.75: at that pH a large share of the "acid" has already dissociated. Keep buffers at 10 mM or more and within one unit of the pKa.

Buffer capacity

Capacity measures how much strong acid or base a buffer absorbs per unit change in pH. For a monoprotic buffer the Van Slyke expression is:

β = 2.303 × (Kw ÷ [H⁺] + [H⁺] + C × Ka [H⁺] ÷ (Ka + [H⁺])²)

where C is the total buffer concentration. It peaks at pH = pKa, at about 0.576 × C. A 0.1 M acetic / 0.1 M acetate buffer (C = 0.2 M) has β ≈ 115 mM per pH unit, so adding 10 mM of HCl moves its pH by under 0.1.

Practical cautions

  • Formal versus actual concentration. Use what you dissolved per litre of final solution. The calculator works out the equilibrium for you.
  • Activities at high concentration. Above about 0.1 M ionic strength, activity coefficients fall below 1 and measured pH differs from the concentration-based value, often by 0.05 to 0.1 or more. Concentrated acids are the extreme case.
  • Carbon dioxide. Water in contact with air absorbs CO₂ and settles at about pH 5.6. Very dilute base solutions and unbuffered "neutral" water drift for this reason.
  • Temperature. pKa values also change with temperature, some strongly (Tris drops by about 0.03 per °C). The calculator adjusts pKw only.
  • Measurement. For anything that matters, confirm with a pH meter calibrated against at least two standard buffers.

Try it

The pH Calculator has three tabs: the pH of a solution of one acid or base (strong, weak, polyprotic or custom pKa/pKb) with the shortcut shown alongside, a buffer designer with Henderson-Hasselbalch, the exact pH and the capacity, and a converter between pH, pOH, [H⁺] and [OH⁻] at temperatures from 0 to 60 °C. To prepare the solutions themselves, use the Molarity Calculator and the Molecular Weight Calculator.

Sources

  • S. P. L. Sørensen, "Enzymstudien II", Biochemische Zeitschrift 21 (1909) 131 to 304 (introduction of pH).
  • IUPAC, "Measurement of pH. Definition, standards, and procedures" (Buck et al.), Pure and Applied Chemistry 74 (2002) 2169 to 2200.
  • CRC Handbook of Chemistry and Physics: dissociation constants of inorganic and organic acids and bases; ionisation constant of water.
  • H. S. Harned and B. B. Owen, The Physical Chemistry of Electrolytic Solutions: Kw from 0 to 60 °C.
  • D. D. Van Slyke, "On the measurement of buffer values", Journal of Biological Chemistry 52 (1922) 525 to 570.

Related searches

  • how to calculate ph
  • ph of a weak acid
  • ph of a strong base
  • henderson hasselbalch equation
  • pka and ph
  • ph of sulfuric acid
  • buffer calculation
  • ph and poh relationship

Open the pH Calculator