I want to make cookies but I am allergic to dairy. Is margarine an acceptable substitute for butter in cookie recipes, and if so, how do I substitute it?

  • Welcome to Seasoned Advice! Could you add in more detail, for example what kind of cookies? Or are you just asking in general?
    – Phrancis
    Jan 7, 2015 at 0:00
  • I didn't have a specific type of cookie in mind; I'm hoping for a general rule of thumb so that I can bake cookies in the future.
    – Malper
    Jan 7, 2015 at 0:08
  • This article on About.com may be what you are looking for.
    – Phrancis
    Jan 7, 2015 at 0:25

3 Answers 3


I have a family member who is lactose intolerant, and we often substitute margarine (or various oils) for butter in cooking. We've found that this is mostly interchangeable, but can be unpredictable in baking due to different melting properties. Also, as Marti noted in a comment below, it's a challenge to find unsalted margarine (important if directly substituting for unsalted butter).

I'd love to see any answers on strategies for adapting recipes to account for butter-margarine differences, but in my experience it is easier to either settle for slightly sub-par cookies — or (preferably) to try non-dairy or vegan recipes instead, which are designed with a non-butter fat in mind and therefore have better results.

  • I thought butter was mostly lactose-free? Also, remember that most recipes call for unsalted butter, but it can be very, very hard to find unsalted margarine. (Well, at least in the US. In Hungary, unsalted margarine is the norm.)
    – Marti
    Jan 8, 2015 at 15:20
  • Butter is mostly lactose-free, yes, but there is still enough to trigger problems if she eats it too much/often -- the simplest solution is to avoid it. That's a great point about the salted/unsalted problem, and I incorporated it into the Answer :)
    – Erica
    Jan 8, 2015 at 17:37

You might want to try clarified butter, it has negligible amounts of lactose and casein. Since they use it in Indian cuisine (they call it ghee) I reckon it should not cause problems to lactose intolerant people (like most people living in Asia are). It doesn't have the same rich flavor as regular butter, but in my opinion it is still better tasting than margarine.

Maybe add a bit more water when baking, since clarified butter has almost no water, while regular butter has about 20%.

  • 1
    I'm actually allergic to dairy, so I'm afraid this wouldn't help me.
    – Malper
    Oct 13, 2015 at 2:20
  • As I've stated in my answer, ghee is made almost entirely out of fat and has virtual no proteins that may cause allergic reaction (casein) and negligible amounts of lactose (that causes unwanted bowel movement). Of-course, consult with your doctor before consuming, but several lactose intolerant people I know, consume ghee on regular basis, without a problem.
    – avidenic
    Oct 13, 2015 at 6:55
  • Ok. To be clear, my issue is not lactose intolerance but rather a whey (not casein) allergy. This is interesting information though; I will look into the whey content of ghee.
    – Malper
    Oct 13, 2015 at 20:34

It's absolutely no problem to replace butter with margarine in cookies and actually in any other kind of dough. Just substitute butter with margarine keeping the same proportion.

  • This sometimes leads to unexpected results when cooked (cookies rise/flatten differently, or perhaps are crispier than desired) -- often it can be substituted directly, but it's not infallible.
    – Erica
    Jan 8, 2015 at 13:19
  • 2
    "No problem" is indeed an exaggeration. Cookies are pretty sensitive, so if you're hoping for a specific texture, this substitution might mess things up.
    – Cascabel
    Jan 8, 2015 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.