pH Calculator

Calculate pH, pOH, [H⁺] and [OH⁻] for strong and weak acids and bases, polyprotic acids and buffers, solved exactly with water included, not just by shortcut.

The interactive tool loads here when JavaScript runs.

About this tool

What is the pH Calculator?

This pH calculator finds the pH of a solution of one acid or base from its concentration. Choose from strong acids (HCl, HNO₃, HBr, HClO₄), sulfuric acid, strong bases (NaOH, KOH, Ca(OH)₂, Ba(OH)₂), weak acids (acetic, formic, lactic, benzoic, HF, HCN, boric, carbonic, phosphoric, citric) and weak bases (ammonia, methylamine, pyridine, Tris), or enter your own pKa or pKb. You get pH, pOH, [H⁺], [OH⁻] and the percentage ionised.

Instead of the textbook shortcuts, the calculator solves the full charge balance numerically, including the ions from water and every dissociation step of polyprotic acids. That is why it gives the right answer for 10⁻⁸ M HCl (pH 6.98, not 8) and for 0.01 M sulfuric acid (pH 1.85, not 1.70). The shortcut estimate is shown next to it so you can see when it breaks down.

The Buffer tab gives the Henderson-Hasselbalch pH for a weak acid and its conjugate base, the exact pH, the buffer capacity, and the base-to-acid ratio needed to hit a target pH. A third tab converts between pH, pOH, [H⁺] and [OH⁻]. Temperature can be set from 0 to 60 °C, which changes pKw and the pH of neutral water.

  • Exact charge-balance pH, including water
  • Strong, weak and polyprotic acids and bases, or custom pKa/pKb
  • Buffer pH by Henderson-Hasselbalch and exactly, with capacity
  • pH, pOH, [H⁺] and [OH⁻] converter
  • Temperature-dependent pKw from 0 to 60 °C
Read the guide: How to Calculate pH: Strong and Weak Acids, Bases and Buffers

How to use the pH Calculator

  1. On the Acid or base solution tab, choose the substance, or choose Other weak acid / base and enter the pKa or pKb.
  2. Enter the formal concentration (what you dissolved per litre) in M, mM, µM or nM, and pick the temperature.
  3. Read the pH, pOH, ion concentrations and percentage ionised, and compare with the shortcut estimate.
  4. For a buffer, open the Buffer tab, pick the acid and conjugate base pair, enter both concentrations in the final volume, and optionally a target pH to get the ratio you need.
  5. To convert a known pH, pOH, [H⁺] or [OH⁻], use the third tab.

Worked examples

Vinegar-strength acetic acid

Input

Acetic acid (pKa 4.76), 0.1 M

Output

pH 2.883; 1.31% dissociated

The shortcut √(Ka·C) gives 2.88 as well, because only a small fraction dissociates.

Very dilute strong acid

Input

HCl, 10⁻⁸ M

Output

pH 6.978

The shortcut −log C says pH 8, which would make an acid solution basic. Water's own 10⁻⁷ M of H⁺ dominates here.

Sulfuric acid

Input

H₂SO₄, 0.01 M

Output

pH 1.848

The second proton (pKa 1.99) is only 42% dissociated at this concentration, so [H⁺] is 0.0142 M rather than 0.02 M.

Household ammonia

Input

Ammonia (pKa of NH₄⁺ 9.25), 0.1 M

Output

pH 11.12; 1.32% protonated

pKb = 14 − 9.25 = 4.75, and [OH⁻] comes out at 1.32 × 10⁻³ M.

Acetate buffer

Input

Buffer; acetic acid 0.05 M, sodium acetate 0.1 M

Output

pH 5.061 (HH 5.061); capacity 76.8 mM per pH

At these concentrations Henderson-Hasselbalch and the exact solution agree to 0.001.

Background and insight

Søren Sørensen introduced the pH scale at the Carlsberg Laboratory in 1909 as the negative logarithm of the hydrogen ion concentration. Strictly, pH is defined by the activity of hydrogen ions (IUPAC), which equals the concentration only in dilute solutions; this calculator uses concentrations, which is accurate to a few hundredths of a unit below about 0.01 M ionic strength and drifts at higher concentrations.

Water itself ionises: [H⁺][OH⁻] = Kw, which is 1.0 × 10⁻¹⁴ at 25 °C (pKw 14.00) but 1.1 × 10⁻¹⁵ at 0 °C and 5.5 × 10⁻¹⁴ at 50 °C. Neutral water is pH 7.00 only at 25 °C; at 50 °C it is 6.63 and still neutral. A weak acid HA dissociates according to Ka = [H⁺][A⁻] ÷ [HA], and pKa = −log Ka; the smaller the pKa, the stronger the acid. For a weak base, Kb relates to the pKa of its conjugate acid through pKa + pKb = pKw.

The exact method writes one charge-balance equation, [H⁺] + cations = [OH⁻] + anions, with each acid species expressed through its dissociation fractions, and solves it for [H⁺]. It needs no assumptions about which terms are small, so the same code handles a strong acid, a weak base, a triprotic acid or a buffer. pKa values are the commonly tabulated 25 °C figures from the CRC Handbook of Chemistry and Physics.

Common use cases

  • Chemistry courses

    Check strong, weak and polyprotic acid and base answers, and see when the approximations fail.

  • Lab buffer preparation

    Get the base-to-acid ratio for a target pH and check how much capacity the buffer has.

  • Water treatment and aquariums

    Convert between pH and hydrogen or hydroxide ion concentration and see how temperature shifts neutral pH.

  • Food and fermentation

    Estimate the pH of acetic, lactic or citric acid solutions at a given strength.

Tips and limitations

  • Use the formal concentration: moles of substance dissolved per litre of final solution, not the concentration of a particular ion.
  • Above about 0.1 M, activity effects make real pH differ from the concentration-based value by 0.05 to 0.1 or more; a calibrated pH meter is the final word.
  • A buffer works best within one pH unit of its pKa. Outside that range the ratio needed becomes more than 10:1 and capacity falls away.
  • Dissolved CO₂ from air lowers the pH of pure water to about 5.6, so freshly made dilute bases and very dilute acids drift.
  • For polyprotic buffers such as phosphate at pH 7, choose the pKa between the two forms you are mixing (H₂PO₄⁻ / HPO₄²⁻, pKa2 7.20).

Frequently asked questions

How do you calculate pH?

pH = −log₁₀[H⁺]. For a strong acid [H⁺] is roughly the acid concentration, so 0.01 M HCl is pH 2. For a weak acid you need its Ka; 0.1 M acetic acid is pH 2.88.

How do you find the pH of a weak acid?

Solve Ka = x² ÷ (C − x) for x = [H⁺], or use the shortcut x ≈ √(Ka × C) when the acid is less than about 5% dissociated. The calculator solves it exactly and shows the shortcut beside it.

What is the Henderson-Hasselbalch equation?

pH = pKa + log₁₀([A⁻] ÷ [HA]). An equal mix of acid and conjugate base gives pH = pKa; ten times more base raises it by one unit.

Why is the pH of 10⁻⁸ M HCl not 8?

Because water already supplies about 10⁻⁷ M of H⁺, ten times more than the acid adds. Including water gives pH 6.98, slightly acidic as it should be.

What is the relationship between pH and pOH?

pH + pOH = pKw, which is 14.00 at 25 °C. A solution at pH 4 has pOH 10, [H⁺] = 10⁻⁴ M and [OH⁻] = 10⁻¹⁰ M.

Is neutral pH always 7?

Only at 25 °C. Neutral means [H⁺] = [OH⁻], which is pH 7.47 at 0 °C and 6.63 at 50 °C because Kw rises with temperature.

How accurate is the calculator for concentrated solutions?

It uses concentrations rather than activities, so above about 0.1 M the real pH can differ by 0.1 or more. For concentrated acids and high-ionic-strength samples, measure with a calibrated meter.

Is there an in-depth guide to the pH Calculator?

Yes. “How to Calculate pH: Strong and Weak Acids, Bases and Buffers” covers the background, how it works, common pitfalls and worked examples. Read the full guide.

People also search for

  • how to calculate ph of a weak acid
  • ph of 0.1 m acetic acid
  • ph of 0.01 m naoh
  • henderson hasselbalch buffer calculator
  • convert h+ concentration to ph
  • ph of 1e-8 m hcl
  • ph of 0.1 m ammonia solution
  • how to make a buffer at a specific ph