# A JavaScript that calculates the amount of acetic acid and sodium acetate necessary to achieve a buffer at a given pH and buffer strength <!-- function Calculate(pH, buf, citrictext, sodcittext) { with (Math) { var pK1 = 4.75 var K1 = exp(-pK1*2.3025851) var H = exp(-pH*2.3025851) var r01 = H/K1 var cit0 = 1.0 var cit1 = cit0/r01 var sum = cit0+cit1 cit0 = cit0/sum cit1 = cit1/sum var citric = cit0 var sodcit = cit1 citric = citric*buf/1000*60.05/10 sodcit = sodcit*buf/1000*136.08/10 citric = round(citric*10000)/10000 sodcit = round(sodcit*10000)/10000 } citrictext.value = citric.toString() sodcittext.value = sodcit.toString() } // --> pH Buffer Strength mM Acetic Acid, Glacial %w/v Sodium Acetate, Trihydrate %w/v

How to use
Type the desired pH into the first cell, and type the intended buffer strength (in millimoles per liter) in the second cell. Press the calculate button, and the approximate percentages of glacial acetic acid and sodium acetate trihydrate will be displayed in %weight/volume. For example, a pH of about 4.75 with a buffer strength of 100 mM is obtained using 0.30% glacial acetic acid and 0.68% sodium acetate trihydrate. The buffer may be made by adding 0.30 g glacial acetic acid and 0.68 g sodium acetate trihydrate to 100 ml water.

How the calculation works
Using a pKa of 4.75 for acetic acid and the pH, the ratio of acid to acetate is calculated. The ionization is given by:

HAc --> H+ + Ac-

Ka = [H+][Ac-] / [HAc], or

[Ac-] / [HA] = Ka / [H+]

Normalizing the amount of each of the two moieties, their relative amounts are calculated. Using the molecular weights for glacial acetic acid and sodium acetate trihydrate (the typical lab forms) together with the buffer strength, the actual percentages are calculated.

The pKa used for acetic acid is 4.75. It's best to buffer at a pH close to one of the pK's, so use acetate buffers only in the pH range 3.5-6.

What buffer strength to use? Too low will give a weak, drifting buffer, while too much may negatively affect other desired properties, such as taste. A 10 mM buffer is in general a good starting point.

Debut: December 1, 2009. Revision 2. May 7, 2017.December 1, 2009.  Visitors:

Index of other pages by the author. Please send comments to Jeffrey Clymer