What are acids and bases, and how can we calculate their pH? In this beginner’s guide, we explain why different pH values exist and why they is important. We then introduce equations to calculate the pH of acids and bases, before delving into buffer systems (a mix of both). This foundational guide to acid and base chemistry assumes no prior chemistry knowledge, although it is useful to be familiar with math concepts like arithmetic and logarithms. Finally, a cheat sheet lists relevant equations involving pH and buffer calculations.

Table of Contents

## Water, Water, Everywhere

When we study pH, what weâ€™re really studying is the chemistry of water. Water is a good solvent that can dissolve many substances, and its ability to regulate its ions allows for a wide range of chemical reactions to take place. Thereâ€™s a reason why water makes up 60% of our bodies!

The water molecule (H_{2}O) looks like a simple and boring molecule at first glance, just 2 hydrogens plopped onto an oxygen atom. However, left to its own devices, water can react with itself to split into 2 ions. This is to do with electronegativity.

H_{2}O \rightleftharpoons H^{+} + OH^{-}

The equilibrium arrows mean the backward reaction is also possible. In fact, the backward reaction is heavily favored under normal conditions. At any given time, only about 2 water molecules out of every billion can be found as ions. This tiny imbalance of tranquil waters is important because its ability to dissociate into H^{+} and OH^{} ions drives many chemical reactions!

### Autoionization Constant of Water

We need a value to represent the ionization of water at equilibrium, so letâ€™s give it a value K_{w} (subscript â€˜wâ€™ to represent water). We use [square brackets] to mean the concentration of something, usually in units of moles per liter. Since [H_{2}O] is so large, any change in its concentration during the reaction will be insignificant and will not affect K_{w} value.

K_{w} = {\left[ H^{+} \right]\left[ OH^{-} \right]}

We know that 1 liter of pure H_{2}O under standard conditions will contain 1/10 000 000 moles of H^{+} and 1/10 000 000 moles of OH^{}, hence we can write this as:

K_{w} = {\left[ 10^{-7} \right]\left[ 10^{-7} \right]}\\[0.1in] K_{w} = 10^{-14}

K_{w} is known as the autoionization constant of water. Since 10^{-14} is an obscenely small number, we can use logarithms to convert it into a more presentable form. Logarithms help convert large values into easy-to-handle numbers. We use â€˜pâ€™ to denote taking the negative logarithm base 10 of some number:

pK_{w} = -log\ K_{w}=-log \ 10^{-14}= 14

### Relationship Between H and OH

Now letâ€™s apply â€˜pâ€™ to the values of H and OH as well:

pK_{w} = pH + pOH \\[0.1in] pK_{w} = -log\ 10^{-7}+-log\ 10^{-7} \\[0.1in] pK_{w} = 7 + 7=14

This means that at equilibrium, water has a pH of 7 (and also a pOH of 7) which is what we consider to be neutral pH. Since pK_{w} always equals 14, we know that changing the pH of a solution will always result in an opposite change in pOH. In fact, the ability to change the pH is the basis for all acid and base chemistry, and is the driver for many chemical reactions!

## Acid Chemistry

To upset the balance in pure water, we can cause an increase in H^{+} ions and therefore a decrease in pH. Compounds that do this are known as acids. Youâ€™ll often see acids denoted by HA as it is a proton (H) donor, which will react with water to form hydronium ions (H_{3}O^{+}) and its conjugate base (A^{}).

HA + H_{2}O \rightleftharpoons H_{3}O^{+} + A^{-}

Note that H_{3}O^{+} is equivalent to H^{+} as it contributes a proton to surrounding water molecules. The two-way arrows mean the backward reaction also occurs until equilibrium is reached.

### Acid Dissociation Constant

Just like water, not all HA added to the solution dissociates into H_{3}O^{+} and A^{}, some are perfectly happy to stay as HA. And just like water, every acid has its own equilibrium constant K_{a} (subscript â€˜aâ€™ represents acid), where:

K_{a} = \frac{\left[ H_{3}O^{+} \right]\left[ A^{-} \right]}{\left[ HA \right]\left[ H_{2}O \right]}

Again, we can disregard the concentration of water here as it is the solvent, and is many orders of magnitude larger than the other components and can be treated as constant:

K_{a} = \frac{\left[ H_{3}O^{+} \right]\left[ A^{-} \right]}{\left[ HA \right]}

From this equation, we see that â€˜strongerâ€™ acids will have higher K_{a} values since they will produce more ions. K_{a} measures the extent to which an acid dissociates in water (the higher the K_{a} value, the greater number of H_{3}O^{+} ions generated per mole of acid). Let’s compare 2 similar acids:

- Formic acid (HCOOH) has a K
_{a}of 1.77 x 10^{-4 }(pK_{a}of 3.75) - Acetic acid (CH3COOH) has a K
_{a}of 1.76 x 10^{-5 }(pK_{a}of 4.75)

From their K_{a} values, 1 mole of formic acid dissociates into 10 times more H_{3}O^{+} and can be considered 10 times stronger (a 10-fold decrease in K_{a} is marked by a 1-unit increase in pK_{a}, a â€˜pâ€™ means â€˜-log_{10}â€™). A list of common acids and their respective K_{a} and pK_{a} values can be found here.

K_{a} values are only relevant for acids that do not fully dissociate. â€˜Strongâ€™ acids like hydrochloric acid (HCl) and sulfuric acid (H_{2}SO_{4}) have K_{a} values of 1 or even greater, which means they fully dissociate in water and the backward reaction does not occur.

## Buffer Systems

What happens when we mix acids and bases? Letâ€™s look at the acid dissociation reaction once again.

HA + H_{2}O \rightleftharpoons H_{3}O^{+} + A^{-}

When a weak acid is added to water, a base (A^{}) is also formed; this is known as a conjugate base. Since weak acids (HA) do not fully dissociate, both the acid and the conjugate base are present in the solution at equilibriumâ€”this mixture is known as a buffer system.

A buffer system resists changes in pH whenever H^{+} or OH^{} ions are introduced, hence the solution becomes a pH ‘buffer’. The separate reactions proceed as follows:

H^{+} + A^{-} \to\ HA\\[0.1in] OH^{-} + HA \to\ A^{-} + H_{2}O

Both the conjugate base (A^{}) and weak acid (HA) â€˜trapâ€™ the H^{+} or OH^{} ions in equilibrium, and will continue to do so until all of it has reacted.

Buffer systems play an important role in biological function, such as the carbonic acid-bicarbonate base system that helps to maintain blood pH levels:

H_{2}CO_{3} + H_{2}O â‡Œ H_{3}O^{+} + HCO_{3}^{â€“}

The carbonic acid (H_{2}CO_{3}^{}) reacts with any excess OH^{} ions added, while HCO_{3}^{â€‘} reacts with H^{+ }to drive the backward reaction. This ensures that our blood pH stays between 7.35 and 7.45; anything outside of this tight range leads to serious health effects! This is why drinking alkaline water isn’t such a good idea.

### Calculating pH of a Weak Acid

Often, we need to find the pH of an acid given its pK_{a} value and its concentration. For example, calculate the pH of a 0.1 M solution of acetic acid (pK_{a} = 4.75).

First, we look at the general K_{a} equation:

K_{a} = \frac{\left[ H_{3}O^{+} \right]\left[ A^{-} \right]}{\left[ HA \right]}

We know that Ka = 10^{-4.75} and [HA] = 0.1 M, but weâ€™re left with 2 unknowns, namely the values of [H_{3}O^{+}] and [A^{}]. What do we do now? Recall the acid dissociation reaction:

HA + H_{2}O \rightleftharpoons H_{3}O^{+} + A^{-}

From the equation, we can tell that for every 1 molecule of acid (HA) that dissociates, 1 H_{3}O^{+} ion and 1 A^{} ion is produced. Since we donâ€™t know exactly how much reacts, we can use â€˜xâ€™ to replace this unknown and rewrite the equation.

[HA-x] + [H_{2}O-x] \rightleftharpoons x[H_{3}O^{+}] + x\left[ A^{-} \right]

Again, we can ignore [H_{2}O] as it makes up the bulk of the reaction and any change will be insignificant. What we find is that equal amounts of [H_{3}O^{+}] and [A^{}] are produced each time!

With this important piece of information, we find that our 2 unknowns in the initial K_{a} equation is really just 1 unknown:

K_{a} = \frac{\left[ H_{3}O^{+} \right]\left[ A^{-} \right]}{\left[ HA \right]}\\[0.1in] K_{a} = \frac{x^{2}}{\left[ HA \right]-x}

Since we have both x^{2} and x in the equation, we can expand it to the form of a quadratic:

K_{a} = \frac{x^{2}}{\left[ HA \right]-x}\\[0.1in] K_{a}\left( \left[ HA \right]-x \right)=x^{2}\\[0.1in] K_{a}\left[ HA \right]-K_{a}x=x^{2}\\[0.1in] x^{2}+K_{a}x-K_{a}\left[ HA \right]=0

### Worked Example

Remember our initial problem? To calculate the pH of a 0.1 M solution of acetic acid (pK_{a} = 4.75). Substituting these values and solving the quadratic:

x^{2}+K_{a}x-K_{a}\left[ HA \right]=0\\[0.1in] x^{2}+10^{-4.75}x-10^{-4.75}\left[ 0.1 \right]=0\\[0.1in] x^{2}+10^{-4.75}x-10^{-5.75}=0\\[0.1in] x_{1}=0.00132,\ x_{2}=-0.00134

Of course, the concentration of anything must be a positive value, hence we take x = 0.00132. But weâ€™re not done yet! Remember that x was a substitute for [H_{3}O^{+}] (and [A^{â€‘}]), hence we need to take the â€˜pâ€™ of x:

[H_{3}O^{+}]=0.00132\\[0.1in] pH=-log_{10}[H_{3}O^{+}]=2.879

### Henderson-Hasselbalch Equation

The general expression for K_{a} can be rewritten in the form of pH for easy visualization:

K_{a} = \frac{\left[ H_{3}O^{+} \right]\left[ A^{-} \right]}{\left[ HA \right]}\\[0.1in] pK_{a}= -log_{10}\frac{\left[ H_{3}O^{+} \right]\left[ A^{-} \right]}{\left[ HA \right]}\\[0.1in] pK_{a}=-log_{10}\left[ H_{3}O^{+} \right]-log_{10}\left( \frac{\left[ A^{-} \right]}{\left[ HA \right]} \right)\\[0.1in] pK_{a}=pH-log_{10}\left( \frac{\left[ A^{-} \right]}{\left[ HA \right]} \right)\\[0.1in] pH = pK_{a}+ log_{10}\left( \frac{\left[ A^{-} \right]}{\left[ HA \right]} \right)

This is known as the Henderson-Hasselbalch equation, and is useful for solving for pH when the values of K_{a}, [A^{}], and [HA] are known.

## Base Chemistry

So far, weâ€™ve only looked at the behavior of acids and their conjugate bases. But what about bases and their conjugate acids? The general chemical formula for the dissociation of a base is:

B^{-}+ H_{2}O\rightleftharpoons BH+OH^{-}

Where the base (B^{}) reacts with water to form the conjugate acid (BH) and hydroxide ions (OH^{}). The concentration of [OH^{}] is a measure of the solutionâ€™s â€˜basicityâ€™ and is always in equilibrium with [H^{+}]; as one goes up, the other must come down to maintain K_{w}:

K_{w} = {\left[ H^{+} \right]\left[ OH^{-} \right]} = 10^{-14} \\[0.1in] pK_{w} = pH + pOH = 14

The base dissociation constant K_{b}, is:

K_{b}=\frac{\left[ BH \right]\left[ OH^{-} \right]}{\left[ B^{-} \right]}

### Calculating pH of a Weak Base

From the K_{b} expression, youâ€™ll realize that [H^{+}] doesnâ€™t feature, but there is a term for [OH^{}]. With one, we can find the other using the K_{w} relationship!

Like calculating the pH of a weak acid, we can let â€˜xâ€™ be the amount of base (B^{}) reacted at equilibrium to form the quadratic expression. Remember that x = [OH^{}] = [BH] as equal amounts of hydroxide ions and conjugate acid is formed:

K_{b}=\frac{\left[ BH \right]\left[ OH^{-} \right]}{\left[ B^{-} \right]}\\[0.1in] K_{b}=\frac{x^{2}}{\left[ B^{-} \right]-x}\\[0.1in] x^{2}+K_{b}x-K_{b}\left[ B^{-} \right]=0

We can now solve for pH using the pKw relationship:

x=[OH^{-}]\\[0.1in] pOH=-log_{10}\left[ OH^{-} \right]\\[0.1in] pKw =pH+pOH=14\\[0.1in] pH=14-pOH

## Acids and Bases Cheat Sheet

Water autoionization constant (K_{w}):

H_{2}O \rightleftharpoons H^{+} + OH^{-}\\[0.1in] K_{w} = {\left[ H^{+} \right]\left[ OH^{-} \right]} =10^{-14}\\[0.1in] pK_{w} = pH + pOH =14

Acid (K_{a}) and Base (K_{b}) dissociation constants:

K_{a} = \frac{\left[ H_{3}O^{+} \right]\left[ A^{-} \right]}{\left[ HA \right]}\\[0.1in] K_{b}=\frac{\left[ BH \right]\left[ OH^{-} \right]}{\left[ B^{-} \right]}

Relationship between K_{w}, K_{a} and K_{b}:

HA + H_{2}O \rightleftharpoons H_{3}O^{+} + A^{-}\\[0.1in] K_{a}K_{b}= \frac{\left[ H_{3}O^{+} \right]\left[ A^{-} \right]}{\left[ HA \right]} \frac{\left[ HA \right]\left[ OH^{-} \right]}{\left[ A^{-} \right]}\\[0.1in] K_{a}K_{b}=\left[ H_{3}O^{+} \right]\left[ OH^{-} \right]=K_{w}\\[0.1in] pK_{a}+pK_{b}=pH+pOH=pK_{w}

General quadratic to solve for pH of weak acid: (x = [H_{3}O^{+}] = [A^{}])

x^{2}+K_{a}x-K_{a}\left[ HA \right]=0

General quadratic to solve for pH of weak base: (x = [OH^{}] = [BH])

x^{2}+K_{b}x-K_{b}\left[ B^{-} \right]=0

Henderson-Hasselbalch equation to solve for pH of weak acid given K_{a}, [A^{}], and [HA]:

pH = pK_{a}+ log_{10}\left( \frac{\left[ A^{-} \right]}{\left[ HA \right]} \right)

Henderson-Hasselbalch equation to solve for pH of weak base given K_{b}, [BH], and [B^{}]:

pH = pK_{b}+ log_{10}\left( \frac{\left[ BH \right]}{\left[ B^{-} \right]} \right)

#### About the Author

Sean is a consultant for clients in the pharmaceutical industry and is an associate lecturer at La Trobe University, where unfortunate undergrads are subject to his ramblings on chemistry and pharmacology.