One of the more commonly used buffer systems is that of Acetic acid and sodium acetate. Acetic acid is a two-carbon carboxylic acid also known as Ethanoic acid. With a pKa of 4.75, this acid has an effective buffering pH range of between 3.75 and 5.75 as buffers are generally most effective +/- 1 pH unit from their pKa. To be able to create a usable acetic acid buffer, you must understand how to calculate the appropriate acid and conjugate base concentrations needed to achieve the pH you want.
In order to calculate the amount of each of these two components needed you will need three pieces of information:
The desired concentration of the overall Buffer solution.
The desired pH of the overall Buffer solution.
The pKa of the Buffer system being used.
With these three values the concentrations are calculated by the following equations:

From this point on, the best way to explain the calculation is by example. So suppose you need a buffer with a pH of 3.6. For this example, we will use the simplest carboxylic acid, Formic acid (CHOOH). Formic acid has a pKa value of 3.75. The experiment calls for 1L of a 0.25M Buffer. Using formic acid (CHOOH) and its conjugate salt sodium formate (CHOONa) you set up the following equations:

At this point you note that while you have two unknown values you also have two equations with these values. This means if you can solve one equation for one of the values you can substitute it into the other and solve for one of the unknown values:

If we substitute this into the buffer concentration equation:

Then knowing one concentration allows for the calculation of the other concentration:

Once both concentrations are known, the amounts of dry chemicals can be calculated simply by using their molecular weights. The chemicals are then made into solution using a 1L volumetric flask.
Buffer Capacity
The capacity of a buffer depends on both the ratio of the acid to its conjugate base and also the concentration of both species in the Buffer. The buffering process is depicted below:
For each addition of acid or base a new concentration of buffer components must be made.
Weak Base + Strong Acid ↔ Weak Acid
The strong acid combines with the base to form more weak acid. This is calculated as an addition to the weak acid and a subtraction from the weak base. So for example if we added 2.0mL of 0.50M HCl to 50.0 mL of the formate buffer prepared above:

The new molar amounts can then be placed into the Henderson-Hasselbalch equation and the new pH calculated:

Once both concentrations are known, the amounts of dry chemicals can be calculated simply by using their molecular weights. The chemicals are then made into solution using a 1L volumetric flask.