How to substitute coconut oil or ghee for butter in baking

To substitute coconut oil for butter, allow for butter's water and use about 80% of its weight. Here is how to swap coconut oil or ghee in cookies, cakes and nankhatai, and what changes in taste and texture.

18 October 2026 9 min read
Home baker spooning solid coconut oil into flour to substitute coconut oil for butter, with nankhatai cooling behind her

To substitute coconut oil for butter, use about 80 g of coconut oil for every 100 g of butter, and add 1 tablespoon (15 ml) of milk or water to cakes. Butter is only about 80% fat and up to 16% water, while coconut oil is almost pure fat. Use it soft-solid for creaming and melted for melted-butter recipes.

Ghee swaps in exactly the same way. Some bakers want a dairy-free cake, some want the nutty depth ghee gives nankhatai, and some have simply run out of butter. The swap is easy but not identical: texture, flavour and handling all shift a little, and knowing why saves a batch. Our kitchen oil chart covers which fat suits which everyday dish.

At a glance

  • Butter must be at least 80% milk fat and may hold up to 16% water under the Codex standard. Coconut oil and ghee are close to 100% fat.
  • Swap by weight: 80 g coconut oil or ghee, plus 1 tablespoon (15 ml) milk or water in cakes, for every 100 g butter. In cookies and crumbles a straight 1:1 swap usually works.
  • Coconut oil is solid below about 24°C (75°F). Use it soft-solid for creaming and melted for melted-butter recipes.
  • Ghee gives a toasty, brown-butter flavour that suits shortbread, cookies and nankhatai.
  • Neither swap makes a bake lighter. All three are rich fats.

Can you substitute coconut oil for butter in baking?

Yes. Coconut oil can stand in for butter in cookies, bars, crumbles, muffins, quick breads and most cakes. What it cannot do is copy butter exactly, because butter is not pure fat.

Butter does three jobs in a bake. Its fat keeps the crumb tender, its water turns to steam and helps the dough rise, and its milk solids brown and taste of butter. Coconut oil and ghee bring only the fat, so tenderness stays while rise, browning and flavour shift slightly.

Coconut oil also changes with the weather. It melts at about 24°C (75°F): a firm white solid on a winter morning in Delhi or London, a clear liquid in a Chennai or Dubai kitchen. Use it solid where a recipe wants softened butter and liquid where it wants melted butter.

One honest limit: neither fat can replace butter in puff pastry, croissants or flaky pie crusts. Those layers rise on steam from thin sheets of butter, and coconut oil and ghee have almost no water to make it.

What is the ratio of coconut oil or ghee to butter?

For a close match, replace the fat and the water separately. Use 80% of the butter's weight as coconut oil or ghee, and make up the rest with milk or water. For cookies, crumbles and bars, many bakers simply swap 1:1 and enjoy a slightly richer, crisper result.

Recipe says Coconut oil or ghee Plus milk or water (for cakes)
100 g butter 80 g 15 ml (1 tbsp)
1 US stick (113 g) 90 g about 18 ml (1 tbsp + ½ tsp)
1 cup butter (227 g) 180 g about 35 ml (2 tbsp + 1 tsp)
250 g block 200 g 40 ml (2 tbsp + 2 tsp)

Weighing beats cups, because solid coconut oil and grainy ghee pack unevenly. With cups, swap level cup for cup in cookies; in cakes, take out 2 tablespoons of the oil and add 2 tablespoons of milk.

Should coconut oil be solid or melted for baking?

Match the state of the butter in the recipe. If the recipe beats soft butter with sugar, use soft-solid coconut oil. If it pours in melted butter, use melted coconut oil, warm but not hot.

For creamed cakes and cookies

Coconut oil creams best when it is white, opaque and spoonable, like soft butter. In a warm kitchen, chill what you need for 10 to 15 minutes, stirring once, until it turns cloudy and thick. In a cold kitchen, stand the bottle in warm water for a few minutes to loosen it.

For melted-butter bakes

Brownies, banana bread, muffins and many tea cakes start with melted butter. Use melted coconut oil, and have the eggs, milk and curd at room temperature. Cold ingredients make warm coconut oil set into small waxy lumps in the batter. If that happens, rest the bowl over warm water for a minute and stir.

For rubbed-in doughs and chilled cookie dough

Scones, crumbles and shortcrust need firm, cold fat rubbed into flour. Chilled coconut oil works, but it sets harder than butter, so rest a chilled dough for 10 to 15 minutes before rolling. Cookie dough made with melted coconut oil spreads more; chill it for 30 minutes before baking.

Can you bake with ghee instead of butter?

Yes, and in Indian baking ghee is the traditional fat. Nankhatai, the crumbly cardamom biscuit of Indian bakeries, is classically made with ghee, and ghee shortbread is a favourite in many homes.

Ghee is butter that has been simmered slowly until its water cooks off and its milk solids turn golden, then strained. Those toasted solids leave a nutty, caramel-like aroma, a little like brown butter. With no water, ghee makes doughs short: tender, sandy and crumbly, because the fat coats the flour and less gluten forms. That is exactly what nankhatai and shortbread want, and it is the same reason ghee-roasted flour makes a good besan laddoo.

Ghee is less suited to tall, airy sponges. Grainy ghee holds less air than soft butter when beaten with sugar, so creamed cakes come out a little denser. Use the 80% rule with a splash of milk and expect a slightly lower rise.

Smoke point is not a concern with either fat. The oven air may be 180°C (356°F), but the crumb inside a cake stays around 100°C (212°F) until it has baked through, so bake at the temperature your recipe gives.

Will coconut oil make cakes taste of coconut?

An unrefined coconut oil will, gently. Ours is pressed from dried copra and left unrefined, so it carries a gentle coconut aroma. In a plain vanilla sponge you will notice it. In chocolate cake, banana bread, ginger biscuits, jaggery cookies or anything with cardamom, it reads as warmth rather than as coconut.

If you want the bake to taste of butter, ghee is the closer swap; for no added flavour at all, a neutral refined oil is the usual choice. For more on copra oil, see how cold pressed coconut oil differs, and how to use it.

Is baking with coconut oil or ghee healthier than butter?

Not really. The swap changes flavour and suits dairy-free baking, but it does not make a cake light. Spoon for spoon, coconut oil carries more saturated fat than butter, and ghee a little more than butter, because neither contains water.

Per level tablespoon Weight Calories Total fat Saturated fat
Butter, unsalted 14.2 g 102 kcal 11.5 g 7.3 g
Ghee 12.8 g 112 kcal 12.7 g 7.9 g
Coconut oil 13.6 g about 120 kcal 13.6 g about 11 to 12 g

Figures are from USDA FoodData Central. The American Heart Association suggests keeping saturated fat under about 6% of daily calories, roughly 13 g on a 2,000 kcal diet, and favours liquid vegetable oils over tropical oils such as coconut. Enjoy the cake; just do not count the swap as a health upgrade.

Who should skip or swap carefully

  • Milk allergy: ghee is a dairy fat and can carry traces of milk protein, so it is not safe for anyone with a milk allergy, and it is not vegan.
  • Coconut allergy: uncommon, but if anyone reacts to coconut, choose another fat.
  • A cholesterol or heart plan: if your doctor or dietitian has asked you to cut saturated fat, ask them which fat suits your baking.

Baking with our coconut oil and ghee

If you want to try it, our Truly Cold Pressed coconut oil is pressed slowly from dried copra in a wooden ghaani and left unrefined, so expect a gentle coconut aroma and some cloudiness in the cold. For nankhatai, shortbread and cookies with a nutty, old-fashioned taste, our A2 Gir cow ghee is churned from curd by the bilona method and simmered slowly until golden and grainy.

The bottom line

Coconut oil and ghee can replace butter in most bakes once you allow for butter's water: use about 80% of the weight and add a splash of milk to cakes. Keep coconut oil soft-solid for creaming and melted for melted-butter recipes, save ghee for short, crumbly bakes, and keep butter for flaky pastry.

Frequently asked questions

Can I use coconut oil instead of butter in cookies?

Yes, and cookies are the easiest place to start. Swap 1:1, or use 80% of the butter's weight for a closer match. Cookies made with coconut oil tend to be crisper at the edges, and they spread more if the oil was warm, so chill the dough for 30 minutes before baking.

Can I use coconut oil instead of butter in frosting?

Only in a cool kitchen. Coconut oil melts at about 24°C (75°F), so a coconut oil buttercream turns soft and greasy in a warm room. Beat it while it is soft-solid and keep the cake somewhere cool. In hot, humid weather, a ganache holds its shape better.

Why did my coconut oil batter turn lumpy?

Cold ingredients made the warm oil set. When melted coconut oil meets cold eggs, milk or curd, it firms into small waxy beads. Bring everything to room temperature before mixing. If lumps form anyway, rest the bowl over a pan of warm water for a minute and stir until the batter turns smooth again.

Is ghee dairy free for vegan baking?

No. Ghee is made from milk, so it is neither vegan nor dairy free. Most of the milk sugar and protein is removed when butter is simmered and strained, which is why many people who are mildly lactose intolerant find it easier, but anyone with a milk allergy should avoid it. For vegan bakes, use coconut oil.

Do I need to change the oven temperature when I swap butter for coconut oil or ghee?

No. Bake at the temperature and time the recipe gives, and start checking a few minutes early. Without the water and milk solids of butter, bakes can brown a little differently, so judge by colour, a clean skewer and a springy top rather than the clock alone.

Sources

Share this

What this uses

Shop what this guide uses

Wood pressed coconut oil by KachiGhaani.com

Cold Pressed Coconut Oil

Rs. 299.00 Rs. 399.00

A2 Gir cow ghee, vedic bilona, in a 1 litre glass jar by KachiGhaani.com

Gir Cow's A2 Ghee

Rs. 999.00 Rs. 1,499.00

Keep reading

More from the Journal

See all stories