Perfect Yellow Cake

published Jun 6, 2024
Yellow Cake Recipe

The best birthdays have this homemade yellow cake with chocolate frosting: it’s moist, fluffy, and flavorful.

Serves12

Makes1 layer cake

Prep35 minutes

Cook45 minutes

Jump to Recipe
We independently select these products—if you buy from one of our links, we may earn a commission. All prices were accurate at the time of publishing.
head on shot of a slice of yellow cake with chocolate icing being pulled from a full cake
Credit: Photo: Alex Lepe; Food Styling: Spencer Richards

I consider myself a bit of a cake expert, and in my professional opinion this recipe for yellow cake with chocolate frosting is the best birthday cake. It’s the perfect balance of ultra-fluffy, buttery cake and creamy, chocolaty frosting. It’s sugary enough to please the pickiest of children, but not so sweet that their parents won’t go back for seconds. 

Even though I grew up on yellow cake made from boxed mixes and would never turn my nose up at some Duncan Hines, this cake comes together pretty easily and the texture and flavor is unmatched. The combination of butter and oil in the batter delivers a moist, fluffy, and flavorful cake that’s sure to be popular at every birthday party. 

Why You’ll Love It

  • It’s so light and fluffy! According to our cross tester, it has a plush texture that’s soft on the inside and slightly crispy at the edges. The frosting is fluffy and light, yet rich and creamy.
  • There are two types of chocolate in the frosting. The combination of cocoa powder and dark chocolate gives it a deep chocolate flavor. 
  • This cake is rich and moist. Using butter and oil results in a buttery flavor and a nice moist crumb.
Credit: Photo: Alex Lepe; Food Styling: Spencer Richards

Key Ingredients in Yellow Cake

  • Unsalted butter: This is key to the color of yellow cake; it also adds flavor.
  • Vegetable oil: Using slightly more vegetable oil than butter creates a more moist cake (that also freezes well!).
  • Sour cream: The fat and acidity in the sour cream inhibits some gluten development, and creates a more moist and tender cake
  • Egg yolks: Like the sour cream, the fat from additional yolks creates a moist, tender crumb as well as contributes to the yellow hue.
  • Cocoa powder: To add maximum flavor to the buttercream, the cocoa powder is bloomed in melted butter. You can use natural cocoa powder, but if you desire a deeper chocolate flavor, opt for Dutch processed cocoa powder.
  • Dark chocolate: By melting the chocolate into milk (which is essentially the method for making a ganache), you ensure that it will incorporate smoothly into the buttercream.

How to Make Yellow Cake

  1. Make the batter. Cream softened unsalted butter, granulated sugar, and kosher salt in a stand mixer until fluffy. Add vegetable oil, vanilla extract, eggs, and egg yolks. Alternate adding all-purpose flour and baking powder to the batter with whole milk and sour cream. 
  2. Bake the cake. Divide the batter between two greased, lined 8-inch pans and bake until golden-brown. Let cool completely. 
  3. Bloom the cocoa and melt the chocolate: Melt butter in the microwave and whisk in cocoa to bloom. Melt dark chocolate with milk in the microwave and stir until smooth. 
  4. Make the frosting. Beat softened unsalted butter until light and fluffy, then add the cocoa mixture, vanilla extract, and kosher salt. Beat until fluffy, then gradually mix in powdered sugar. Add the chocolate mixture and beat until lightened in color. 
  5. Assemble the cake. Trim off any doming on the cakes. Spread a tiny bit of frosting onto a serving plate or cake stand, then top with a cake layer (this helps keep the cake in place as you assemble). Slather on a generous layer of frosting, then top with the second cake layer. Cover the top and sides of the cake with the remaining frosting. Decorate with colorful sprinkles around the edge of the cake. 
Credit: Photo: Alex Lepe; Food Styling: Spencer Richards

Helpful Swaps 

  • Turn this cake into a confetti cake by folding in 3/4 cup of rainbow sprinkles into the batter.
  • Full-fat Greek yogurt can be substituted for the sour cream. 

Storage and Make-Ahead Tips

  • The cake layers can be baked, wrapped individually in plastic wrap, and frozen up to 1 month ahead. Let thaw at room temperature, about 1 hour. 
  • The frosting can be made up to 1 week ahead and refrigerated in an airtight container. Let come to room temperature before using, then beat on medium speed with a mixer until it reaches a spreadable consistency.   
  • Cover the assembled cake and store at room temperature for up to 1 day, or refrigerate for up to 5 days. 

More Birthday Cake Recipes

Yellow Cake Recipe

The best birthdays have this homemade yellow cake with chocolate frosting: it’s moist, fluffy, and flavorful.

Prep time 35 minutes

Cook time 45 minutes

Makes 1 layer cake

Serves 12

Nutritional Info

Ingredients

For the cake:

  • 8 tablespoons

    (1 stick) unsalted butter

  • 3

    large eggs

  • 2

    large egg yolks

  • 1/2 cup

    whole milk

  • 1/3 cup

    sour cream

  • Cooking spray

  • 2 3/4 cups

    all-purpose flour, plus more for dusting

  • 2 teaspoons

    baking powder

  • 2 cups

    granulated sugar

  • 1/2 teaspoon

    kosher salt

  • 2/3 cup

    vegetable or canola oil

  • 1 tablespoon

    vanilla extract

For the frosting (makes 3 1/2 cups):

  • 2 sticks

    (8 ounces) unsalted butter, divided

  • 1/4 cup

    unsweetened cocoa powder

  • 2 ounces

    70% dark chocolate, or 1/3 cup dark chocolate chips

  • 1/4 cup

    whole milk

  • 1 teaspoon

    vanilla extract

  • 1/4 teaspoon

    kosher salt

  • 1 pound

    powdered sugar (3 1/2 to 4 cups)

  • 1 tablespoon

    rainbow sprinkles, for decorating (optional)

Instructions

  1. Place 1 stick unsalted butter (for the cake) in the bowl of a stand mixer (or large bowl if using an electric hand mixer). Place 2 sticks unsalted butter (for the frosting) on the counter. Place 3 large eggs and 2 large egg yolks in a medium bowl. Place 1/2 cup whole milk and 1/3 cup sour cream in a liquid measuring cup and whisk to combine. Let everything sit at room temperature until the butter is softened.

Make the cake:

  1. Arrange a rack in the middle of the oven and heat the oven to 350ºF. Coat 2 (8-inch) round cake pans with cooking spray, then dust lightly with all-purpose flour, tapping out the excess. Line the bottom of each pan with a parchment paper round.

  2. Place 2 3/4 cups all-purpose flour and 2 teaspoons baking powder in a large bowl and whisk to combine.

  3. Add 2 cups granulated sugar and 1/2 teaspoon kosher salt to the bowl of butter. Beat with the paddle attachment on medium-high speed until fluffy and lightened in color, about 2 minutes. Reduce the mixer speed to low. Add 2/3 cup vegetable oil and 1 tablespoon vanilla extract. Increase the speed to medium-high and beat until smooth and lightened in color, about 1 minute.

  4. Reduce the mixer speed to medium. Beat in the eggs and eggs yolks one at a time, beating well and scraping down the sides of the bowl once or twice.

  5. Add about 1/3 of the flour mixture and beat on the lowest speed until just combined. Add half of the milk mixture and beat until just combined. Alternate adding the remaining flour and milk and beat on low speed until the batter is smooth and combined, scraping down the sides as needed. Do not overmix. Divide the batter between the pans (about 2 1/2 cups each).

  6. Bake for 25 minutes. Rotate the pans. Bake until the tops are golden-brown, spring back slightly when gently pressed, and a toothpick inserted into the center comes out clean, 15 to 20 minutes more. Meanwhile, wash and dry the stand mixer bowl and paddle attachment. Make the frosting.

Make the frosting:

  1. Place 4 tablespoons of the unsalted butter in a small microwave-safe bowl and microwave on HIGH until melted, about 25 seconds. Add 1/4 cup unsweetened cocoa powder and whisk until smooth.

  2. Coarsely chop 2 ounces 70% dark chocolate, or measure out 1/3 cup dark chocolate chips. Place in a small microwave-safe bowl. Add 1/4 cup whole milk and microwave on HIGH, stirring every 10 seconds, until melted and smooth, about 30 seconds total. Let both mixtures cool slightly, about 5 minutes.

  3. Place the remaining 12 tablespoons of the softened unsalted butter in the stand mixer bowl (or large bowl if using an electric hand mixer). Beat with the paddle attachment on medium-high speed until light and fluffy, 3 minutes. Add the cocoa and butter mixture, 1 teaspoon vanilla extract, and 1/4 teaspoon kosher salt. Beat on medium-high speed until fully incorporated and fluffy again, about 1 minute.

  4. Reduce the mixer speed to low. Gradually beat in 1 pound powdered sugar, scraping down the sides of the bowl as needed. Add the chocolate and milk mixture, and beat on low speed until incorporated. Increase the speed to medium-high and beat until fluffy and slightly lightened in color, about 2 minutes. Cover and let sit at room temperature until the cakes are ready.

Assemble the cake:

  1. When the cakes are ready, let them cool in the pans for 15 minutes. Remove the cakes from the pans to a wire rack and discard the parchment paper. Let cool completely, 45 minutes to 1 hour.

  2. If there is any doming on the cake layers, trim it off with a long serrated knife so the cakes are completely flat.

  3. Spread about 1 tablespoon of the frosting in the center of a cake or serving plate. Top with 1 cake layer. Dollop 1/3 of the frosting (about 1 heaping cup) onto the cake and spread into an even layer, going all the way to the edges. Top with the second cake layer and and spread the remaining frosting evenly over the top and sides. Sprinkle 1 tablespoon rainbow sprinkles around the edge of the top of the cake if desired.

Recipe Notes

Substitution: Plain Greek yogurt can be substituted for the sour cream.

Make ahead: The cake layers can be baked, wrapped up individually in plastic wrap, and frozen up to 1 month ahead. Let thaw at room temperature, about 1 hour. The frosting can be made up to 1 week ahead and refrigerated in an airtight container. Let come to room temperature before using, then beat on medium speed with a mixer until a spreadable consistency.

Storage: Cover the assembled cake and store at room temperature for up to 1 day, or refrigerate for up to 5 days.