Baking soda and baking powder are both leavening agents for baked goods. They make dough rise, which is important for cakes, muffins, etc. There are lots of ways to leaven baked goods, by the way, including mechanical (creaming) and biological (yeast), which I’ll maybe write about some day in the future.

Essentially, leavening agents make dough rise by introducing carbon dioxide into it. Yeast produces carbon dioxide as a byproduct of digesting sugar, if I remember correctly. Creaming causes sugar crystals to punch tiny air-filled holes in the butter, which is then used in the batter. Baking soda produces carbon dioxide as it breaks down. One way this can happen is according to the following reaction (thanks, Wikipedia!).

2NaHCO3 → CO2 + H2O + Na2CO3

This means that 2 molecules of baking soda (NaHCO3) will break down into one molecule of one molecule of carbon dioxide, one molecule of water, and one molecule of sodium carbonate. Relatively simple, right? Baking soda is simply a homogenous chemical that, when heated, releases bubbles of carbon dioxide, which creates an airy texture in the completed dish. I should note that sodium carbonate has a slightly alkaline (i.e. basic) taste.

Baking powder, on the other hand, is somewhat more complex. It includes baking soda, together with what’s known as an “acid salt”, such as cream of tartar. It also includes a starch, such as cornstarch, which has a number of helpful effects. (None of these have to do with leavening, so I refer you to the Wikipedia baking powder article for more information).

Since baking powder includes baking soda, I would think that the leavening reaction is basically the same as above - the baking soda in the baking powder will break down at a high temperature, creating carbon dioxide, etc. This is probably true. But in the presence of an acid salt baking soda seems to “prefer” to produce carbon dioxide according to the following reaction:

NaHCO3 + H+ → CO2 + H2O + Na+

This means that 1 molecule of baking soda (NaHCO3), when combined with a free proton (coming from an acid such as the cream of tartar that is also part of baking powder), will break down into one molecule of carbon dioxide, one molecule of water, and one sodium ion. In recipes that use baking soda alone, without cream of tartar, this reaction will take place if there is an acid somewhere else in the recipe, such as vinegar or buttermilk.

So the next question is, why do some recipes call for baking powder and some for baking soda, and can you ever substitute one for the other? Not everyone seems to have a clear idea. At http://chemistry.about.com/cs/foodchemistry/f/blbaking.htm, they say that “you can substitute baking powder in place of baking soda”. But at http://kitchensavvy.typepad.com/journal/2005/01/baking_sodavs.html, they say that “baking powder cannot… be used to replace baking soda.” Which is it?

It seems to me from the above that you can use baking powder in place of baking soda, but some acid will be left over since baking powder comes with its own acid, _and _no sodium carbonate is generated. Also, you’ll need to use more baking powder than you would use baking soda, since baking soda is only a component of baking powder.

So: to substitute baking powder in place of baking soda, use more baking powder, and reduce the acid somewhere else in the recipe. (After writing this, I wondered, “what if there is no acid in the recipe?” If there’s no acid in the recipe that you can reduce, you have to add an anti-acid, i.e. a  base).

If you use baking soda in place of baking powder, you will have extra basicness in the dish, since the baking soda doesn’t come with acid and therefore it will not be neutralized.

So: to substitute baking soda in place of baking powder, use less baking soda, and add acid to the recipe (for example, use buttermilk instead of water).

This page seems to confirm what I’m saying, but obviously that doesn’t mean I’m right: http://www.joyofbaking.com/IngredientSubstitution.html. You can also read more at http://kitchensavvy.typepad.com/journal/2005/01/baking_sodavs.html, and I’m going to link to http://users.rcn.com/sue.interport/food/bakgsoda.html, which largely recapitulates what I’ve written here.

_Update 8/15/10 - _I’m not sure the substitution formula I worked out above makes sense. It implies that the two differing reaction paths (1) and (2) will generate similar amounts of carbon dioxide. But, for example, reaction (2) only uses 1 molecule of NaHCO3 to produce one molecule of CO2. I’m not sure what to make of this, other than to give up and advise never substituting one for the other.

I am writing this note in response to a failed banana bread recipe, so it’s also possible that something else caused the bread not to rise other than making the baking powder for baking soda substitution described here.