There are two main categories of margarine in stores today – tub margarine and stick margarine.
Margarine sold in plastic tubs has a somewhat similar taste and texture to softened or whipped butter. Beyond the texture, a key difference between tub margarine and butter is that the former tends to be lower in saturated fats and higher in water. These days, companies have developed many different types of margarine for various dietary needs – low-sodium, low-fat, dairy-free, olive oil, vegan – just to name a few. Virtually all tub margarines are trans-fat free, but check the label for verification.
Tub margarine can easily be substituted for butter at the table for spreading, and some people use it on the stovetop for cooking, though we typically favour using oil over margarine in cases like this. In baking, melted margarine could work in recipes that call for melted butter, but in recipes that call for softened butter, swapping in tub margarine may change the texture; for example, cakes will be less tender, and cookies will generally spread out more and be less crisp.
Tub margarines are too soft for pies, pastries and other recipes that call for cold butter, and don’t stand up in icings and frostings, either. Low-fat/light margarines tend to be inappropriate for cooking and baking due to a high water content – be sure to read the label!
Stick margarine, also known as block or hard margarine, has the same texture as butter, and is therefore a better substitute for baking and cooking than tub margarine. However, stick margarines are generally high in trans fats, which have been shown to be bad for our heart. In our test kitchens, we develop and test our recipes using butter instead of margarine in cases where either one could conceivably work. Similarly, in cases where either oil or melted margarine could be used, we choose to use oil. Using margarine instead of butter in a recipe tested with butter may yield unexpected results.