When to use oil instead of butter for cooking
What you cook can determine whether the butter or oil will enhance the flavor. For example, butter can dull strong flavors like chocolate or citrus, so using oil can help preserve the flavor of your baking, says Tessa Arias of Handle the Heat.
In fact, when it comes to chocolate cakes specifically, baker and food blogger Rose Levy Beranbaum suggests that a combination of oil and butter (in a ratio of about 1:5) can give you the flavor you want and a lighter texture, as chocolate cakes are notorious. for quick drying (by Epicurious). That said, Arias did an unofficial side-by-side test of brownies and cupcakes, using butter and oil in two separate bakings for each. She and her tasters agreed that, overall, buttery brownies and cupcakes tasted better.
Shelf life and storage are also considerations. According to JoyofBaking.com, oil-based cakes can be refrigerated and still retain their moist texture. Storing the cake in the refrigerator is often considered a last resort, as the air in the refrigerator is drier than the cake and can dry out the cake quickly, especially low-fat ones. For oil-based cakes, however, this is less of an issue. Note that once refrigerated, butter baked goods require a standing time of about an hour to reach room temperature.
Ultimately, the choice between butter and oil comes down to your desired results. Considering texture, taste, time, and storage will help you make the right (and most delicious) decision.