In mac and cheese, ghee replaces butter 1:1 and tastes the closest. For a stovetop sauce with no roux, cream cheese or mayonnaise brings the richness instead.

What matters is the job butter does: fat for the roux, richness for the sauce, and browning for a breadcrumb topping. Some swaps copy butter closely, and others change the flavor completely.
In mac and cheese, ghee gives the same buttery richness and swaps 1:1.
For stovetop mac with no roux, melt cream cheese into the hot pasta (2 tablespoons per 1 tablespoon of butter) or stir in mayonnaise off the heat.
Go with coconut oil if you need it dairy-free. It works in both stovetop and baked mac and cheese.
What Butter Does in Mac and Cheese
In a stovetop sauce, butter melts first and the flour is stirred into it to make a roux. The roux thickens the milk into a béchamel, and the cheese melts into that.
Remember it later
Planning to try this recipe soon? Save it for a quick find later!
A roux uses equal parts fat and flour, and one from-scratch recipe uses 3 tablespoons of each for 2 cups of milk.
That leaves two ways to swap, depending on whether you keep the roux.
- Keep the roux: Ghee, margarine, coconut oil, olive oil and vegetable oil go in the pan where the butter would, and the flour, milk and cheese follow as usual.
- Skip the roux: Cream cheese, mayonnaise, sour cream and Greek yogurt go into the finished sauce or the hot pasta, so you leave out the flour and let the cheese and pasta water carry the sauce.
9 Best Substitutes for Butter to Try
The nine swaps run from neutral oils to tangy dairy, and the right one depends on whether you need a roux base, extra creaminess or a dairy-free sauce.
| # | Substitute | Best For | Ratio | Key Note |
|---|---|---|---|---|
| 1 | Olive Oil | 🍳 Cooking | ¾ tablespoon per 1 tablespoon butter | Fruity, less rich |
| 2 | Cream Cheese | 🍳 Cooking | 2 tablespoon per 1 tablespoon butter | Tangy, extra creamy |
| 3 | Mayonnaise | 🍳 Cooking | 1:1 | Subtle tang, silky |
| 4 | Ghee | ✨ Both | 1:1 | Nuttier, lactose-free |
| 5 | Coconut Oil | 🌱 Dairy-Free | 1:1 | Mild coconut hint |
| 6 | Sour Cream | 🍳 Cooking | 2 tablespoon per 1 tablespoon butter | Bright, tangy |
| 7 | Vegetable Oil | 🍳 Cooking | ¾ tablespoon per 1 tablespoon butter | Neutral, no butter flavor |
| 8 | Margarine | ✨ Both | 1:1 | Butter-like, processed |
| 9 | Greek Yogurt | 🍳 Cooking | 2 tablespoon per 1 tablespoon butter | Tangy, lighter body |
Ratios are per 1 tablespoon of butter. Ghee, mayonnaise, margarine and coconut oil go in 1:1, oils take less, and the creamy swaps (cream cheese, sour cream, Greek yogurt) take twice as much.
1 – Olive Oil
Olive oil works for starting a roux or finishing with a drizzle. The fruity, peppery notes stand out more than butter's neutral richness.
Use it when you want the mac and cheese to lean Mediterranean or you're fine with a lighter texture. Light olive oil tastes milder than extra-virgin, so it suits a roux better.
- Ratio: Use ¾ tablespoon olive oil per 1 tablespoon of butter
- Flavor: Fruity and peppery notes, less rich than butter
Skip if: You want traditional creamy butter flavor.
For Roux Base
Works for: Starting a flour-thickened sauce
Skip if: You want a neutral flavor
For Finishing Drizzle
Works for: Adding richness at the end
Skip if: You need butter's creamy mouthfeel
2 – Cream Cheese
Cream cheese brings ultra-creaminess and a tangy edge. It thickens the sauce without needing a traditional roux.
The texture gets velvety fast. Melt it into the hot pasta with a splash of pasta water to loosen it.
Cream cheese is at least 33% milkfat against butter's 80%, which is why the ratio is 2 to 1: doubling the amount gets you close to the same fat.
- Ratio: Use 2 tablespoons cream cheese per 1 tablespoon of butter
- Best for: Ultra-creamy sauce texture
- Flavor: Tangy and rich, adds extra creaminess and body
- Texture: Velvety, thickens quickly
Skip if: You need to make a traditional roux.
3 – Mayonnaise
Mayonnaise creates a silky texture without the need for a roux. The subtle tang stays in the background, letting the cheese flavor lead.
Mayonnaise is at least 65% vegetable oil by weight plus egg yolk, so it brings fat and body. Stir it in off the heat, because heat can break the emulsion and the sauce turns oily.
If you're out of mayonnaise too, plain Greek yogurt or sour cream goes in the same spot, at 2 tablespoons per 1 tablespoon of butter.
- Ratio: Use 1 tablespoon mayonnaise per 1 tablespoon of butter
- Best for: Quick stovetop mac with no roux
- Flavor: Subtle tang, creates silky texture without butter flavor
Skip if: Making baked mac and cheese with breadcrumb topping.
4 – Ghee (Clarified Butter)
Ghee tastes like butter but skips the lactose. The nutty, slightly sweet notes come through more than regular butter.
Use it exactly like butter. It melts smoothly and makes a traditional roux base.
Ghee is still dairy, because trace milk protein can remain, so it does not suit a milk allergy. Jars differ in how nutty they taste, so buy a small jar first.
- Ratio: Use 1 tablespoon ghee per 1 tablespoon of butter
- Best for: Lactose-free option with butter flavor
- Flavor: Nuttier and slightly sweeter than regular butter
Skip if: You want to avoid all dairy.
5 – Coconut Oil
Coconut oil works for dairy-free and vegan mac and cheese. Refined versions stay neutral; unrefined adds a mild coconut hint.
It melts at about 76°F, so it is solid in a cool kitchen: scoop it, level the spoon and melt it in the pan like butter.
The milk in the sauce has to be dairy-free too, and dairy-free milks like soy or almond go into the roux the same way. Vegan butter sticks are the other dairy-free choice and are sold as a 1:1 swap.
- Ratio: Use 1 tablespoon coconut oil per 1 tablespoon of butter
- Best for: Dairy-free and vegan mac and cheese
- Flavor: Mild coconut hint in unrefined oil, neutral in refined versions
Skip if: You dislike coconut undertones.
| Substitute | Dairy-Free | Flavor |
|---|---|---|
| Olive Oil | Yes | Fruity, peppery |
| Coconut Oil | Yes | Mild coconut or neutral |
| Vegetable Oil | Yes | Completely neutral |
| Ghee | No (lactose-free) | Nutty, buttery |
6 – Sour Cream
Sour cream adds brightness and tang to cheese sauce. The texture stays creamy but lighter than butter-based versions.
Stir it in at the end to keep the tang fresh. It does not belong in a flour-based roux, so mix it straight into the finished sauce.
Sour cream is at least 18% milkfat against butter's 80%, so it adds tang and body but far less fat. Yogurt stands in for sour cream if the tub is empty, but it breaks more easily in heat.
- Ratio: Use 2 tablespoons sour cream per 1 tablespoon of butter
- Best for: Adding tanginess to cheese sauce
- Flavor: Bright and tangy, less buttery richness
Skip if: Making a flour-based roux.
7 – Vegetable Oil
Vegetable oil delivers a completely neutral base for the roux. It won't add flavor, so the cheese does all the work.
The texture stays lighter than butter. Add a splash of cream or milk at the end if you want more richness.
- Ratio: Use ¾ tablespoon oil per 1 tablespoon of butter
- Best for: Budget-friendly roux base
- Flavor: Completely neutral, no butter flavor or richness
- Texture: Lighter than butter
Skip if: Butter flavor is essential to the dish.
8 – Margarine
Margarine mimics butter's consistency without the dairy. The flavor runs slightly artificial but close enough for most mac and cheese recipes.
Use it in both stovetop and baked versions, because it melts and browns much like butter.
Margarine must be at least 80% fat, like butter, but tubs sold as a spread usually hold more water and thin the sauce, so buy sticks.
- Ratio: Use 1 tablespoon margarine per 1 tablespoon of butter
- Best for: Dairy-free cooking with butter-like consistency
- Flavor: Similar to butter but less rich and slightly artificial
- Texture: Melts and browns like butter
Skip if: You want pure, natural ingredients.
9 – Greek Yogurt
Greek yogurt brings protein and tang while keeping the dish lighter. The texture stays creamy but less heavy than butter-based sauces.
Whole-milk Greek yogurt has about 11 grams of fat per cup against about 40 for sour cream, so it breaks more easily. Stir it in off the heat once the pan has cooled a few minutes.
- Ratio: Use 2 tablespoons Greek yogurt per 1 tablespoon of butter
- Best for: Protein-rich, lighter mac and cheese
- Flavor: Tangy and slightly acidic, much lighter body
Skip if: Making a traditional buttery roux.
Before You Cook Without Butter
The best substitute depends on your cooking method. For stovetop mac, mayonnaise or cream cheese gives instant creaminess without a roux, and for baked versions ghee or margarine copies butter's richness.
Start with the ratio listed, then adjust based on how thick or creamy you want the sauce.
- Closest match - Ghee, same buttery richness
- Easiest grab - Olive oil, pantry staple
- Dairy-free option - Coconut oil, vegan-friendly
Four situations change the swap.
- Breadcrumb topping: Toss 1 cup of panko with about 3 tablespoons of melted ghee, margarine or olive oil in place of the butter.
- Boxed mac and cheese: Use the same ratios on the butter amount printed on your box, which differs between varieties.
- The cheese: Sharp cheddar carries most of the flavor whatever fat you use, and there are cheddar swaps made for mac and cheese if the block is gone too.
- Baking: These ratios are for sauce and topping, and cakes and cookies rely on butter's water and the air it traps when creamed, so use butter substitutes for baking there.
Frequently Asked Questions
Yes, use ¾ tablespoon of olive oil or vegetable oil per tablespoon of butter and the roux thickens the same way, with a lighter flavor. Add a splash of cream at the end for more richness.
Yes, it makes the sauce thicker and creamier with a slight tang, and it replaces the roux. Melt it into the hot pasta with a splash of pasta water.
No. The tang stays behind the cheese, as long as you stir it in off the heat so it does not separate.
Yes, ghee, margarine and coconut oil behave most like butter in the oven. Sour cream and Greek yogurt can split under long heat, low-fat ones first, so save them for stovetop sauce.
Coconut oil, used 1:1, works in stovetop and baked mac, and refined coconut oil stays neutral while unrefined tastes of coconut. Use a dairy-free milk in the sauce too, or the dish still contains dairy.
Yes. Stir cream cheese into the hot pasta with a splash of pasta water, then add the shredded cheese, and you need neither butter nor a roux.




