Substitute for butter in frosting

Quick answer

Solid coconut oil is the most reliable 1:1 substitute for butter in frosting — use it cold (solidified) and beat it the same way. Shortening also works 1:1 and produces a very stable, white frosting with a slightly waxy finish. Both hold structure well, though neither tastes like butter.

Some links below are affiliate links. As an Amazon Associate, AltPantry earns from qualifying purchases at no extra cost to you.

Rank Substitute Ratio (replaces 1 cup butter) Notes
#1 Solid coconut oil 1 cup solid coconut oil for every 1 cup butter Works 1:1 by weight and volume. Must be fully solidified (refrigerate if needed) before beating, or the frosting will be greasy and won't hold peaks. Produces a slightly softer set than butter at room temperature, so cakes frosted with coconut oil buttercream don't hold up as well in warm rooms. Adds a mild coconut flavor — undetectable in strongly flavored frostings (chocolate, cream cheese base), noticeable in plain vanilla.
#2 Vegetable shortening 1 cup shortening for every 1 cup butter The industry-standard dairy-free frosting fat. Beats into a stable, bright-white buttercream that holds its shape better than coconut oil at room temperature — this is why bakeries use it for piped decorations. Flavor is bland and slightly waxy compared to butter; most recipes compensate with a pinch of salt and a small amount of heavy cream or non-dairy milk to loosen texture. Not a good choice if flavor is the priority, but the most structurally reliable option.
#3 Vegan butter (stick-style, such as Earth Balance Buttery Sticks or Miyoko's Creamery Cultured Vegan Butter) 1 cup vegan butter for every 1 cup butter The closest flavor match. Stick-style vegan butters — not tub spreads — contain enough fat and low enough water content to whip into a proper buttercream. Tub spreads have too much water and will produce a soupy, broken frosting. Results vary by brand; Miyoko's whips closest to dairy butter in texture and flavor. May soften faster than dairy butter in warm conditions.
#4 Cream cheese (full-fat block) 8 oz (225 g) cream cheese + 1/4 cup (55 g) unsalted butter replaced by 8 oz (225 g) cream cheese + 4 tbsp (55 g) shortening Only relevant if you're already making cream cheese frosting and need to eliminate the butter component entirely. Full-fat block cream cheese (not spreadable tub) substitutes well for the butter portion; the result is a tangier, denser frosting with less structural stability for piping. This is a partial substitution context — using cream cheese as the sole fat base in a standard American buttercream will produce a very different product with a pronounced tangy flavor.

Why frosting is different

In frosting, butter serves three roles simultaneously: fat for richness, an aeratable solid for structure, and an emulsifier that holds sugar and liquid together in a smooth mass. Unlike in baking, where butter melts into the final product, frosting butter must stay semi-solid and whippable at room temperature. This means any substitute needs to be a solid fat at around 68–72°F (20–22°C) — liquid oils, soft spreads, and anything with high water content will produce a broken or runny result. The fat's flavor is also far more perceptible in frosting than in a baked cake, since there's no Maillard browning or competing flavors to mask it.

Common mistakes

The most common error is using a tub-style spread or margarine instead of a stick-style solid fat. Tubs contain 30–40% water by design for spreadability, which causes frosting to stay loose and never properly whip. The second frequent mistake is using coconut oil that's too warm — if it's even slightly melted, it won't trap air during beating and the frosting will be greasy rather than fluffy. Start with refrigerator-cold coconut oil and beat immediately. A third issue is under-compensating for lost salt when switching from salted butter to unsalted substitutes; add 1/4 tsp fine salt per cup of fat to avoid flat-tasting frosting.

Butter’s role in frosting is more demanding than almost any other baking application — it has to whip, hold structure, and taste good all at once. That combination rules out a wide range of substitutes that work fine in cake batter or cookies. Stick to solid fats with low water content, and make sure they’re properly chilled before beating.

If you’re after the closest flavor match, a stick-style vegan butter like Miyoko’s is the answer. If stability and ease matter more — for a tiered cake or a warm-weather event — shortening or a shortening-coconut oil blend is the more practical call. In either case, add a pinch of salt and a splash of non-dairy milk (1–2 tbsp) to round out the flavor and texture.

Frequently asked questions

Can I use margarine instead of butter in frosting?
Only if it's a stick-style margarine with at least 80% fat content. Tub margarines and "light" spreads contain too much water and will produce a soft, greasy frosting that won't hold shape. Check the nutrition label — if fat content is below 80%, skip it.
Will coconut oil frosting hold up on a cake left out at room temperature?
For a few hours at cool room temperature (below 70°F/21°C), yes. At warmer temperatures or for cakes that need to sit out for a party, coconut oil frosting softens and loses definition faster than butter-based frosting. Shortening holds up better in warm conditions.
Can I use half shortening and half coconut oil to get better flavor and stability?
Yes — this is a common approach. A 50/50 blend (1/2 cup shortening + 1/2 cup solid coconut oil per 1 cup butter) gives more stability than coconut oil alone and better flavor than straight shortening. Use the same total volume as the butter called for.

← Back to all butter substitutes