Home » Dessert Recipes » Homemade Yellow Cake

Homemade Yellow Cake

Making your own Homemade Yellow Cake is easier than you might think and it is so delicious! Below is a recipe for the yellow cake and a homemade chocolate frosting!

A Classic and Delicious Homemade Cake

Freshly baked yellow cake is a treat that never gets old. If you’ve followed me for any period of time, you know I love boxed cake mixes. They are so versatile and yummy. But sometimes you just get in the mood to make something from scratch, right? Or maybe you want to make that birthday cake just a bit more special – this is that recipe!

A serving utensil holding a slice of homemade yellow cake with chocolate frosting.

Moist and so delicious! Will definitely make again and again!
– Lulu

Frequently Asked Questions:

Is yellow cake the same as vanilla cake?

No, yellow cake and vanilla cake are two different types of cakes. Yellow cake is a type of cake made from butter, eggs, flour, sugar, and vanilla extract. It gets its distinctive yellow color from the eggs. Vanilla cake is another popular type of cake made with similar ingredients but often without the additional egg yolks. Instead, it often gets its flavor from the addition of pure vanilla extract or vanilla bean paste.

What makes yellow cake a yellow cake?

Yellow cake is a type of traditional, sweet cake that gets its distinctive yellow color from the eggs used in the recipe. The combination of eggs and vanilla extract help make the iconic yellow tint that we recognize in yellow cakes.

How do you keep a homemade cake moist?

A yellow cake is best kept moist when it is kept covered with plastic wrap or an airtight container after it has cooled completely. By sealing the cake in a container, you are essentially trapping the moisture inside so it doesn’t evaporate quickly and dry out the cake. If you don’t have any airtight containers, you can also use aluminum foil to cover the cakes. You should also avoid refrigerating your yellow cakes as this can dry them out since cold temperatures cause moisture to escape. The buttermilk in this recipe is also key to a moist cake.

What flavor is yellow cake?

It’s a buttery vanilla flavor and gets its yellow color from the use of additional egg yolks.

Why do ingredients need to be room temperature?

When baking a cake, it’s important to use room temperature ingredients for the best results. Room temperature ingredients mix together more easily than cold ingredients, and that helps you get an even consistency in your batter. Additionally, room temperature butter will also help to create a light, airy texture for cakes. Cold butter can make your cakes too dense and heavy. This ensures that your cake is baked evenly throughout without any uncooked or burnt portions.

Can I substitute buttermilk with milk?

No. I know it’s tempting to not want to go to the store to just grab buttermilk but it really makes this cake so moist. The cake does not taste like buttermilk, I promise. Buttermilk is the best for cakes and keeping them moist. The only substitute that would work would be heavy cream.

Why do you say to use a 9x13x3-inch baking dish?

Having higher sides on your baking dish will allow plenty of room for this homemade cake to rise and to also accommodate a thicker frosting. You can, of course, use a baking dish with shorter sides. You may just have some frosting leftover since it may not all fit with the shorter baking dish.

How to store leftovers?

Leftover cake can be stored in a cake container or wrapped well in plastic. Keep it at room temperature for up to 5 days. Keep it longer by freezing for up to 3 months.

A slice of homemade yellow cake with homemade chocolate frosting.

Ingredients Needed: (See Recipe Card Below For The Full Recipe)

  • all-purpose flour – you could technically use self-rising flour here – just remove the additional baking powder in this recipe as it is already in self rising flour.
  • baking powder – the baking powder does most of the the leavening in the recipe, make sure yours is fresh. Most recipes do not turn out because the baking powder was not fresh or expired.
  • baking soda – the baking soda also adds a bit of leavening but it also adds tenderness to the cake so it’s an essential ingredient (again, make sure yours is fresh).
  • salted butter – you could use unsalted butter, just add about 1 teaspoon of salt to the recipe. It also needs to be room temperature (not melted!) – this is important for proper fluffiness and tenderness in cake recipes.
  • large eggs and egg yolks – these also need to be room temperature for the same reason as the butter. It traps air into the batter when room temperature and creates a nice fluffy cake.
  • vanilla extract – you can switch up the extract for different flavors if you like.
  • buttermilk – do not substitute or your cake will not be as moist – trust me on this! Your cake will not taste like buttermilk though. The only acceptable substitute would be heavy cream.
  • unsweetened cocoa powder – this most popular cocoa powder is usually Hersheys – just make sure it is unsweetened.
  • heavy whipping cream – for the creamiest frosting – you want heavy cream. You could technically use milk here but I think you’ll find the best tasting frostings are made with heavy cream.
ingredients for a homemade yellow cake.

How To Make Homemade Yellow Cake:

Preheat the oven to 350°F. Lightly spray a 9x13x3-inch baking dish with baking spray and set aside. In a medium-sized bowl, stir together the flour, baking powder and baking soda (if using unsalted butter, you’ll also add one teaspoon of salt here). In the body of a stand mixer with the paddle attachment (or a bowl with an electric hand mixer), cream the butter, oil, and sugar for 3 minutes until fluffy.

collage of two photos: flour in a bowl; eggs and sugar in a separate bowl.

Add the eggs one at a time until fully mixed in. Add the egg yolks and mix them in with the vanilla. Add half of the dry ingredients and stir it in until combined. Next, add half of the buttermilk, and stir until combined. Repeat with the remaining dry ingredients and buttermilk, scraping down the sides as needed.

collage of three photos: adding eggs to bowl, adding flour mix to bowl and adding buttermilk mix.

Pour the batter into the prepared baking dish and smooth out the top. Bake for 35-40 minutes, until a toothpick inserted into the center comes out clean. If you see the cake is browning too much, cover it loosely with foil. 

collage of to photos: cake batter in a baking dish; fully baked in baking dish.

Let cool completely. Once the cake is cool, make the frosting. In the body of a stand mixer with the paddle attachment or in a large bowl with an electric hand mixer add the butter and whip until smooth. Add the cocoa powder and slowly mix it in until combined. 

collage of two photos: butter being creamed in a bowl; coca powder added to butter.

Add the powdered sugar a little at a time, mixing the first batch in completely before adding more. The mixture will be thick. Add the salt, vanilla, and 4 tablespoons of heavy cream. Mix until smooth. If it appears too thick, add an additional 1 tablespoon of heavy cream. Once mixed in, turn the speed up to medium-high and whip for 3 minutes until light and fluffy. Scrape down the sides as needed.

collage of two photos: powdered sugar added to butter and cocoa powder mix; frosting shown fully mixed.

Frost the cake with an even layer of frosting. Add sprinkles if using. Cut and serve.

A baking dish with homemade yellow cake with chocolate frosting topped with rainbow sprinkles.

Craving More Recipes?

Close up looking at a slice of yellow cake with chocolate frosting and sprinkles.

Homemade Yellow Cake

Making your own Homemade Yellow Cake is easier than you might think and it is so delicious!
16 Reviews
Print Pin Rate
Prep Time: 30 minutes
Cook Time: 40 minutes
Total Time: 1 hour 10 minutes
Servings: 12 servings

Ingredients

For the cake:

For the frosting:

Instructions

  • Preheat the oven to 350°F. Lightly spray a 9x13x3-inch baking dish with baking spray and set aside.
  • In a medium-sized bowl, stir together 3 cups all-purpose flour, 2 teaspoons baking powder and 1/2 teaspoon baking soda. Set aside
    NOTE: if using unsalted butter, you'll also add one teaspoon of salt here.
    Flour, baking powder, baking soda, vegetable oil, sugar, butter, eggs, vanilla extract, buttermilk, cocoa powder, heavy whipping cream, and powdered sugar.
  • In the body of a stand mixer with the paddle attachment (or a bowl with an electric hand mixer), cream together the 1/2 cup (1 stick) salted butter, softened to room temperature, 1/2 cup vegetable oil and 1 3/4 cups granulated sugar for 3 minutes until fluffy.
    Oil, butter, and sugar in a mixing bowl.
  • Add in 3 large eggs, room temperature (one at a time) until fully mixed in. Add 2 large egg yolks, room temperature and mix them in along with 1 1/2 teaspoons vanilla extract.
    Cake batter with egg yolks.
  • Add half of the dry ingredients you stirred together earlier and stir it in until combined.
    Dry ingredients in wet ingredients for a yellow cake mix.
  • Next, add half of the buttermilk, and stir until combined. Repeat with the remaining dry ingredients and buttermilk, scraping down the sides as needed.
    Buttermilk being poured in the cake batter.
  • Pour the batter into the prepared baking dish and smooth out the top.
    Homemade yellow cake mix batter in a baking dish.
  • Bake for 35-40 minutes, on the middle oven rack, until a toothpick inserted into the center comes out clean. If you see the cake is browning too much, cover it loosely with foil.
    NOTE: Baking times can vary depending on your oven, altitude, and many other factors. Please go by doneness not just by time.
    Fresh baked yellow cake.
  • Let cool completely.

For the frosting:

  • Once the cake is cool, make the frosting. In the body of a stand mixer with the paddle attachment (or in a large bowl with an electric hand mixer) add 1 cup (2 sticks) salted butter, softened to room temperature until smooth.
    butter being creamed in a bowl.
  • Add 1/2 cup unsweetened cocoa powder and slowly mix it in until combined.
    cocoa powder added to butter in a bowl.
  • Add 4 cups powdered sugar, a little at a time, mixing the first batch in completely before adding more. The mixture will be thick.
    Chocolate frosting with powdered sugar on top waiting to be mixed in.
  • Add in 1 teaspoon vanilla extract and 4 Tablespoons of heavy cream. Mix until smooth. If it appears too thick, add an additional 1 Tablespoon of heavy cream. Once mixed in, turn the speed up to medium-high and whip for 3 minutes until light and fluffy. Scrape down the sides as needed.
    adding heavy creamy frosting.
  • Frost the cake with an even layer of frosting. Add sprinkles if using. Cut and serve.
    A baking dish with homemade yellow cake with chocolate frosting topped with rainbow sprinkles.

Notes

  • Please refer to my FAQ’s and ingredient list above for other substitutions or for the answers to the most common questions. 
  • When picking your baking dish, choose one that is deeper, like a 9x13x3-inch baking dish rather than a normal 9x13x2-inch baking dish. This way there is enough room for the cake to rise and be able to add frosting on top. 
  • Unsalted butter can be used. Just add one teaspoon of salt to the dry ingredients. 
  • You gotta use buttermilk in this to keep it moist. I do not recommend milk. You could maybe substitute with heavy cream.
  • Leftovers can be stored at room temp in an airtight container or wrapped appropriately for up to 5 days. You can keep it longer by freezing it for up to 3 months. 
Course: Dessert
Cuisine: American

Nutrition

Calories: 734kcal | Carbohydrates: 97g | Protein: 7g | Fat: 37g | Sodium: 276mg | Fiber: 2g | Sugar: 70g

Nutritional Disclaimer

“The Country Cook” is not a dietician or nutritionist, and any nutritional information shared is an estimate. If calorie count and other nutritional values are important to you, we recommend running the ingredients through whichever online nutritional calculator you prefer. Calories and other nutritional values can vary quite a bit depending on which brands were used.

Did you make this recipe?Share it on Instagram @thecountrycook and mention us #thecountrycook!

Originally published: May 2023
Updated and republished: March 2026

Leave a Reply

Your email address will not be published. Required fields are marked *

Recipe Rating




5 Comments

  1. 5 stars
    This was so good. A lot of time homemade cakes taste so dry compared to a boxed cake mix but we were happily impressed by this recipe. Like all homemade cakes, do not store in the fridge or they will dry out. The frosting was equally yummy. Thank you!