Baking power and baking soda are both chemical leaveners that are commonly used in baked goods, from quick breads to cakes, to help the products rise and lighten their texture. Both chemical leaveners do this by releasing carbon dioxide into the baking process. Although they both can achieve the same end result, the two leaveners are not the same and they can produce slightly different results in recipes.
Baking soda, or sodium bicarbonate, produces carbon dioxide when mixed with an acidic ingredient and a liquid, or with a wet acidic ingredient. This includes things such as molasses, yogurt and buttermilk, but also includes cocoa powder (which would require another liquid to be added to combine the two ingredients), chocolate and many other common ingredients. It does not require a large amount of “acid” to work with the baking soda, so even a very small amount in a recipe can be enough to get a good reaction. Baking soda begins to react immediately when moistened, so batters and doughs made with baking soda tend to get the best results when they are placed in the oven shortly after mixing.
Baking powder is a combination of baking soda, an acidic ingredient (such as cream of tartar) and a moisture-absorbing ingredient (such as cornstarch). It also produces carbon dioxide when moistened, but does not require the addition of an acidic ingredient to function because it already contains an acid. Moisture absorbing cornstarch, which is only present in a very tiny amount, simply helps to prevent the baking soda and cream of tartar (or other acid) from reacting accidentally. The most common type of baking powder in the US is double acting baking powder, which releases some gas when a liquid is added and releases more gas when heat is added, after the baked product has been placed in the oven.