# pH calculator

> Free pH calculator: pH = −log[H+]. pH of strong and weak acids and bases from concentration and pKa, buffer pH by Henderson–Hasselbalch, a pKa table.

URL: https://www.labcanvas.com/tools/ph-calculator

pH = −log₁₀[H⁺], and at 25 °C pH + pOH = 14, so 0.01 M HCl is pH 2.00 and 0.05 M NaOH is pH 12.70. A weak acid also needs its pKa: 0.1 M acetic acid (pKa 4.76) is pH 2.88. This calculator converts between pH, pOH, [H⁺] and [OH⁻], solves strong and weak acids and bases exactly (including water’s own ions), and gives buffer pH, or the base-to-acid ratio for a target pH, with the Henderson–Hasselbalch equation, pH = pKa + log₁₀([A⁻]/[HA]).

## Quick answer

- **What it does:** Converts between pH, pOH, [H⁺] and [OH⁻], gives the exact pH of strong and weak acids and bases, and designs buffers with Henderson–Hasselbalch, at 25 °C.
- **Formula:** pH = −log₁₀[H⁺]; Kw = 1.0 × 10⁻¹⁴; weak acid: [H⁺]³ + Ka[H⁺]² − (KaC + Kw)[H⁺] − KaKw = 0; buffer pH = pKa + log₁₀([A⁻]/[HA]).
- **Example:** 0.1 M acetic acid (pKa 4.76) gives [H⁺] = 1.31 × 10⁻³ M, so pH = 2.88 with 1.3 % ionised.

Free, in the browser, no account needed. Updated 2026-11-23.

## Features

- pH ⇄ pOH ⇄ [H⁺] ⇄ [OH⁻]
- Strong acids and bases, including very dilute ones
- Weak acids and bases from \(\mathrm{p}K_\mathrm{a}\) (exact solution)
- Buffer pH and ratio for a target pH
- \(\mathrm{p}K_\mathrm{a}\) presets at 25 °C: acetate, citrate, MES, MOPS, PIPES, phosphate, HEPES, Tris, borate, glycine, CAPS…
- Tables below: pKa of 17 buffers, buffer recipes, pH and [H⁺]

## How to use it

1. **Choose a calculator**: Convert a value, or calculate for a strong acid/base, a weak acid/base or a buffer.
2. **Enter the values**: Type the concentration and, for weak acids, bases and buffers, the \(\mathrm{p}K_\mathrm{a}\) (or pick a common one).
3. **Read the result**: Get the pH with pOH, [H⁺] and [OH⁻], plus the fraction ionised or the buffer ratio.

## At a glance

| | |
| --- | --- |
| Converts | pH, pOH, [H⁺] and [OH⁻] (\(K_\mathrm{w} = 1.0\times10^{-14}\) at 25 °C) |
| Strong acids and bases | Fully dissociated, with water’s own ions, so very dilute solutions come out right |
| Weak acids and bases | Solved exactly from the charge balance, from \(\mathrm{p}K_\mathrm{a}\) |
| Buffers | \(\mathrm{pH} = \mathrm{p}K_\mathrm{a} + \log_{10}([\mathrm{A^-}]/[\mathrm{HA}])\), and the ratio for a target pH |
| Limit | Concentrations stand in for activities, which is accurate for dilute solutions |

## How it works

$$\begin{aligned} \mathrm{pH} &= -\log_{10}[\mathrm{H^+}] \\ \mathrm{pOH} &= -\log_{10}[\mathrm{OH^-}] \\ [\mathrm{H^+}][\mathrm{OH^-}] &= K_\mathrm{w} = 1.0\times10^{-14}\ \ (25\ ^\circ\mathrm{C}) \end{aligned}$$

$$\begin{aligned} &\text{Weak acid:} \\ &[\mathrm{H^+}]^3 + K_\mathrm{a}[\mathrm{H^+}]^2 \\ &\quad {}- (K_\mathrm{a}C + K_\mathrm{w})[\mathrm{H^+}] - K_\mathrm{a}K_\mathrm{w} = 0 \end{aligned}$$

$$\text{Buffer: } \mathrm{pH} = \mathrm{p}K_\mathrm{a} + \log_{10}\frac{[\mathrm{A^-}]}{[\mathrm{HA}]}$$

Strong acids are treated as fully dissociated with water’s own ions included, so a \(10^{-8}\) M HCl solution correctly gives a pH just below 7. Weak acids and bases are solved exactly from the charge balance rather than with the \(\sqrt{K_\mathrm{a}C}\) shortcut. Concentrations stand in for activities, which is accurate for dilute solutions.

## Worked examples: HCl, NaOH, acetic acid, ammonia and buffers

Six common cases, each the value the calculator gives (25 °C, concentrations for activities).

- **Strong acid: 0.01 M HCl.** Fully dissociated, so \([\mathrm{H^+}] = 0.01\ \mathrm{M}\) and \(\mathrm{pH} = -\log_{10}(0.01) = \mathbf{2.00}\).
- **Very dilute acid: 10⁻⁸ M HCl.** Not pH 8: water’s own ions dominate, and solving \([\mathrm{H^+}] = C + K_\mathrm{w}/[\mathrm{H^+}]\) gives **pH 6.98**.
- **Strong base: 0.05 M NaOH.** \(\mathrm{pOH} = -\log_{10}(0.05) = 1.30\), so \(\mathrm{pH} = 14 - 1.30 = \mathbf{12.70}\).
- **Weak acid: 0.1 M acetic acid** (pKa 4.76). \([\mathrm{H^+}] = 1.31\times10^{-3}\ \mathrm{M}\), **pH 2.88**, 1.3 % ionised. The shortcut \(\mathrm{pH} \approx \tfrac12(\mathrm{p}K_\mathrm{a} - \log_{10} C)\) gives the same 2.88 here.
- **Weak base: 0.1 M ammonia** (pKa of NH₄⁺ 9.25). \([\mathrm{OH^-}] \approx \sqrt{K_\mathrm{b} C}\) with \(K_\mathrm{b} = 10^{-4.75}\): **pH 11.12**.
- **Buffer: equal amounts of acetic acid and sodium acetate.** \(\mathrm{pH} = \mathrm{p}K_\mathrm{a} + \log_{10}(1) = \mathbf{4.76}\). For pH 7.4 with phosphate (pKa₂ 7.20) the ratio \([\ce{HPO4^2-}]/[\ce{H2PO4-}]\) is \(10^{0.2} = 1.58\).


## pKa table of common buffers and weak acids

Choose a buffer whose pKa is within one unit of the pH you need. Values are thermodynamic pKa at 25 °C (Goldberg et al. 2002); the last numeric column is the change in pKa per °C. In real buffers, ionic strength lowers the apparent pKa of phosphate and citrate noticeably, so always finish with a pH meter.

| Acid or buffer | pKa | Useful pH range | ΔpKa per °C | Notes |
| --- | --- | --- | --- | --- |
| Citric acid | 3.13, 4.76, 6.40 | 2.1–7.4 |  | Three pKa values; antigen retrieval at pH 6.0 |
| Acetic acid | 4.76 | 3.8–5.8 | +0.0002 | Hardly changes with temperature |
| MES | 6.27 | 5.3–7.3 | −0.011 | Good’s buffer |
| Carbonic acid / bicarbonate | 6.35, 10.33 | 5.4–7.4 and 9.3–11.3 |  | Exchanges CO₂ with air; cell culture media with 5 % CO₂ |
| Imidazole | 6.99 | 6.0–8.0 |  | Also the His-tag elution reagent |
| PIPES | 7.14 | 6.1–8.1 | −0.0085 | Good’s buffer |
| MOPS | 7.18 | 6.2–8.2 | −0.011 | RNA electrophoresis |
| Phosphoric acid | 2.15, 7.20, 12.35 | 6.2–8.2 (pKa₂) | −0.0028 | PBS; its apparent pKa₂ falls to about 6.8 at 0.1 M ionic strength |
| HEPES | 7.56 | 6.6–8.6 | −0.014 | Cell culture outside a CO₂ incubator |
| Tris | 8.07 | 7.1–9.1 | −0.028 | Strongly temperature dependent: set the pH at the working temperature |
| Tricine | 8.14 | 7.1–9.1 |  | Tricine-SDS-PAGE |
| Bicine | 8.33 | 7.3–9.3 |  | Good’s buffer |
| Boric acid | 9.24 | 8.2–10.2 |  | TBE, borate buffers |
| Ammonium (NH₄⁺/NH₃) | 9.25 | 8.2–10.2 |  | Ammonia is the base form |
| CHES | 9.39 | 8.4–10.4 |  | Good’s buffer |
| Glycine | 2.35, 9.78 | 8.8–10.8 (pKa₂) |  | Glycine-NaOH; glycine-HCl near pH 2–3 |
| CAPS | 10.50 | 9.5–11.5 |  | Western transfer at pH 11 |

## How to make a buffer of a given pH

Henderson–Hasselbalch gives the fraction in the base form: \(f_\mathrm{base} = r/(1 + r)\) with \(r = 10^{\,\mathrm{pH} - \mathrm{p}K_\mathrm{a}}\). Three worked recipes for 1 L:

- **0.1 M sodium phosphate, pH 7.4** (pKa₂ 7.20): \(r = 1.585\), so 61.3 % base. Weigh 8.70 g Na₂HPO₄ (61.3 mM) and 5.34 g NaH₂PO₄·H₂O (38.7 mM). Because ionic strength lowers the apparent pKa₂ to about 6.8, the measured pH comes out lower; laboratory tables made with a pH meter use about 77: 23 for pH 7.4. Titrate with NaOH to 7.4.
- **50 mM Tris-HCl, pH 8.0 at 25 °C** (pKa 8.07): 54.0 % of the Tris must be protonated. Dissolve 6.057 g Tris base in 800 mL and add about 27.0 mL of 1 M HCl, check with a pH meter, then make up to 1 L. Used at 4 °C, the same solution reads about pH 8.6.
- **0.1 M sodium acetate, pH 5.0** (pKa 4.76): \(r = 10^{0.24} = 1.74\), 63.5 % acetate. Weigh 8.64 g sodium acetate trihydrate and add 2.09 mL glacial acetic acid, then make up to 1 L.

## pH, [H⁺] and pOH at a glance

| pH | [H⁺] (mol/L) | pOH |  |
| --- | --- | --- | --- |
| 0 | 1 | 14 | Acidic |
| 1 | 10⁻¹ | 13 | Acidic |
| 2 | 10⁻² | 12 | Acidic |
| 3 | 10⁻³ | 11 | Acidic |
| 4 | 10⁻⁴ | 10 | Acidic |
| 5 | 10⁻⁵ | 9 | Acidic |
| 6 | 10⁻⁶ | 8 | Acidic |
| 7 | 10⁻⁷ | 7 | Neutral |
| 8 | 10⁻⁸ | 6 | Basic |
| 9 | 10⁻⁹ | 5 | Basic |
| 10 | 10⁻¹⁰ | 4 | Basic |
| 11 | 10⁻¹¹ | 3 | Basic |
| 12 | 10⁻¹² | 2 | Basic |
| 13 | 10⁻¹³ | 1 | Basic |
| 14 | 10⁻¹⁴ | 0 | Basic |

Each pH unit is a tenfold change in [H⁺]: pH 6 has ten times the [H⁺] of pH 7. At 37 °C, \(K_\mathrm{w}\) is about \(2.4\times10^{-14}\) and neutral water is pH 6.8.

## Common mistakes with pH and buffers

- **Taking −log of the acid concentration for a weak acid.** 0.1 M acetic acid is pH 2.88, not 1; only strong acids are fully dissociated.
- **Using the base’s pKb as a pKa.** For ammonia or Tris, use the pKa of the conjugate acid (9.25 and 8.07); pKa + pKb = 14.
- **Ignoring temperature.** Tris loses about 0.028 pH units per °C: a buffer set to pH 8.0 at 25 °C is about 8.6 at 4 °C and 7.7 at 37 °C.
- **Trusting Henderson–Hasselbalch for the final pH.** It uses concentrations instead of activities, so salt shifts the real pH; use it to get close, then adjust with a pH meter.
- **Diluting a 10× buffer and expecting the same pH.** The ratio stays the same, but the ionic strength changes and the pH can shift by 0.1 or more, especially for phosphate.
- **Choosing a buffer far from its pKa.** Outside pKa ± 1 there is little buffering capacity.

## References

- Goldberg RN, Kishore N, Lennen RM. Thermodynamic quantities for the ionization reactions of buffers. *J Phys Chem Ref Data* 2002;31:231–370. [doi:10.1063/1.1416902](https://doi.org/10.1063/1.1416902)
- Good NE, Winget GD, Winter W et al. Hydrogen ion buffers for biological research. *Biochemistry* 1966;5:467–477. [doi:10.1021/bi00866a011](https://doi.org/10.1021/bi00866a011)
- Ferguson WJ, Braunschweiger KI, Braunschweiger WR et al. Hydrogen ion buffers for biological research. *Anal Biochem* 1980;104:300–310. [doi:10.1016/0003-2697(80)90079-2](https://doi.org/10.1016/0003-2697(80)90079-2)
- Stoll VS, Blanchard JS. Buffers: principles and practice. *Methods Enzymol* 1990;182:24–38. [doi:10.1016/0076-6879(90)82006-N](https://doi.org/10.1016/0076-6879(90)82006-N)
- Cohen ER, Cvitaš T, Frey JG et al. *Quantities, Units and Symbols in Physical Chemistry* (IUPAC Green Book), 3rd ed. RSC Publishing; 2007. [doi:10.1039/9781847557889](https://doi.org/10.1039/9781847557889)


## Related calculators

- [Molarity calculator](https://www.labcanvas.com/tools/molarity-calculator): Grams to weigh for a molar solution (m = C × V × M), or the molarity or volume from a mass.
- [Dilution calculator](https://www.labcanvas.com/tools/dilution-calculator): C₁V₁ = C₂V₂ for whichever value is missing, and serial dilutions planned tube by tube.
- [RHE converter](https://www.labcanvas.com/tools/rhe-calculator): Potentials vs Ag/AgCl, SCE or Hg/HgO converted to the RHE scale, with iR correction and overpotential.
- [All 43 lab calculators](https://www.labcanvas.com/tools/lab-calculators)

## Use this calculator from code or an AI agent

This calculator also answers as JSON, computed by the same code as this page: no key, no account, CORS open. Send the parameters as a query string (numbers may carry units; lists comma-separated) or POST them as JSON to https://www.labcanvas.com/api/tools/ph-calculator. An example, with the answer shortened to its first values:

```
GET https://www.labcanvas.com/api/tools/ph-calculator?mode=weak&compound=acetic&concentration=0.1+M
```

```json
{
 "ok": true,
 "tool": "ph-calculator",
 "inputs": {"mode":{"value":"weak"},"concentration":{"value":0.1,"unit":"M"},"compound":{"value":"acetic"}},
 "result": {"ph":{"label":"pH","value":2.882862536},"poh":{"label":"pOH","value":11.11713746}},
 "answer": "pH 2.88 (0.1 M Acetic acid, pKa 4.76, 25 °C): the solution is acidic.",
 "formula": "Exact charge balance h³ + Ka·h² − (Ka·c + Kw)·h − Ka·Kw = 0 (Kb = Kw / Ka for a base), Kw = 1e-14",
 "page": "https://www.labcanvas.com/tools/ph-calculator",
 "citation": "LabCanvas pH calculator, https://www.labcanvas.com/tools/ph-calculator"
}
```

Parameters:

- `mode` (string, default weak: weak | strong | buffer | convert): weak acid/base, strong acid/base, buffer, or convert between pH, pOH, [H+] and [OH-].
- `kind` (string: acid | base): Acid or base (strong and weak modes; default acid, or the kind of the compound preset).
- `concentration` (number, M): Concentration of the acid or base (e.g. "0.1 M", "10 mM").
- `pka` (number): pKa (weak mode: of the acid, or of the conjugate acid BH+ of a base; buffer mode: of the buffer). Or give compound / buffer.
- `compound` (string: acetic | formic | lactic | carbonic | h2po4 | hf | ammonia | tris | pyridine): Weak mode: a preset weak acid or base (sets pKa and kind).
- `ions` (integer, default 1): Strong mode: H+ or OH- released per formula unit (2 for H2SO4 treated as fully dissociated, Ca(OH)2).
- `buffer` (string: citrate1 | acetate | citrate2 | citrate3 | mes | bicarbonate | imidazole | pipes | mops | phosphate | hepes | tris | tricine | bicine | borate | ammonium | ches | glycine | caps): Buffer mode: a preset buffer (sets pKa, 25 °C).
- `base_conc` (number): Buffer mode: concentration of the base form [A-] (any unit, the same as acid_conc).
- `acid_conc` (number): Buffer mode: concentration of the acid form [HA].
- `target_ph` (number): Buffer mode: the pH wanted, to get the [A-]/[HA] ratio instead.
- `from` (string, default ph: ph | poh | h | oh): Convert mode: the quantity given in value.
- `value` (number, M): Convert mode: the pH, the pOH, or [H+] / [OH-] (with a unit, e.g. "40 nM").

All calculators: https://www.labcanvas.com/api/tools · OpenAPI 3.1: https://www.labcanvas.com/api/tools/openapi.json · MCP tool: `calc_ph` (LabCanvas MCP server).

## Questions

### How do you calculate pH from concentration?

For a strong acid, \(\mathrm{pH} = -\log_{10}\) of the acid concentration (times the number of protons released). For a weak acid you also need \(K_\mathrm{a}\): \([\mathrm{H^+}] \approx \sqrt{K_\mathrm{a} \times C}\) when the acid is only slightly ionised, or solve the equilibrium exactly, as this calculator does.

### What is the Henderson–Hasselbalch equation?

\(\mathrm{pH} = \mathrm{p}K_\mathrm{a} + \log_{10}([\mathrm{A^-}]/[\mathrm{HA}])\). It gives the pH of a buffer from the ratio of base to acid forms, and buffers work best within one pH unit of the \(\mathrm{p}K_\mathrm{a}\).

### Why is pH + pOH = 14?

Because water’s ion product \(K_\mathrm{w} = [\mathrm{H^+}][\mathrm{OH^-}] = 1.0\times10^{-14}\) at 25 °C. At other temperatures \(K_\mathrm{w}\) changes, so the sum is not exactly 14.

### Can pH be negative?

Yes, for very concentrated strong acids (above 1 M), although activities then differ from concentrations and measured values deviate from the simple formula.

### Does Tris buffer pH change with temperature?

Yes, strongly: Tris’s \(\mathrm{p}K_\mathrm{a}\) drops by about 0.03 per °C, so set the pH at the temperature you will use it.

### How do I calculate pH from pKa?

For a buffer, \(\mathrm{pH} = \mathrm{p}K_\mathrm{a} + \log_{10}([\mathrm{A^-}]/[\mathrm{HA}])\): equal amounts give pH = pKa. For a weak acid alone, \(\mathrm{pH} \approx \tfrac12(\mathrm{p}K_\mathrm{a} - \log_{10} C)\) when it is only slightly ionised; 0.1 M acetic acid gives \(\tfrac12(4.76 + 1) = 2.88\).

### Which buffer should I use for pH 7.4?

One with a pKa between about 6.4 and 8.4: HEPES (7.56), phosphate (7.20), MOPS (7.18) or PIPES (7.14) at 25 °C. Tris (8.07) works at 7.4 but buffers weakly there and shifts with temperature.

### What is the pH of pure water?

7.00 at 25 °C, where \([\mathrm{H^+}] = [\mathrm{OH^-}] = 10^{-7}\ \mathrm{M}\). Neutral pH falls as temperature rises (about 6.8 at 37 °C) because \(K_\mathrm{w}\) grows; water stays neutral. Water left in air absorbs CO₂ and reads about pH 5.6.
