Homemade Vegan Margarine

lucop/Getty Images
Prep: 5 mins
Cook: 5 mins
Total: 10 mins
Servings: 64 servings
Yield: 4 cups
Nutrition Facts (per serving)
111 Calories
12g Fat
0g Carbs
0g Protein
Show Full Nutrition Label Hide Full Nutrition Label
Nutrition Facts
Servings: 64
Amount per serving
Calories 111
% Daily Value*
Total Fat 12g 16%
Saturated Fat 7g 35%
Cholesterol 0mg 0%
Sodium 76mg 3%
Total Carbohydrate 0g 0%
Dietary Fiber 0g 0%
Total Sugars 0g
Protein 0g
Vitamin C 0mg 0%
Calcium 1mg 0%
Iron 0mg 1%
Potassium 11mg 0%
*The % Daily Value (DV) tells you how much a nutrient in a food serving contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.
(Nutrition information is calculated using an ingredient database and should be considered an estimate.)

Although most margarines on the market are free of any animal products, they can also be full of preservatives, palm oil, and salt. Some brands even include milk or other milk products. If you are vegan or need to eat dairy-free, it may be worth making your own margarine at home. This vegan margarine recipe is easy to prepare and is a delicious substitute for store-bought dairy-free margarine.

A combination of solidified coconut oil, sunflower oil, and canola oil is cooked in a double boiler until melted, and then coconut milk, Dijon mustard, turmeric, and salt are added. The mixture is cooked for a minute or two and then transferred to an ice bath to quickly cool down. The vegan margarine is stirred until it becomes nice and thick and firms up.

There is a lot of flavor in this homemade margarine, starting with the coconut oil and milk and finishing with the Dijon mustard and turmeric. While the coconut contributes a subtle sweetness, the mustard brings a little tang and the turmeric adds earthiness along with a bit of pepper and mild ginger flavors. Turmeric also imparts a yellow color to the vegan margarine.

Use homemade margarine as you would butter—a spread on toast, muffins, or biscuits, or use it as the fat in stir-fries or frying. You can also substitute it for butter in baking, roasting, and grilling.


  • 16 ounces coconut oil, solidified 

  • 2/3 cup sunflower oil

  • 2/3 cup canola oil

  • 1 cup full-fat coconut milk

  • 1 1/2 tablespoons Dijon mustard

  • 1 tablespoon ground turmeric

  • 2 teaspoons salt

Steps to Make It

  1. Gather the ingredients.

  2. Fill a medium or large heatproof dish with cold water and ice cubes to create an ice water bath. Set aside.

  3. In a double boiler or heatproof dish set over several inches of hot water, combine the coconut oil, sunflower oil, and canola oil; cook over medium heat.

  4. Once the coconut oil has liquefied, add the remaining ingredients, stirring to combine.

  5. After about 1 to 2 minutes, or once the mixture has reached 120 F to 130 F, transfer the bowl to the ice water bath, setting the bowl in the cold water gently, and continue to stir until the mixture firms up.

  6. Once the margarine is firm, transfer it to a container with a tight-fitting lid and refrigerate. Homemade margarine will keep in the refrigerator for up to 2 weeks.​​​​​

  7. Enjoy.

Recipe Variations

  • You can use different or fewer oils to make this vegan margarine; substitute vegetable oil for the canola, or eliminate it altogether and use just coconut and sunflower.
  • Instead of the Dijon mustard and turmeric, you can use a teaspoon or two of nutritional yeast to achieve a similar flavor.
  • Add a squeeze of fresh lemon juice to bring a bit of acid to the recipe.