Baking soda and baking powder are leaveners: when activated, they will release a tremendous amount of gas that will give lift to bread dough. Unlike yeast, which is a biological reaction (yeast eats sugar and excretes alcohol and carbon dioxide), baking soda and baking powder are chemical reactions. (yes, I am fully aware that biological reactions are fundamentally chemical reactions too; the point is that baking soda and baking powder don’t require any living creature).
Many recipes use either baking powder or baking soda; a few use both. Almost none bother to explain why they use one or the other, let alone how much they use. But it’s useful for us to know the difference if we want to be able to substitute ingredients in recipes without messing something up.
Back when you were in middle school, you or one of your friends may have made a volcano for science fair. If so, then you’re familiar with a basic chemical reaction: combine vinegar and and baking soda together, and the result will generate an enormous amount of gas in the form of bubbles. Baking soda is a base (high pH); vinegar is an acid (low pH). When bases and acids meet and combine, they counteract each other to create a neutral-pH substance and in the process release a bunch of gas as a by-product.
We use baking soda in a recipe where there are other ingredients that tend toward the acidic side, especially when we want the final product to be more neutral. Citrus, especially lemon juice, is a good example of an acidic ingredient that can interact with baking soda.
Baking powder, on the other hand, is a mix of two dry ingredients: a base (baking soda) and an acid (usually cream of tartar). While they remain dry, they are inactive. But mix them in water and they become active and start combining to generate gas.
Proportions are important with base+acid leaveners. If there is more of one than the other, then after they run their course there may still be some of one of them left over. Baking powder is manufactured such that the base and acid are in the right proportion to fully use each other up. So when adding baking powder to a recipe, the amount used is solely decided by how much gas is needed for the appropriate amount of rise, and it won’t change the pH of the final product. But when adding baking soda, you are dependent upon how much acid there is in the other ingredients. You can match it up evenly and end up with a pH-neutral concoction; or you can add too much baking soda, use up all of the free acid, and end up with something that has a higher pH; or you can add too little and end up with something that is too acidic. People who write recipes that use baking soda as a leavener need to carefully measure the amount of baking soda to achieve the right balance.
It’s also possible that the other ingredients in the recipe are a little acidic, but not enough to fully activate the amount of baking soda that would be required to generate the amount of gas needed to rise the dough. And that’s when you will see both baking soda and baking powder used in the same recipe: some baking soda to use up whatever acidity is in the rest of the ingredients, and then some extra baking powder to add some more gas.
Why do we need to know this? Because maintaining the balance of acids and bases in a baking recipe is important. If you’re making a recipe that calls for lemon juice and baking soda, but you’re out of lemon juice, then you need to substitute something else for it that’s also acidic, or the baking soda won’t activate and your dough won’t rise. Or if you think the recipe is too lemony and you want to reduce the amount of lemon juice, then you might need to reduce the baking soda as well and add some baking powder instead to maintain the right amount of rise.
Generally speaking, in an otherwise pH-neutral recipe, we would use about one teaspoon of baking powder for each cup of all-purpose flour. Or assuming that there is other acid present, we would use 1/4 teaspoon of baking soda per cup of flour. But these are not hard-and-fast rules, because the other ingredients in a recipe will have an effect on the overall weight and density of the dough — and thus how much gas needs to be generated to cause the dough to rise.