Calculating the concentrations of acid and base in a buffer