Butter vs. Margarine: What's Actually Happening in Your DoughMantequilla vs. Margarina: Lo Que Realmente Sucede en tu Masa
I used the same cookie recipe, one with butter and one with a variation of margarine. The margarine cookie spread out flatter and was cakier, while the butter cookie was thicker and chewier with a deep-brown color and a crisp edge. But texture wasn’t the only difference. The biggest difference was in the taste. The butter cookie had a rich, browned flavor, while the margarine cookie was missing the deeper, toasted flavor the butter cookie had. So what's causing these visual and flavor differences? Usé la misma receta de galletas, una con mantequilla y otra con una variación de margarina. La galleta de margarina se extendió más plana y quedó más esponjosa, mientras que la galleta de mantequilla quedó más gruesa y masticable, con un color café oscuro y un borde crujiente. Pero la textura no fue la única diferencia. La mayor diferencia estuvo en el sabor. La galleta de mantequilla tenía un sabor rico y tostado, mientras que a la galleta de margarina le faltaba ese sabor más profundo y tostado que tenía la de mantequilla. Entonces, ¿qué está causando estas diferencias visuales y de sabor?

What's actually different in these two identical-looking ingredients?
Butter is made by churning cream and contains about 80% fat and 16–18% water. Margarine is made from vegetable oils (often blends like soybean, palm, palm kernel, corn, or canola), engineered to match butter's ratio, also about 80% fat, with water making up most of the rest, plus small amounts of emulsifiers and flavoring to mimic butter's taste and texture.
If they're made of almost the same fat-to-water ratio, why do they bake so differently?
Both Butter and margarine are made of fat crystals that trap air differently during creaming, affecting the rise and airiness of a cookie. This depends on the temperature of the butter. Beating room-temperature butter incorporates air to make fluffy baked goods, while beating melted butter can't trap air, resulting in a dense and flat cookie. Margarine's crystal structure, on the other hand, depends on the manufacturer. It's often engineered to trap air more consistently than butter. Temperature still matters for margarine too. Melted margarine won't trap air any better than melted butter, but a well-made margarine tends to hold its crystal structure more consistently across a wider range of handling than butter does.
During baking, that water in butter and margarine turns into steam. In cookies, this adds a small amount of extra lift, but steam's biggest effect shows up in doughs like pie crust. The cold butter is cut into visible chunks. The steam pushes those layers apart, creating a flaky texture. Margarine, especially stick, with a similar fat-to-water ratio can produce a similar effect, but low-fat, high-water spreads don't. They lack the fat structure the steam needs to push against, so they usually turn out soggy or dense instead of flakier.
Butter's melting point is close to our body temperature, so it melts smoothly and evenly the moment it touches your mouth, causing that "rich" taste. Margarine can have a different melting point, so it may not fully melt as quickly, which can feel slightly waxy in comparison.
Which is better?
It depends on what you're trying to accomplish. Butter wins on flavor. When butter browns, the milk solids toast at the bottom of the pan, creating that deep, nutty flavor. Margarine can't brown the same way because it's made from vegetable oil and water. It has no milk solids to toast. When margarine is heated past its melting point, the oil and water separate, and the oil can burn rather than developing that same nutty aroma.
Margarine wins on consistency. Because manufacturers control margarine's crystallization process, they can produce a very uniform product, which matters more in commercial baking, where predictable results are more important than flavor. Butter's structure depends on how it's handled, so if you're not experienced with it, you won’t always get consistent results.