Acid-base calculation

pH Calculator

pH is the negative base-10 logarithm of the hydrogen ion concentration, pH = -log₁₀[H⁺]. Enter [H⁺], [OH⁻], pH, or pOH to get the other three values, or enter the concentration of a strong acid or base, or a weak acid or base with its Ka or Kb, to find the pH of the solution. At 25 °C, pH + pOH = 14.

Browser-side calculationStep-by-step resultEducational use

pH Calculator

Calculator

Pick a known ion value or a dissolved acid or base. Concentrations accept scientific notation such as 1.2e-3. Change pKw only when the solution is not at 25 °C.

Inputs
Choose what you know and enter it. Keep pKw at 14 unless the solution is not at 25 °C.

The equilibrium [H⁺] or [H₃O⁺]. For an acid you dissolved, choose an acid option.

14 is water at 25 °C. pKw is about 14.94 at 0 °C and 12.62 at 80 °C.

Load an example

Result
pH, pOH, [H⁺], and [OH⁻] at the selected pKw. Display rounding does not change the calculation.
Choose what you know, such as [H⁺] or the concentration of a strong or weak acid, then select Calculate. The result shows pH, pOH, both ion concentrations, and each step.
pH = -log₁₀[H⁺] | pOH = -log₁₀[OH⁻] | pH + pOH = pKw | weak acid: x² / (C - x) = Ka

Calculation method

How the calculation works

Step 1
Find [H⁺] or [OH⁻]
A known concentration is converted to mol/L. A strong acid or base supplies n × C of H⁺ or OH⁻. A weak acid or base is solved from Ka or Kb with x² / (C - x) = K. In very dilute solutions, the H⁺ and OH⁻ from water itself are included through Kw.
Step 2
Take the negative logarithm
pH = -log₁₀[H⁺] and pOH = -log₁₀[OH⁻]. When pH or pOH is the known value, the concentration is recovered with [H⁺] = 10^(-pH) or [OH⁻] = 10^(-pOH).
Step 3
Use pKw for the other values
pH + pOH = pKw, which is 14 at 25 °C. A solution is neutral when pH = pOH = pKw / 2, acidic below that value, and basic above it.

Worked examples

Check the result by hand

pH from hydrogen ion concentration
Stomach acid has [H⁺] = 1.2 × 10⁻³ M at 25 °C.
  1. 1.pH = -log₁₀(1.2 × 10⁻³) = 2.921.
  2. 2.The concentration has two significant figures, so pH keeps two decimal places: 2.92.
  3. 3.pOH = 14 - 2.92 = 11.08, and [OH⁻] = 10^(-11.08) = 8.3 × 10⁻¹² M.
pH = 2.92, so the solution is acidic.
pH of a strong base
A solution contains 0.025 M Ba(OH)₂, which releases two OH⁻ per formula unit.
  1. 1.[OH⁻] = 2 × 0.025 M = 0.050 M.
  2. 2.pOH = -log₁₀(0.050) = 1.30.
  3. 3.pH = 14 - 1.30 = 12.70.
pH = 12.70.
pH of a weak acid from Ka
Find the pH of 0.100 M acetic acid, Ka = 1.8 × 10⁻⁵.
  1. 1.Set up x² / (0.100 - x) = 1.8 × 10⁻⁵, where x = [H⁺].
  2. 2.Solve the quadratic: x = 1.333 × 10⁻³ M. Percent ionization = 1.33%, so the shortcut x ≈ √(Ka·C) = 1.342 × 10⁻³ M is also acceptable under the 5% rule.
  3. 3.pH = -log₁₀(1.333 × 10⁻³) = 2.875. Ka has two significant figures, so report two decimal places.
pH = 2.88 from the quadratic. The √(Ka·C) shortcut gives 2.87.
Neutral pH at 80 °C
At 80 °C, Kw = 2.4 × 10⁻¹³, so pKw = 12.62. Is a solution with pH 6.50 acidic or basic?
  1. 1.Neutral pH = pKw / 2 = 12.62 / 2 = 6.31.
  2. 2.pOH = 12.62 - 6.50 = 6.12.
  3. 3.[H⁺] = 10^(-6.50) = 3.2 × 10⁻⁷ M and [OH⁻] = 10^(-6.12) = 7.6 × 10⁻⁷ M.
The solution is basic: pH 6.50 is above the neutral pH of 6.31, and [OH⁻] > [H⁺].

Scope

Assumptions and limits

These limits keep the result reproducible and make unsupported inputs visible instead of guessing.

The default pKw of 14 applies to dilute aqueous solutions at 25 °C. Enter a different pKw when the temperature differs.
Concentrations are used in place of ion activities. This works well for dilute solutions; above about 0.1 M, and especially above 1 M, a measured pH can differ noticeably.
Strong acids and bases are treated as fully dissociated. The second proton of sulfuric acid is not fully released, so entering 2 for H₂SO₄ overstates [H⁺].
Weak acids and bases use one equilibrium constant. For a polyprotic acid such as H₃PO₄, entering Ka₁ is accurate only when later Ka values are much smaller.
Buffers, mixtures of acids and bases, salts, and titration points are not calculated here.
pH below 0 or above 14 is not automatically an error. It can occur in concentrated solutions, where the activity caveat above applies.

pH Calculator FAQ

Frequently asked questions

How do you calculate pH from concentration?

For a strong monoprotic acid such as HCl, [H⁺] equals the acid concentration, so pH = -log₁₀(C). A 0.010 M HCl solution has pH 2.00. If each formula unit releases more than one H⁺, multiply the concentration by that number first. For a weak acid, [H⁺] is smaller than C and must be found from Ka.

How do you find the pH of a weak acid from Ka?

Write Ka = x² / (C - x), where x = [H⁺] and C is the initial acid concentration. Solve the quadratic, or use the shortcut x ≈ √(Ka·C) when the percent ionization is below about 5%. Then pH = -log₁₀(x). For a weak base, use Kb the same way to find [OH⁻], then pOH and pH.

How do you calculate pH from pOH or [OH⁻]?

First find pOH = -log₁₀[OH⁻] if you have a concentration. Then pH = pKw - pOH, which is 14 - pOH at 25 °C. For example, [OH⁻] = 1.0 × 10⁻³ M gives pOH 3.00 and pH 11.00.

What is the pH of 1 × 10⁻⁸ M HCl?

About 6.98, not 8. At this dilution, water supplies more H⁺ (about 10⁻⁷ M) than the acid does. Solving [H⁺] = C + Kw / [H⁺] gives [H⁺] = 1.05 × 10⁻⁷ M. Adding an acid can never make water basic. Choose Strong acid concentration in the calculator to include this effect.

How many decimal places should a pH value have?

A pH keeps as many decimal places as the concentration has significant figures. [H⁺] = 1.2 × 10⁻³ M has two significant figures, so pH = 2.92. The digits before the decimal point only reflect the power of ten.

Does pH 7 always mean neutral?

No. A neutral solution has pH = pOH, so neutral pH is half of pKw. That is 7.00 at 25 °C but about 6.31 at 80 °C, where pKw is 12.62. Water ionizes more as it warms, so pKw falls with temperature.

Can pH be negative or greater than 14?

Yes. The pH scale has no fixed ends; 0 to 14 is only the usual range for dilute solutions at 25 °C. A 2 M strong acid gives a calculated pH of -0.30. At such concentrations, ion activities differ from concentrations, so a pH meter reading will not match the simple calculation exactly.