pH Calculator: pOH, Strong and Weak Acids, Bases and Buffers
By FindMySum · Last reviewed
pH is the chemist's scale for how acidic or basic a solution is. Defined as the negative logarithm of the hydrogen ion concentration, it turns numbers like 0.0000001 mol/L into a friendly 7. This calculator converts between pH, pOH and the ion concentrations, and works out the pH of strong acids and bases, weak acids and bases (solved exactly, not just with the textbook shortcut) and buffers.
The definitions
pH = −log₁₀[H⁺] and pOH = −log₁₀[OH⁻]
where the square brackets mean concentration in moles per litre. In water at 25 °C, the hydrogen and hydroxide concentrations always multiply to the ion product of water:
Kw = [H⁺] × [OH⁻] = 1.0 × 10⁻¹⁴, so pH + pOH = 14
Neutral water has [H⁺] = [OH⁻] = 10⁻⁷ M and pH 7. Below 7 is acidic, above 7 basic. Because the scale is logarithmic, each unit is a factor of ten: pH 3 is ten times more acidic than pH 4 and a thousand times more than pH 6.
Strong acids and bases
Strong acids such as hydrochloric, nitric and hydrobromic acid ionise completely, so [H⁺] equals the acid's concentration. 0.01 M HCl has [H⁺] = 0.01 M and pH 2. For bases that release two hydroxide ions, such as barium or calcium hydroxide, set "H⁺ or OH⁻ per formula unit" to 2: 0.005 M Ba(OH)₂ gives [OH⁻] = 0.01 M, pOH 2 and pH 12.
The calculator also counts the hydrogen ions from water itself, which matters only for very dilute solutions. A 10⁻⁸ M HCl solution does not have pH 8, which would be basic; adding the acid's ions to water's own gives pH 6.98.
Weak acids and bases: the default example
Weak acids ionise only partly. The extent is set by the acid dissociation constant:
Ka = [H⁺][A⁻] ÷ [HA]
If an acid at concentration C releases x mol/L of H⁺, then Ka = x² ÷ (C − x). The calculator solves this quadratic exactly:
x = (−Ka + √(Ka² + 4·Ka·C)) ÷ 2
The calculator opens with 0.1 M acetic acid, the acid in vinegar, with Ka = 1.8 × 10⁻⁵:
- x = (−1.8 × 10⁻⁵ + √(3.24 × 10⁻¹⁰ + 7.2 × 10⁻⁶)) ÷ 2 = 1.333 × 10⁻³ M
- pH = −log₁₀(1.333 × 10⁻³) = 2.875
- 1.33% of the acid molecules are ionised
Many textbooks assume x is small next to C and use x ≈ √(Ka·C), which gives pH 2.872 here. That shortcut is fine when less than about 5% of the acid ionises, and the calculator shows both so you can see when it breaks down. For 0.05 M hydrofluoric acid, which is 10.7% ionised, the exact pH is 2.272 and the shortcut is noticeably off.
Weak bases work the same way with the base constant Kb: 0.1 M ammonia (Kb = 1.8 × 10⁻⁵) has [OH⁻] = 1.333 × 10⁻³ M, pOH 2.875 and pH 11.125.
Buffers
A buffer is a mixture of a weak acid and its conjugate base, such as acetic acid and sodium acetate. Its pH follows the Henderson–Hasselbalch equation:
pH = pKa + log₁₀([A⁻] ÷ [HA])
With equal concentrations of acid and base the log term is zero and the pH equals the pKa: 4.74 for an acetate buffer. With twice as much acetate as acetic acid the pH rises by log₁₀ 2 = 0.30 to 5.05. A buffer works best within about one pH unit of its pKa, which is why chemists pick the acid by its pKa. For a buffer made from a weak base, such as ammonia and ammonium chloride, choose the base and the calculator uses the conjugate acid's pKa = 14 − pKb.
Acid and base constants used
The presets use the Ka and Kb values at 25 °C from the appendices of OpenStax Chemistry 2e, which draw on the CRC Handbook of Chemistry and Physics:
| Compound | Constant |
|---|---|
| Acetic acid | Ka = 1.8 × 10⁻⁵ |
| Formic acid | Ka = 1.8 × 10⁻⁴ |
| Hydrofluoric acid | Ka = 6.4 × 10⁻⁴ |
| Carbonic acid (first step) | Ka = 4.3 × 10⁻⁷ |
| Phosphoric acid (first step) | Ka = 7.5 × 10⁻³ |
| Hypochlorous acid | Ka = 2.9 × 10⁻⁸ |
| Ammonia | Kb = 1.8 × 10⁻⁵ |
For any other weak acid or base, choose "Custom" and enter its pKa or pKb.
pH in everyday life
Lemon juice is around pH 2, vinegar 2.5, black coffee 5, seawater 8.1 and household ammonia 11.5. Swimming pools are kept between 7.2 and 7.8, the range Ontario requires for public pools and spas: lower water irritates eyes and corrodes metal, while higher water makes chlorine less effective, because hypochlorous acid, the active disinfectant, has a pKa near 7.5 and turns into the much weaker hypochlorite ion as the pH rises. The table on this page places your result among these everyday values.
Limits of the simple formulas
The formulas use concentrations. In concentrated or salty solutions, ions interact and their effective concentrations (activities) are lower, so real pH values differ from calculated ones. Polyprotic acids such as phosphoric acid release protons in several steps; the calculator handles each step separately, not the whole system. Results are for 25 °C.
More questions
Can pH be negative or above 14?
Yes. A 2 M solution of a strong acid has a calculated pH of about −0.3, and concentrated sodium hydroxide can exceed 14. The 0–14 range is only what dilute solutions in water usually fall within; at high concentrations, activities rather than concentrations should be used, and the simple formulas become approximate.
Does pH change with temperature?
Yes. Water's ion product Kw grows with temperature, so neutral water has a pH of about 7.47 at 0 °C and about 6.14 at 100 °C. It is still neutral, because [H⁺] and [OH⁻] stay equal. This calculator works at 25 °C, where neutral is exactly 7.
What is the difference between a strong acid and a concentrated acid?
Strength is about how completely an acid ionises; concentration is how much of it is dissolved. Dilute hydrochloric acid is still a strong acid, fully ionised, and concentrated acetic acid is still a weak one, only partly ionised.
Why do buffers resist pH changes?
A buffer holds both a weak acid and its conjugate base. Added strong acid is mopped up by the base, and added strong base by the acid, so the ratio [A⁻]/[HA] changes only a little and the pH, which depends on the logarithm of that ratio, changes even less.
How accurate are pH test strips?
Universal indicator strips read to about ±0.5 to ±1 pH unit, enough to tell acidic from basic or to check a pool roughly. For an exact value, a pH meter calibrated with standard buffers is accurate to about ±0.01.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.