pH is the measure of how acidic or basic a solution is. Understanding how to calculate it from first principles is fundamental to chemistry, biology, medicine, and environmental science.

The pH Formula

pH is defined as the negative base-10 logarithm of the hydrogen ion concentration:

pH = −log₁₀[H⁺]

Where [H⁺] is the concentration of hydrogen ions in moles per litre (mol/L or M).

Example 1: [H⁺] = 0.001 M (10⁻³ M):

  • pH = −log(0.001) = −(−3) = 3 (acidic)

Example 2: [H⁺] = 1 × 10⁻⁷ M (pure water):

  • pH = −log(10⁻⁷) = 7 (neutral)

Example 3: [H⁺] = 1 × 10⁻¹¹ M:

  • pH = 11 (basic/alkaline)

The pH Scale

pHClassificationExample
0–2Strongly acidicBattery acid, stomach acid (1–2)
3–4AcidicVinegar (2.4), orange juice (3.5)
5–6Mildly acidicBlack coffee (5), rainwater (5.6)
7NeutralPure water
8–9Mildly basicSeawater (8), baking soda (8.3)
10–12BasicMilk of magnesia (10.5)
13–14Strongly basicBleach (12.5), drain cleaner (14)

Calculating [H⁺] from pH

The reverse calculation — finding ion concentration from pH:

[H⁺] = 10^(−pH)

Example: pH = 4.5:

  • [H⁺] = 10^(−4.5) = 3.16 × 10⁻⁵ mol/L

The Relationship Between pH and pOH

In aqueous solutions at 25°C:

pH + pOH = 14
pOH = −log₁₀[OH⁻]

If you know the hydroxide ion concentration instead of hydrogen ions:

Example: [OH⁻] = 1 × 10⁻³ M:

  • pOH = −log(10⁻³) = 3
  • pH = 14 − 3 = 11 (basic)

Calculating pH of Strong Acids

Strong acids (HCl, HNO₃, H₂SO₄) dissociate completely in water:

[H⁺] = Concentration of acid (for monoprotic acids)
pH = −log[acid concentration]

Example: 0.05 M HCl:

  • [H⁺] = 0.05 M
  • pH = −log(0.05) = 1.30

For H₂SO₄ (diprotic): [H⁺] = 2 × [H₂SO₄]

Calculating pH of Weak Acids (Using Ka)

Weak acids partially dissociate. Use the acid dissociation constant Ka:

[H⁺] = √(Ka × C)
pH = −log(√(Ka × C)) = ½ × (pKa − log C)

Where C = initial acid concentration, Ka = dissociation constant.

Example: 0.1 M acetic acid (Ka = 1.8 × 10⁻⁵):

  • [H⁺] = √(1.8 × 10⁻⁵ × 0.1) = √(1.8 × 10⁻⁶) = 1.34 × 10⁻³
  • pH = −log(1.34 × 10⁻³) = 2.87

(Compared to strong acid: 0.1 M HCl would have pH = 1.0 — much more acidic)

Calculating pH of Strong Bases

Strong bases (NaOH, KOH) dissociate completely:

[OH⁻] = concentration of base
pOH = −log[OH⁻]
pH = 14 − pOH

Example: 0.02 M NaOH:

  • pOH = −log(0.02) = 1.70
  • pH = 14 − 1.70 = 12.30

Buffer Solutions

A buffer resists pH change. The Henderson-Hasselbalch equation calculates buffer pH:

pH = pKa + log([A⁻]/[HA])

Where [A⁻] = conjugate base concentration, [HA] = weak acid concentration.

Example: Acetic acid/acetate buffer, pKa = 4.74, equal concentrations:

  • pH = 4.74 + log(1) = 4.74 + 0 = 4.74

Buffers work best within ±1 pH unit of the pKa.

Practical Applications

Blood pH: Maintained at 7.35–7.45 by bicarbonate buffering. Below 7.35 = acidosis; above 7.45 = alkalosis.

Swimming pools: Optimal pH 7.2–7.8. Below 7.0 irritates eyes and corrodes equipment; above 7.8 reduces chlorine effectiveness.

Soil pH: Affects nutrient availability. Most plants thrive at 6.0–7.0; blueberries prefer 4.5–5.5.

Use our logarithm calculator to quickly compute −log values for pH and pOH calculations.