Can you substitute butter for margarine in a cookie recipe?

In this article, we will answer the question “Can you substitute butter for margarine in a cookie recipe?”, and what are the best substitutes for butter?

Can you substitute butter for margarine in a cookie recipe?

Yes, you can substitute butter for margarine. Estimate a 1:1 ratio for substitution. Butter tends to impart an ooey-gooey texture to the cookies due to its high-fat percentage. 

Cookies made with butter spread more, losing their round shape in the process. Margarine makes the cookies hold their shape during baking. More on this in the article below.

Trans fats are found in foods originating from ruminant animals, such as cows and sheep, and are found in foods containing. Animal trans fat levels can comprise up to 6% of a product’s fat content in ruminant foods, and industrial trans fat levels can comprise up to 60% of a product’s fat content in foods containing partially hydrogenated vegetable oils (1).

What does margarine do to cookies?

The fat type and the level of fat added to the dough have a strong effect on the final quality of biscuits. A study investigated the effect of fat type and level of fat on biscuit dough and quality of biscuits. It was found that the thickness of biscuits was significantly higher when hydrogenated fat or oil was used, while biscuit produced with bakery shortening had better surface characteristics and higher crispness. Normally, bakery fats (margarine and butter) contain about 80% fat whereas shortening contains 100 % fat (2).

Butter is what makes the cookies gooey and fudgy while margarine tends to make them brittle like a biscuit. If you are a fan of the chewy goodness of the cookies, you can add more chocolate chips to compensate for the higher moisture content of the margarine.

Fats perform a shortening function in dough. The term shortening refers to the ability of fats to lubricate, weaken, or shorten the structure of food components to provide a food product with desirable textural properties. Fats act as a lubricant during mixing; they also prevent the formation of a gluten network in dough. The water or sugar solution, in the absence of shortening, would interact with the flour protein to create cohesive and extensible gluten, but when shortening is present, the fats surround the proteins and the starch granules, isolating them from the water, thereby breaking the continuity of protein and starch structure (2)

Substitutes of butter in baking 

Peanut butter

This is a great substitute for butter when making cookies unless you have a peanut butter allergy. You can substitute the peanut butter for butter in a 1:1 ratio. The end product has a mild peanut flavor and a dense crumb texture. 

Peanut butter is a good source of protein and fiber, and low in fat. It is continually applied for the preparation of low calorie improved food products. Studies showed that peanut butter incorporation in biscuits increased moisture content, crude fiber and crude protein content. Sensory studies showed that biscuits prepared with peanut butter had relatively harder texture and darker color than control. However, peanut butter gave a palatable flavor and taste to biscuits (6). 

Olive oil

Estimate a 3:4 ratio when substituting olive oil for butter. This substitute does not work very well in sweet baked goods because olive oil has a distinct flavor. If you must, use the light olive oil version for baking sweet goods. 

Olive oil works great in savory bread or cakes. Cookies baked with olive oil are not chewy. To compensate, you can add more chocolate chips to the cookie dough.

In a study, olive oil was used to replace margarine in cake baking. The results showed that the use of extra virgin olive oil increased batter density and cake volume while decreased the weight loss (%) during baking. Texture profile analysis also showed that the replacement of margarine by extra virgin olive oil significantly affected the hardness and cohesiveness of the cakes (5).

Mashed avocados

Mashed avocado is a super healthy substitute for butter in baking. Replace every tablespoon of butter with 1 tablespoon of the mashed avocado. Cookies baked with mashed avocado do not have a good spread since the fats in the avocado do not melt. 

Unless you like round cookies, you can flatten and shape the cookie dough before you put it in the oven for baking. 

Studies show that the use of avocado puree as a fat replacer in cake and biscuits was successful at 50% fat replacement, as it did not impact consumer acceptance. However, at 75–100% fat replacement, acceptance of the low-fat cake decreased compared to the control cake containing shortening (4).

Coconut oil

Coconut oil is another great substitute for butter in baking. Estimate a 1:1 ratio when using coconut oil instead of butter in baking. 

A study showed that coconut oil in moderate proportions, namely 10%, has a positive influence on the rheological properties of bread dough. Gluten was formed properly,  and  the activity of yeast was not braked. Thus, we can say that 10% coconut oil constitutes the optimal quantity to obtain a dough with good features. In the case of the finished product, bread containing 10% coconut oil presents the best porosity and elasticity of the core (7).

Coconut oil yields slightly crunchy cookies with a tropical coconut flavor. If you do not want too much coconut flavor in your end product, opt for refined coconut oil.

Pumpkin puree

The amount of butter called for in the recipe, multiplied by the factor ¾, is the amount of pumpkin puree you need to use as a replacement for butter.

Pumpkin puree will yield slightly denser baked goods with an orange tinge to them. So, if you are okay with that, feel free to bake cakes, muffins, quick bread, bars, cupcakes, and cookies using pumpkin puree.

Legumes can be used as fat replacers due to its high fiber and starch contents. Complex carbohydrate fat replacers range from digestible starches to non-digestible plant fibers. The replacement of dietary fat with complex carbohydrates reduced the energy density of all the food products (4).


Applesauce yields chewy and soft cookies. It also works great in quick beard and the other baked goods as a butter substitute. Estimate a ½:1 ratio when substituting applesauce for butter in a recipe.

Always opt for unsweetened applesauce so that you can control the amount of sugar in your recipe. Applesauce is a healthy substitute for butter especially for individuals who are looking out for weight gain.

In a study, applesauce was used as a fat replacer to produce cookies. The results  showed that applesauce can be a successful substitute of fat in chocolate chip cookies. Replacing butter with applesauce improves the nutritional value of chocolate chip cookies. Maintaining a proper balance between applesauce and fat is important for an acceptable cookie texture, because cookies tend to become softer in texture with an increase in applesauce (5).

Greek yogurt

Greek yogurt yields chewy, soft, and sweet cookies but with less fat. Greek yogurt contains more than twice the amount of protein than non-Greek yogurt (3). It is a great catch for people trying to lose weight while treating themselves with healthy sweets. However, greek yogurt may impart a slightly tangy flavor to the end product.


Bananas are a very handy substitute for butter. Replace one mashed banana with one stick of butter. Bananas yield a slightly denser product with a distinct banana flavor. Due to its high starch content, banana can be successfully used as a fat replacer in baked goods. Whole foods may be most suitable candidates for fat replacers in baked foods as they appeared to have the least impact on physical and sensory properties (4).

How to use margarine in cookies?


  • 1 cup of high-fat margarine
  • 1 cup of muscovado sugar
  • ½ cup of white sugar
  • ½ teaspoon of salt
  • ½ teaspoon of baking soda
  • 1 teaspoon of vanilla extract
  • 2 ½ cups of all-purpose flour
  • 2 large eggs
  • 1 cup of cocoa powder


  1. Preheat your oven to 375℉.
  1. In a small mixing bowl, whisk the margarine until fluffy. This should take about a minute.
  2. Stir in the muscovado sugar, white sugar, salt, and baking soda, and beat until well-combined. Whisk in the eggs and vanilla extract.
  3. Then whisk in the flour. Start by adding only a half, followed by the rest of the flour. Mix in the cocoa powder.
  4. Scoop out the cookie dough into a baking tray, lightly-greased or lined with parchment paper.
  5. Bake the cookies in the preheated oven for about 10 minutes.
  6. Serve and enjoy.

Other FAQs about Butter that you may be interested in.

Can I substitute butter for vegetable oil in the cake mix?

Can I use butter instead of vegetable oil in the cake?

How long does cannabutter last in the fridge?


In this article, we answered the question “Can you substitute butter for margarine in a cookie recipe?”, and what are the best substitutes for butter?


  1. Wanders, Anne J., Peter L. Zock, and Ingeborg A. Brouwer. Trans Fat Intake and Its Dietary Sources in General Populations Worldwide: A Systematic Review. Nutrients, 2017, 9, 8.
  2. Mamat, Hasmadi, and Sandra E. Hill. Effect of fat types on the structural and textural properties of dough and semi-sweet biscuit. J food sci technol, 2014, 51, 1998-2005.
  3. Nachay, Karen. Expanding Opportunities for Yogurt. Food Technol, 2014, 68, 46.
  4. Colla, Kathryn, Andrew Costanzo, and Shirani Gamlath. Fat Replacers in Baked Food Products. Foods, 2018, 7,12.
  5. Matsakidou, Anthia, Georgios Blekas, and Adamantini Paraskevopoulou. Aroma and physical characteristics of cakes prepared by replacing margarine with extra virgin olive oil. LWT-Food Sci Technol, 2010, 43, 949-957.
  6. Sadaf, J., et al. Peanut butter incorporation as substitute for shortening in biscuits: composition and acceptability studies. Int Food Res J, 2013, 20, 3243.
  7. Canja, Cristina, et al. A Study on the advisability of the use of coconut oil in bakery products. Forest Wood Ind Agri Food Eng, 2015, 83.