pH Calculator
Two modes: Simple (enter [H⁺] or [OH⁻]) and Advanced (weak acid/base equilibria with Ka/Kb and step-by-step ICE solution). Default mode: Simple.
pH, pOH, and acid–base equilibria — concepts, calculations, and deeper understanding
The pH scale is one of the most widely used tools in chemistry, biology, environmental science and engineering. It gives a compact, logarithmic measure of the acidity or basicity of an aqueous solution and links macroscopic laboratory observations to microscopic ionic concentrations. By definition, pH = −log10[H+], where [H+] is the molar concentration of hydrogen ions (protons) in solution. Complementary to pH is pOH = −log10[OH−], and at 25 °C (standard laboratory conditions) pH + pOH = 14 because the ionic product of water Kw = [H+][OH−] = 1.0 × 10−14. This relation is central when converting between proton and hydroxide concentrations.
Why pH is logarithmic
Human perception and many chemical effects scale with orders of magnitude rather than absolute changes. A logarithmic scale compresses wide concentration ranges (for example, 1 M down to 1 × 10−14 M) into a small numerical range (roughly 0–14). Each unit change in pH corresponds to a tenfold change in [H+]. For example, a solution at pH 3 has 1000 times more free protons than a solution at pH 6. This property explains why small pH shifts can produce large chemical and biological consequences: enzyme activity, corrosion rates, solubility equilibria and reaction kinetics often respond nonlinearly to proton concentration.
Simple calculations and conversions
There are three very common one-line calculations in pH work, and they are implemented in Simple Mode for fast checks:
- From [H+] to pH: pH = −log10[H+]. Example: [H+] = 1.0 × 10−7 M → pH = 7.00.
- From [OH−] to pH: compute pOH = −log10[OH−] and then pH = 14 − pOH (at 25 °C). Example: [OH−] = 1.0 × 10−7 M → pOH = 7 → pH = 7.
- From pH to concentration: [H+] = 10−pH. Example: pH = 3 → [H+] = 1.0 × 10−3 M.
Strong acids and bases
Strong acids (HCl, HNO3, HBr, etc.) and strong bases (NaOH, KOH) are commonly modeled as fully dissociated in dilute aqueous solution. For a strong acid added at concentration C, [H+] ≈ C and pH ≈ −log10(C). For a strong base at concentration C, [OH−] ≈ C and pOH ≈ −log10(C), hence pH ≈ 14 − pOH. These approximations are excellent for concentrations not extremely high (where non-ideal behavior and activity coefficients begin to matter) and not extremely low (where water autoionization becomes significant relative to the added acid/base).
Water autoionization and lower concentration limits
Pure water at 25 °C has [H+] = [OH−] = 1.0 × 10−7 M, corresponding to pH 7. When adding tiny amounts of acid or base (e.g., 1 × 10−8 M), the water autoionization contribution cannot be ignored and simple subtraction/approximation may fail. Numerical routines and the Advanced Mode's equilibrium solver handle such cases more robustly by solving the exact mass-balance and charge-balance conditions.
Weak acids and bases: equilibrium and ICE tables
Weak acids (acetic acid, HF, etc.) and weak bases (ammonia) are only partially ionized in water. Their equilibrium is governed by Ka (acid dissociation constant) or Kb (base dissociation constant). For a monoprotic weak acid HA with initial concentration C, the dissociation is HA ⇌ H+ + A−. Defining x as the amount dissociated at equilibrium, the concentrations become [HA] = C − x, [H+] = x (assuming no other proton sources), and [A−] = x. The equilibrium expression Ka = x²/(C − x) typically leads to a quadratic equation; solving it exactly yields x and thus pH = −log10(x). There is a common approximation x ≈ √(Ka C) when Ka ≪ C (more quantitatively when Ka/C << 0.01). Advanced Mode automatically solves the quadratic and, if requested, shows the ICE table and the algebraic steps so you can validate the approximation or follow the exact derivation.
Weak base equilibrium and conversion to pH
For a weak base B that hydrolyzes (B + H2O ⇌ BH+ + OH−), Kb expresses the equilibrium in terms of hydroxide production: Kb = [BH+][OH−]/[B]. Defining x = [OH−] produced at equilibrium, we get Kb = x²/(C − x) and solve analogously to the weak acid case. After obtaining [OH−], convert to pOH and then to pH via pH = 14 − pOH (again, at 25 °C). The calculator presents results in both concentration and pH terms for clarity.
Quadratic solutions and numerical stability
Solving the quadratic equation arising from Ka or Kb must be done carefully to avoid catastrophic cancellation when coefficients are small. Advanced Mode uses the standard closed-form quadratic formula, selects the physically meaningful positive root, and safeguards against numerical issues by testing result domains (e.g., rejecting roots that are negative or larger than the initial concentration). For very small Ka relative to C, the naive quadratic can produce inaccurate cancellations; in such cases the approximation x ≈ √(Ka C) and analytic rearrangements improve numerical behavior. The calculator provides both the exact solution and the approximation so you can compare and learn when the approximation is valid.
Limitations: activity coefficients, ionic strength and temperature
The pH calculations implemented here assume ideal diluted aqueous solutions and neglect activity coefficients and ionic strength effects. In real laboratory systems at moderate to high ionic strength, the activity of ions deviates from their concentration due to electrostatic interactions; reliable pH prediction then requires activity corrections (Debye–Hückel or extended models) or speciation calculations using software that accounts for ionic equilibria. Temperature dependence is also ignored in this tool: Kw and equilibrium constants Ka/Kb depend on temperature, so strictly speaking pH + pOH = 14 holds only at 25 °C. If you need temperature-dependent behavior (for example environmental measurements at 10 °C or 40 °C), a temperature-aware version can be built by adding Kw(T) and the van 't Hoff relation adjustments for Ka/Kb.
Practical tips for using this calculator
- Use scientific notation for very small concentrations (e.g., 1e-8) to avoid accidental zero-input parsing.
- When using Advanced Mode, compare the quadratic solution with the √(Ka C) approximation; if they differ significantly, rely on the exact numeric result.
- Discard unphysical roots — the solver selects the positive root less than or equal to the initial concentration.
- For buffered solutions or titrations, use specialized buffer and titration calculators that simulate incremental additions and multiple equilibria.
Worked examples
Example 1 — Simple Mode: Given [H+] = 1.0 × 10−4 M, pH = −log10(1×10−4) = 4.00. Immediate assessment: this is an acidic solution.
Example 2 — Weak acid (Advanced Mode): Acetic acid (CH3COOH) with C = 0.10 M and Ka = 1.8 × 10−5. The equilibrium equation Ka = x²/(C − x) becomes x² + Ka x − Ka C = 0. Substituting yields x² + (1.8×10−5)x − (1.8×10−6) = 0. Solving gives x ≈ 0.00134 M, so pH ≈ −log10(0.00134) ≈ 2.87. The approximation √(Ka C) gives √(1.8×10−6) ≈ 0.00134 and is accurate here because Ka ≪ C.
Example 3 — Weak base: Ammonia (NH3) with C = 0.05 M and Kb = 1.8 × 10−5. Solve x² + Kb x − Kb C = 0 for x = [OH−], obtain x ≈ 0.00095 M, pOH ≈ 3.02 and pH ≈ 10.98.
Educational use and verification
This tool is designed to support learning: Advanced Mode's step-by-step output is intentionally verbose to guide students through ICE tables, algebraic rearrangements, quadratic solutions, and numerical checks. When teaching, show both the algebraic steps and the numerical verification (substitute the computed x back into the Ka expression to compute the residual). A small residual indicates the root is consistent with the equilibrium constant and that the calculation is numerically reliable.
Extending the tool
Possible extensions for future versions include:
- Temperature dependence: include Kw(T) and Ka(T) via van 't Hoff relations or tabulated values.
- Activity corrections: add Debye–Hückel or Pitzer models for ionic strength effects.
- Polyprotic acids and multiple equilibria: chain sequential equilibria and solve coupled nonlinear systems.
- Titration curve simulation: compute pH as a function of titrant addition, including buffer regions and equivalence points.
By combining quick checks in Simple Mode with full equilibrium solutions in Advanced Mode, this pH Calculator aims to be both practical for routine lab work and instructive for coursework. For publication-quality computations requiring activity corrections or non-ideal solutions, pair these quick results with specialized chemical speciation packages.
Frequently Asked Questions
Under typical aqueous conditions pH ranges from 0 (very acidic) to 14 (very basic), though extreme concentrations and non-aqueous solvents can extend beyond this.
Ka and Kb quantify the strength of weak acids and bases and allow calculation of partial dissociation at equilibrium for accurate pH values.
When Ka << C (typically Ka/C < 0.01), the approximation holds well; otherwise solve the quadratic for accuracy.
No — activity coefficients are not included. For concentrated solutions use specialized software or textbooks for corrections.
Basic buffer calculations can be approximated via Henderson–Hasselbalch, but full buffer modeling with multiple equilibria is beyond this tool's scope.
Kw (and thus pH+pOH) depends on temperature. This tool assumes 25°C where Kw = 1.0×10⁻¹⁴.
Only positive physically meaningful roots are accepted; the code filters out negative or >C roots and reports errors if needed.
Yes — enter concentrations in scientific notation (e.g., 1e-6) for dilute solutions.
Not directly — titration curves require incremental addition modeling. This tool focuses on single-equilibrium calculations.
Yes — AkCalculators provides this educational tool free for students and educators.