They are not interchangeable. Here is what each one does, and how to know which your recipe needs.
Baking powder and baking soda create lift in different ways. Understanding the difference makes recipes easier to troubleshoot.
Use the ingredient listed in the recipe; substitutions change the balance of acid and leavening.
