What’s the Difference Between Baking Soda and Baking Powder?
Both baking soda and baking powder contain sodium bicarbonate. Baking soda is pure sodium bicarbonate, and baking powder is not. This means baking powder actually has some baking soda in it already. In addition to the baking soda, baking powder has cream of tartar, which is an acidifying agent.
When sodium bicarbonate is combined with an acidifying agent, it causes a (slow) chemical reaction: the release of carbon dioxide (CO2). This is what causes the bubbles in the dough and leavens it.
Baking soda reacts with acidifying agents like milk, sugar, and/or shortening (for example). Baking powder already has an acidifying agent in it (the cream of tartar), and that acts as a second leavening agent in the dough and also slightly changes the taste of what you’re baking.
That’s the scientific answer, but what you probably want to know is how this applies to baking in more practical terms. Because baking soda is pure (sodium bicarbonate), it tends to become unstable at higher temperatures.
This works fine for things that you’re baking quickly, like chocolate chip cookies, but when baking at higher temperatures for longer times you’ll generally find baking soda because the cream of tartar (the second leavening agent) helps sustain the reaction longer. Baking soda, in these cases, would be rendered inactive too early.
In some circumstances you have both. This is particularly common in vegan cakes and brownies because they can become too dense due to the lack of eggs. Some recipes contain some sort of acid (yogurt, brown sugar, etc), however the carbon dioxide created from the acid and baking soda is not enough to leavening the volume of batter in the recipe. That’s why baking powder is used as well– to add necessary lift.
Basically, the reason for both is because sometimes you need more leavening than you have acid available in the recipe. It’s all about balance. Another reason to use both baking powder and baking soda is because they affect both browning and flavor.