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?

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.

What does margarine do to cookies?

Margarine has lower fat content than butter. Butter melted slowly, imparting a rich texture and flavor to the cookies. While margarine melts fats than butter and, due to a higher water content as compared to butter, yields crispy cookies. 

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.

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. 

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.

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. 

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. 

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.


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.

Greek yogurt

Greek yogurt yields chewy, soft, and sweet cookies but with less fat. 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.

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.
  1. Then whisk in the flour. Start by adding only a half, followed by the rest of the flour. Mix in the cocoa powder.
  1. Scoop out the cookie dough into a baking tray, lightly-greased or lined with parchment paper.
  1. Bake the cookies in the preheated oven for about 10 minutes.
  1. 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?