pH Calculator
Exact pH of acids, bases, salts and mixtures — or convert pH, pOH, [H⁺] and [OH⁻].
Species at equilibrium
Speciation
Fraction of each form against pH; the dashed line marks the pH of this solution. The curves cross at each pKa.
How it was worked out
About the pH Calculator
Find the pH of a solution from what is in it: strong acids and bases, weak acids and bases, polyprotic acids such as phosphoric and carbonic acid, salts that hydrolyse (sodium acetate, ammonium chloride, aluminium chloride, sodium bicarbonate …) and mixtures of up to four solutes, such as a buffer. The pH is not estimated with the usual shortcuts but solved exactly from the charge balance with every equilibrium included — water’s own ions, every proton of a polyprotic acid and the spectator ions — and the textbook shortcut is shown alongside so you can see when it works.
The ion product of water K_w changes with temperature, so the calculator uses the international IAPWS equation from 0 to 100 °C (pure water is neutral at pH 7.47 at 0 °C but 6.13 at 100 °C), or the textbook K_w = 1.0 × 10⁻¹⁴ if your course uses it. A second tab converts between pH, pOH, [H⁺] and [OH⁻]. Acid and base constants come from the OpenStax Chemistry 2e tables, or type your own pKa or Kb.
How to use it
- Choose Solution pH (or Convert to turn a pH, pOH, [H⁺] or [OH⁻] into the others).
- Pick a solute from the list — or Your own acid / Your own base and type its pKa, Ka, pKb or Kb — and type its concentration.
- Add more solutes for a mixture, such as acetic acid with sodium acetate for a buffer.
- Set the temperature and choose IAPWS or textbook K_w, then read the pH, the species concentrations, the speciation chart and the working.
Examples
0.534 M formic acid (Ka 1.8 × 10⁻⁴)
pH 2.01
OpenStax Chemistry 2e Example 14.12.
0.25 M trimethylamine (Kb 6.3 × 10⁻⁵)
pH 11.60
OpenStax Example 14.13.
0.50 M HSO₄⁻ (Ka 1.2 × 10⁻²)
pH 1.14 — the √(KaC) shortcut fails the 5 % test (x would be 15 % of C)
OpenStax Example 14.14.
0.10 M aluminium chloride
pH 2.93
OpenStax Example 14.18: 2.92 after rounding.
0.083 M sodium cyanide
pH 11.11
OpenStax §14.4.
0.033 M carbonic acid
[H⁺] = 1.19 × 10⁻⁴ M, [CO₃²⁻] = 4.7 × 10⁻¹¹ M
OpenStax Example 14.19.
1.0 × 10⁻⁸ M HCl
pH 6.98 — not 8: water’s own H⁺ dominates
0.10 M acetic acid + 0.10 M sodium acetate
pH 4.74 (= pKa)
Common uses
- Chemistry homework on acid–base equilibria, with the exact answer and the textbook approximation side by side.
- Checking whether the “x is small” assumption (the 5 % rule) holds.
- Lab preparation: the expected pH of a salt solution or a simple buffer before you measure it.
- Converting a measured pH into [H⁺] and [OH⁻], or pOH into pH, at the actual temperature.
How the pH is calculated
Every solution must be electrically neutral, so the total positive charge equals the total negative charge — the charge balance. For acetic acid it is [H⁺] = [CH₃COO⁻] + [OH⁻]. Each weak acid also obeys a mass balance (its forms add up to the amount put in), and the share of each form at a given [H⁺] follows from the Ka values. Water contributes [OH⁻] = K_w ÷ [H⁺].
Together these give one equation in [H⁺], which the calculator solves numerically to any precision — no “x is small” assumption, no ignoring the second proton or the water. The textbook shortcuts (pH = −log C for a strong acid, x = √(K_aC) for a weak acid, √(K_bC) for a weak base, ½(pK_a1 + pK_a2) for an amphiprotic salt such as NaHCO₃) are shown with their result, so you can see how close they are.
K_w and temperature
The autoionisation of water increases with temperature, so neutral water is not pH 7 except near 25 °C. With the IAPWS formulation (R11-24, 2024): pK_w = 14.95 at 0 °C, 13.99 at 25 °C, 13.26 at 50 °C and 12.25 at 100 °C, so neutral water has pH 7.47, 7.00, 6.63 and 6.13. Neutral is always pH = pK_w ÷ 2, and the calculator classifies a solution as acidic or basic relative to that. The acid and base constants used are 25 °C values; only K_w follows the temperature.
pH, activity and what a pH meter reads
IUPAC defines pH through the activity of hydrogen ions (Buck et al., Pure Appl. Chem. 74, 2169), which equals the concentration only in very dilute solutions. This calculator, like most textbook problems, uses concentrations. Above an ionic strength of about 0.1 M — shown with every result — real solutions behave less ideally, and a calibrated pH meter will typically read a few tenths different from the calculated value.
Acid and base constants
The built-in Ka and Kb values (25 °C) are those of OpenStax Chemistry 2e Appendices H and I, and the hydrated metal ions (Al³⁺, Fe³⁺, Cu²⁺, Zn²⁺) are from its §14.4. Bases are handled through the conjugate acid, with pK_a = 14.00 − pK_b. Sulfuric acid is treated as strong for its first proton and weak (Ka 1.2 × 10⁻²) for the second. Other books list slightly different constants; type your own if your course gives different ones.
Sources
- IAPWS R11-24 (2024), Revised Release on the Ionization Constant of H₂O (Bandura–Lvov equation with revised parameters; supersedes R11-07): K_w from temperature and density, with the release’s test values. Water density: Tanaka et al. (2001) and IAPWS-IF97 at atmospheric pressure, IAPWS SR1-86 for the saturated liquid.
- OpenStax, Chemistry 2e: §14.3, §14.4, §14.5, Appendix H and Appendix I.
- R. P. Buck et al., “Measurement of pH. Definition, standards, and procedures (IUPAC Recommendations 2002)”, Pure Appl. Chem. 74 (2002) 2169–2200.
Limitations
- Activities are taken as concentrations (ideal solution): good below about 0.01–0.1 M ionic strength, increasingly rough above it.
- Acid and base constants are for 25 °C; only K_w is adjusted for temperature.
- Precipitation, complex formation (other than the first hydrolysis of the listed metal ions) and CO₂ absorbed from the air are not modelled — real basic solutions left open to air slowly pick up carbonate.
- Concentrations are limited to 20 M, and results above about 1 M are rough guides only.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
How do I calculate the pH of a weak acid?
Set up Ka = x² ÷ (C − x) where x = [H⁺]. If x is less than 5 % of C, x ≈ √(Ka·C); otherwise solve the quadratic. For 0.100 M acetic acid, x = √(1.8 × 10⁻⁵ × 0.100) = 1.34 × 10⁻³ M, so pH = 2.87. The calculator gives the exact value and shows the shortcut beside it.
Why is the pH of 10⁻⁸ M HCl not 8?
Adding an acid cannot make water basic. At 10⁻⁸ M the acid supplies fewer H⁺ ions than water’s own autoionisation (10⁻⁷ M), so both must be counted: [H⁺] = 1.05 × 10⁻⁷ M and pH = 6.98, slightly acidic.
Is pure water always pH 7?
Only at about 25 °C. Water ionises more when hot: at 100 °C pK_w is 12.25, so neutral water has pH 6.13 — still neutral, because [H⁺] = [OH⁻]. At 0 °C neutral is pH 7.47.
How do pH and pOH relate?
pH + pOH = pK_w, which is 14.00 at 25 °C in textbooks (13.99 by IAPWS). So a solution of pH 3.2 has pOH 10.8 at 25 °C, and [OH⁻] = K_w ÷ [H⁺].
Is a salt solution acidic, basic or neutral?
It depends on the ions. The anion of a weak acid (acetate, cyanide, carbonate) makes the solution basic; the cation of a weak base (ammonium, anilinium) or a small, highly charged metal ion (Al³⁺, Fe³⁺) makes it acidic; ions of strong acids and bases (Na⁺, K⁺, Cl⁻, NO₃⁻) are neutral. When both ions react, as in NH₄F, the stronger one wins.
Can I calculate the pH of a buffer?
Yes — add both solutes, for example 0.10 M acetic acid and 0.10 M sodium acetate (pH 4.74). The exact solution agrees with the Henderson–Hasselbalch equation when both concentrations are much larger than [H⁺] and [OH⁻], and stays correct when they are not.