Traditional frosting for cakes and other baked goods uses butter to provide richness and stiffness, as the fat content helps peaks form and stay put. Buttercream frosting traditionally uses butter, sugar and little bit of milk, but the butter can be replaced with other solid, spreadable fats, such as margarine. In other instances, the butter can be partially replaced by other rich, thick textured foods, such as cream cheese.
Basic buttercream icing uses a 1-to-5 ratio of unsalted butter to confectioner's sugar. Additional ingredients include vanilla extract and a small amount of milk, to get the frosting to the right consistency. More sugar produces a thicker frosting, while more milk produces a thinner, runnier frosting. Frosting can be made in advance, and then stored at room temperature, covered with plastic wrap until ready to use.
Margarine can be used in place of butter in a 1-to-1 ratio. It produces a frosting that is most like butter in terms of texture and color, but the flavor, depending on the richness of margarine, may be different. If you're using a lower-fat margarine, you may want to add a small amount of meringue powder in to stiffen it. This is especially important if you'll be piping the icing to make decorative borders or flowers.
Vegetable shortening, such as Crisco, can be used in place of butter in frosting in a 1-to-1 ratio. While still rich tasting, buttercream icing prepared with shortening will lack some depth in flavor, but the color will be a pure, snowy white. As with margarine frosting, you can add a small amount of meringue powder to the frosting to give it better holding power.
Cream Cheese Options
Cream cheese can replace some or all of the butter for a frosting, although it will significantly affect the taste and texture. Cream cheese frosting made with no butter will be snow white, while a cheese and butter blend will have a pale beige tint from the butter. Use a 1-to-2-to-4 ratio of cream cheese, to butter to confectioners sugar to make cream cheese and butter frosting, blending until smooth. For pure cream cheese frosting, use a 1-to-1-to-2 ratio of cream cheese to whipped cream to confectioners sugar. This no-butter cream cheese frosting will be much lighter than the butter and cream cheese blend, especially if you use low or non-fat cream cheese.
Using Coconut Oil
At just below room temperature, coconut oil solidifies, making it a good choice to use in place of shortening or margarine. However, it will give your icing a light coconut flavor, and is prone to separating if it is not made correctly or if it is stored at too warm a temperature. Solidify coconut oil by placing it in the fridge, and use it in place of all butter for a buttercream frosting. Because the icing is sensitive to heat, cool the cake completely before icing, and once iced, store the cake in the fridge until ready to serve.