Dairy-Free Classic Yellow Cake Recipe

Dairy-free classic yellow cake

The Spruce

  • Total: 60 mins
  • Prep: 10 mins
  • Cook: 50 mins
  • Servings: 10 servings

Yellow cake is an essential recipe in any baker's kitchen. But eating cake and cutting out dairy don't usually go together, so this dairy-free take on the classic yellow cake recipe is perfect for those who avoid dairy products. Try this go-to classic recipe where dietary restrictions, allergies or other food intolerances aren't easy to gauge like school bake sales, children's birthday cakes, graduation parties, and weddings.

Served either as two single-layer cakes or as a layer cake with dairy-free frosting of your choice, this bright dessert screams of celebration.


  • 2 2/3 cups cake flour
  • 2 teaspoons baking powder
  • 1/8 teaspoon salt
  • 1 cup dairy-free soy margarine (2 sticks, slightly cooler than room temperature)
  • 2 cups, plus 2 tablespoon sugar
  • 1 1/2 teaspoons vanilla extract
  • 4 eggs (large)
  • 1 cup unsweetened almond milk (or soy milk or rice milk)

Steps to Make It

  1. Gather the ingredients. Preheat the oven to 325 F.

    Gather the ingredients for dairy-free yellow cake
    The Spruce
  2. Lightly grease (with dairy-free margarine) two 8-inch round cake pans, line with greased parchment and lightly flour, tapping out excess. Set aside.

    Grease baking pan
    The Spruce
  3. In a medium-sized mixing bowl, sift together the flour, baking powder, and salt. Set aside.

    Sift flour
    The Spruce
  4. In another medium-large mixing bowl using an electric hand mixer, beat together the soy margarine and sugar until fluffy, about 4 minutes.

    Beat egg and butter
    The Spruce
  5. Add the vanilla, beating until well combined.

    Add vanilla
    The Spruce
  6. Add the eggs, one at a time, beating well between additions.

    Add eggs
    The Spruce
  7. Add 1/3 of the flour mixture to the margarine mixture, followed by 1/3 cup of the almond milk, and continue adding the remaining ingredients in two more additions, beating well before adding the next. Mix until just combined.

    Add flour mixture
    The Spruce
  8. Pour the batter into the prepared pans, smoothing the tops with an offset spatula. Bake for 50 minutes or until a toothpick inserted into the center of the cakes comes out clean.

    Pour into pans
    The Spruce
  9. Allow the cakes to cool for 10 minutes in the pans before transferring the cakes to a wire rack to cool completely. Once cool, frost with dairy-free frosting of your choice and serve, either as two single-layer cakes or one layer cake.

    Allow cakes to cool
    The Spruce 


  • Cakes are as delicate as they come when it comes to storing them. Because most cakes are not being served fresh from the oven, to maintain its freshness and ensure it's safe to eat, you must store it properly.
  • If just baked and before frosting, be sure the cake is completely cooled at room temperature.
  • If you wrap it before it's completely cooled, the extra humidity and heat could actually make the cake spoil faster.
  • Whether kept at room temperature or in the fridge, it must be completely sealed from other foods and will keep for 2 to 3 days.
  • After the cake has been frosted, it still must be covered, but it will keep a little longer as frosting helps lock in moisture.
  • Cake that has vegan buttercream or fondant icing will keep for 3 to 4 days.
  • If refrigerating or freezing these cakes, be sure to thaw them gradually temperature wise to prevent "bleeding" colors. So transfer refrigerated cakes into an air-conditioned air before serving outdoors, or transfer frozen cake to the refrigerator to gradually cool before serving it at room temperature.