Note that the sample species HA and A- in the above Expression are generalized to the terms acid and base, respectively. To use the equation, place the concentration of the acidic buffer species where the equation says "acid" and place the concentration of the basic buffer species where the equation calls for "base". It is essential that you use the pKa of the acidic species and not the pKb of the basic species when working with basic buffers--many students forget this point when doing buffer problems.
A buffer problem can be fairly simple to solve, provided you don't get confused by all the other chemistry you know. For example, let's calculate the pH of a solution that is 0.5 M acetic acid and 0.5 sodium acetate both before and after enough SO3 gas is dissolved to make the solution 0.1 M in sulfuric acid. Before the acid is added, we can use the Henderson-Hasselbalch equation to calculate the pH.
This part of the problem does not require us to do the sort of equilibrium calculations that we must use for Non-Buffered Solutions, but many students still try to do it the hard way. The hard way is a correct way of doing the problem, but it may cost you valuable time on a test.
To calculate the pH after the acid is added, we assume that the acid reacts with the base in solution and that the reaction has a 100% yield. Therefore, we say that 0.1 moles per liter of acetate ion reacts with 0.1 moles per liter of sulfuric acid to give 0.1 moles per liter of acetic acid and hydrogen sulfate. Here, we ignore the second dissociation of sulfuric acid because it is minor in comparison to the first. So the final concentration of acetic acid is 0.6 M and acetate is 0.4M. Plugging those values into the Henderson-Hasselbalch equation gives a pH of 4.57. Note that a 0.1 M solution of strong acid would give to a pH of 1 but the buffer gives a pH of 4.57 instead.
To probe the useful range of the buffer, let's calculate the pH of the solution resulting from the same situation above but with different concentrations of the buffer. If the buffer is 1.0 M in both acetate and acetic acid, then the pH of the resulting solution after the introduction of acid is 4.66. However, if we make the solution only 0.11 M in acetic acid and acetate, then we calculate a pH of 3.45! Therefore, if you want a more effective buffer, make sure that the concentration of the buffering agents is large in comparison to the added acid or base.