Food

How to Make a Cake from Scratch at Home

By Hayride Live · Updated · 4 min read

Jump to recipe

Total time: about 1 hour 45 minutes · Cost: low · Difficulty: easy for a beginner. This is a classic vanilla layer cake with a simple buttercream frosting. You mix the batter by hand, bake it in two 9-inch round pans, and frost it once the layers are completely cool.

What You Need

Gather these tools before you start: two 9-inch (23 cm) round cake pans, a large mixing bowl, a whisk, a rubber spatula, a cooling rack, and a hand mixer or stand mixer for the frosting. If you do not have two pans, you can bake the layers one after another, but let the first cake cool in the pan for 10 minutes before turning it out.

All ingredients should be at room temperature. Cold butter and eggs do not cream or mix evenly, which makes the cake dense. Set them out 30 minutes before you begin.

Ingredients

  • 2 1/2 cups (300 g) all-purpose flour
  • 2 1/2 tsp baking powder
  • 1/2 tsp salt
  • 1 cup (2 sticks, 226 g) unsalted butter, softened
  • 1 3/4 cups (350 g) granulated sugar
  • 4 large eggs, room temperature
  • 1 tbsp vanilla extract
  • 1 cup (240 ml) whole milk, room temperature
  • For the frosting: 1 cup (2 sticks, 226 g) unsalted butter, softened
  • 4 cups (480 g) powdered sugar
  • 1/4 cup (60 ml) heavy cream or milk
  • 2 tsp vanilla extract
  • Pinch of salt

Bake the Layers

  1. Heat the oven to 350°F (175°C). Grease the two 9-inch pans with butter or nonstick spray, then dust with flour; tap out the extra.
  2. In a medium bowl, whisk together the flour, baking powder, and salt. Set aside.
  3. In a large bowl, beat the butter and sugar together with a hand mixer on medium speed until light and fluffy, about 3 minutes. Scrape the sides of the bowl.
  4. Add the eggs one at a time, beating well after each. Beat in the vanilla.
  5. Add the flour mixture in three additions, alternating with the milk in two additions. Start and end with flour. Mix on low just until combined after each addition; do not overmix.
  6. Divide the batter evenly between the two pans. Smooth the tops with a spatula.
  7. Bake for 25–30 minutes, until a toothpick inserted in the center comes out clean and the top springs back when lightly pressed.
  8. Cool the cakes in the pans on a wire rack for 10 minutes. Run a knife around the edge, turn the cakes out onto the rack, and cool completely, about 1 hour. Do not frost warm cakes.

Make the Frosting

  1. In a large bowl, beat the softened butter on medium speed until smooth, about 1 minute.
  2. Add the powdered sugar, 1 cup at a time, beating on low. The mixture will look crumbly at first.
  3. Add the cream, vanilla, and salt. Beat on medium-high for 2–3 minutes, until light and fluffy. If it is too thick, add more cream 1 tablespoon at a time.

Assemble and Frost

  1. Place one cake layer on a plate or cake stand. Spread about 1 cup of frosting on top, all the way to the edge.
  2. Place the second layer on top, flat side up. Spread a thin layer of frosting over the whole cake (crumb coat). Refrigerate for 15 minutes to set.
  3. Spread the remaining frosting over the top and sides. Use a spatula to smooth it. Decorate with sprinkles, if you like.
  4. Store the cake in the refrigerator for up to 4 days. Let it sit at room temperature for 30 minutes before serving for the best texture.

Pan Sizes and Baking Times

This recipe makes about 7 cups of batter. Use the table below to swap pans; baking times will vary, so check with a toothpick. The cake is done when the toothpick comes out clean.

Pan Size Batter Amount Baking Time
Two 9-inch (23 cm) rounds All batter 25–30 min
Two 8-inch (20 cm) rounds All batter 30–35 min
9×13-inch (23×33 cm) pan All batter 35–40 min
24 cupcakes Fill liners 2/3 full 18–22 min

When It Goes Wrong

Symptom Cause Fix
Cake sinks in the middle Oven door opened too early, or underbaked Do not open the oven until the last 5 minutes of baking; check with a toothpick.
Cake is dry Overbaked or too much flour Check at the shorter time; measure flour by spooning into the cup and leveling.
Cake sticks to the pan Pan not greased well Grease and flour thoroughly, or line the bottom with parchment paper.
Cake is dense and heavy Overmixed batter or cold ingredients Mix just until combined; bring ingredients to room temperature.
Frosting is too runny Too much cream or warm butter Chill the frosting for 15 minutes, then beat again.

Food Safety and Storage

This cake contains raw eggs in the batter and raw flour. Do not eat the batter or dough. Bake the cake fully before eating. Once baked, the cake is safe.

Frosted cake can sit at room temperature for up to 2 hours total (1 hour if the room is above 90°F/32°C). After that, refrigerate. The cake keeps in the fridge for up to 4 days, or freeze unfrosted layers for up to 3 months. Wrap tightly in plastic wrap and foil before freezing.

Make It Your Own

Swap the vanilla extract for almond extract (use 1/2 tsp) for a nutty flavor. Add 1 cup of chocolate chips or fresh berries to the batter before baking. For a chocolate cake, replace 1/2 cup of the flour with 1/2 cup unsweetened cocoa powder and increase the milk to 1 1/4 cups.

If you want a taller cake, use three 8-inch pans and reduce the baking time to 20–25 minutes. The frosting amount stays the same.

Spotted a mistake? Tell us and we will correct it. How we write and check articles.