How to calculate pH
Anything that dissolves in water and releases hydrogen ions has a pH, and working it out takes one number and one formula. The number is the hydrogen ion concentration, written [H⁺] and measured in moles per litre. The formula turns that concentration into a short number between 0 and 14. The pH Calculator does the same sum for you, but the steps below let you check its answer and work one out on paper.
The formula
The formula is pH = −log₁₀[H⁺]. The log part is a base-10 logarithm: it asks “10 to what power gives this number?” For a concentration of 0.01 mol/L, the answer is −2, because 10⁻² = 0.01. The minus sign in front flips it to +2, so the pH is 2. The log squeezes a huge range of concentrations onto a short scale: 0.1 mol/L gives pH 1, 0.01 gives pH 2, 0.001 gives pH 3 and 0.0000001 gives pH 7. Each step of 1 on the pH scale is a tenfold change in concentration.
pH = −log₁₀[H⁺]
Step 1: write down the concentration
Start with [H⁺] in moles per litre. A school lab might hand you 0.01 mol/L hydrochloric acid, or 0.001 mol/L. If the concentration is given in another unit, convert it first: 10 millimoles per litre is 0.01 mol/L, because 1,000 millimoles make a mole. A pH of 7 needs a concentration of 0.0000001 mol/L, which is 1 × 10⁻⁷ mol/L. The tiny number is the reason the log scale exists at all.
Step 2: take the log and flip the sign
Take the base-10 log of the concentration, then change its sign. For 0.001 mol/L, log₁₀(0.001) = −3, and flipping the sign gives pH 3. For 0.05 mol/L, log₁₀(0.05) = −1.30, so the pH is 1.30. For 0.0000001 mol/L, log₁₀(1 × 10⁻⁷) = −7, so the pH is 7. If you are working backwards, from a pH to a concentration, use [H⁺] = 10^(−pH): a pH of 4.5 means [H⁺] = 10^(−4.5) = 3.16 × 10⁻⁵ mol/L.
Worked example
A solution has [H⁺] = 0.0001 mol/L. First, write the concentration as a power of 10: 0.0001 = 10⁻⁴. The log of 10⁻⁴ is −4. Flip the sign, and the pH is 4. The solution is acidic, because 4 is below 7. Check it against the scale: a pH of 4 sits between vinegar at about 2.5 and black coffee at about 5, which is where a weak acid belongs. A second check: [H⁺] = 0.01 mol/L gives pH 2, and 0.01 is a hundred times stronger than 0.0001, so pH 2 is two whole steps below pH 4, exactly what the tenfold rule predicts.
What the answer means
A pH below 7 is acidic, 7 is neutral and above 7 is alkaline. The number also tells you strength: pH 3 is ten times as acidic as pH 4, and a hundred times as acidic as pH 5. That is why two solutions that look only a little apart on the scale can behave very differently. Lemon juice at pH 2 has a hundred times the hydrogen ion concentration of black coffee at pH 5. If your answer comes out above 14 or below 0, check the concentration: only very strong solutions fall outside the 0 to 14 scale, and most classroom and household answers land between 1 and 13.
The common mistake
The most common mistake is reading the scale as if it were linear, treating pH 4 as twice as acidic as pH 8, or pH 6 as one more than pH 5. Each step is a factor of 10, so pH 4 is ten thousand times as acidic as pH 8. The second mistake is forgetting the minus sign: log₁₀(0.001) is −3, and the pH is +3, not −3. If your answer comes out negative, the sign is the first thing to check.
Frequently asked questions
What number do I need to calculate pH?
The hydrogen ion concentration, [H⁺], in moles per litre. With that number, pH = −log₁₀[H⁺].
What is the pH of pure water?
7, because pure water has [H⁺] = 1 × 10⁻⁷ mol/L, and −log₁₀(1 × 10⁻⁷) = 7.
How do I go from pH back to concentration?
Use [H⁺] = 10^(−pH). A pH of 4.5 gives [H⁺] = 3.16 × 10⁻⁵ mol/L.
Can pH be below 0 or above 14?
Yes, for very concentrated strong acids or alkalis, but most everyday solutions sit between 1 and 13.
More guides on the pH Calculator
Try the pH Calculator — free, in your browser.