Moist Yellow Cake Recipe- Better than Cake Mix!

This post may contain affiliate sales links. Please see my full disclosure policy for details

This Yellow Cake Recipe from scratch is a better-than-cake-mix yellow cake. This recipe can be used to make a yellow cake or yellow cupcakes with a chocolate fudge frosting. This homemade cake recipe uses oil, sour cream and buttermilk to create the perfect moist, spongy, yellow cupcake.


A slice of yellow cake on a gold polka dot plate with chocolate frosting and sprinkles.

At last! Time for a new cake recipe!! This one, you guys, this is the perfect homemade yellow cake recipe with a chocolate fudge frosting. Just for you. This is a long post that talks all about all of the recipe testing I did and how I landed on my final yellow cake recipe. So follow along or just skip past all of this and go straight to the recipe.

After perfecting my moist vanilla cake recipe, I wanted to make a yellow cake recipe that resembled what you’d get with a box of cake mix, except better.

I wanted this yellow cake recipe to be less dense than my vanilla cake, with more air pockets, which would produce a more tender crumb. It needed to stay just as moist but be less like a sponge-cake.

An overhead view of a slice of yellow cake that's topped with chocolate frosting and sprinkles

What’s the difference between a vanilla cake and a yellow cake?

Flavor-wise, a yellow cake should have a less-strong vanilla flavor, but a buttery, “eggy” flavor, although I hate the term “eggy” myself.

Other than that, there isn’t really a whole lot of different between the two.

This set me off on a bake-a-thon where I baked 6 variations of the yellow cake and 2 boxed cakes just for taste comparison.

The one thing that stayed consistent through my test is that each cake contained 2 whole eggs and 2 egg yolks and 2 teaspoons of vanilla extract. In each recipe, I adjusted the amount of sour cream and the liquid ingredients.

A gold fork sinking into a slice of yellow cake with chocolate frosting and sprinkles

From there, we went into the tasting phase. Lucky for me, my dad and sister-in-law were visiting that week, and each got to participate and provide their feedback on each recipe. Can you imagine if someone placed 8 slices of cake in front of you? #goals

We tasted each one and rated them for their taste, moistness, density and crumb structure.

Cake Testing

I also incorporated frosting into the test so that we were able to get the full effect of a finished cake. First, we tasted the sample cakes without frosting, to be sure we could focus on the cake flavor and structure. Once we landed on our top 2 cakes, we tasted them with chocolate frosting.

One thing became very evident during our cake tasting: wherever we landed, it certainly wouldn’t be quite as yellow or produce that lighter-than-air texture you get from the box mix.

Cake tasting

The boxed cake mixes stood out like a sore thumb in our taste test. One because of the color, which is achieved by using food dye. Two, they tasted blatantly artificial in comparison.

The more research I did on yellow and vanilla cakes, the more I read about the difficulty of achieving the same texture and consistency you’d get from a cake mix. I equate this to the chemicals used in cake mixes.

A giant bite taken out of this yellow cupcake covered with chocolate frosting and sprinkles

BETTER-than-cake-mix Yellow Cake Recipe.

I’ve always preached the convenience of a cake mix, and plenty of my recipes on my site call for cake mix. However, the more I bake from scratch, the less I am grabbing cake mixes from my cabinet. The taste of a homemade cake simply can’t be beat. There’s a time and place for cake mix for sure, especially if you’re in a pinch.

An overhead shot of a swirl of chocolate frosting with sprinkles on a teal cake plate.

Anyhow, back to the recipe testing.

After my first round of 6 different cakes, we landed on a favorite. I decided to do one more test and swap out one last ingredient that put this cake over the edge of good to great. Buttermilk. Cake #7 is the winner!

Buttermilk is the primary liquid ingredient in this cake. Not only does it help achieve the slight tang, but it helps achieve a certain tenderness to the crumb.

A gold fork with a big bite of cake on it.

Do I have to use buttermilk?

I know I’m going to get this question a lot, do I have to use buttermilk? Can I just use regular milk? The answer is yes, you can use regular milk. However, I personally feel that cake is way BETTER with buttermilk and it stays moist for a longer period of time.

To make homemade buttermilk use 1 tablespoons of lemon juice or vinegar and then add enough milk to make 1 cup. Allow to sit for 5-10 minutes and then stir. You can substitute regular milk instead of buttermilk if absolutely necessary. I’ve also heard you can freeze leftover buttermilk.


An overhead view of a slice a cake on a gold polka dot plate. The cake has a few bites taken out of it and a fork with a bite of cake on it .,

Once I landed on cake #7, I baked it two more times to be sure I liked it, and then also tried another version altering the amount of buttermilk and sour cream just to be sure I had it the right way.

One noticeable difference in this recipe compared to my moist vanilla cake is that the batter is a lot thicker. It will be interesting to see if this works better for cakes that have berries or other items incorporated into them.

How to make chocolate fudge frosting

Once I nailed the perfect yellow cake, it was time to take on the frosting. I could have made a batch of my best chocolate frosting, but for this recipe, I wanted something fudgier than that.

This chocolate fudge frosting uses a combination of melted chocolate and cocoa powder for a rich chocolate flavor, a little goes a long way here.

A close up of a gorgeous cupcake with chocolate frosting and sprinkles

It’s important that you have high quality chocolate, because it will impact the taste of your frosting. I always recommend using a chocolate bar instead of chocolate chips. Chocolate chips tend to have a coating on them which, when melted, produce a more oily melted chocolate.

I suggest melting the chocolate at 50% power so it doesn’t seize in the microwave.

Like most of my frosting recipes, this one starts with cold butter. Through the process of whipping the butter at various stages, we end up with an airy chocolate frosting that is great for spreading and piping.

The ratio of butter to powdered sugar is a little bit less than my standard 2 cups of powdered sugar to 1 stick of butter because I didn’t want a very dense frosting.

This chocolate fudge frosting will crust over a bit, so if you want to add sprinkles, it’s best to do it right away.

A close up shot of a perfect yellow cupcake with a big swirl of chocolate frosting and sprinkles

How to make homemade Yellow Cupcakes

The great thing about this yellow cake recipe is that it can also be made into cupcakes. If you make the recipe as is, it should produce 24 cupcakes.

However, I always like to provide the option for 12 cupcakes in case you don’t need quite as many.

To make 12 cupcakes, half all the dry ingredients and wet ingredients as well. You’ll need 1 whole egg and 1 egg yolk, 2/3 cups butter milk and 2 tablespoons of sour cream to make 12 cupcakes. You can still bake at 350° for about 15 minutes.

Moist Yellow Cake Recipe

Follow Beyond Frosting:

Facebook | Twitter | Pinterest | Instagram

If you love no-bake recipes, be sure to check out my cookbook, No-Bake Treats!


A slice of yellow cake on a gold polka dot plate with chocolate frosting and sprinkles.

Moist Yellow Cake Recipe

  • Author: Beyond Frosting
  • Prep Time: 20 minutes
  • Cook Time: 30 minutes
  • Total Time: 50 minutes
  • Yield: 15 slices


This Yellow Cake Recipe from scratch is a better-than-cake-mix yellow cake. This recipe can be used to make a yellow cake or yellow cupcakes with a chocolate fudge frosting. This homemade cake recipe uses oil, sour cream and buttermilk to create the perfect moist, spongy, yellow cupcake.


For the cake:

  • 2 cups (380g) granulated sugar
  • ½ cup (118 ml) vegetable oil
  • 2 large eggs
  • 2 egg yolks
  • 2 teaspoons (10ml) vanilla extract
  • ¼ cup (59g) light sour cream
  • 2 ½ cups (350g) all-purpose flour
  • 3 teaspoons (11.2 g) baking powder
  • 1 teaspoon (5g) salt
  • 1 ¼ cup (295ml) buttermilk

For the frosting:

  • 6 ounces dark chocolate, melted
  • 1 cup (226g) unsalted butter
  • 3 cups (390g) powdered sugar
  • 1/4 cup (28g) cocoa powder
  • 2 teaspoons (10ml) vanilla extract
  • 1 tablespoon (15ml) heavy whipping cream (or milk)


  1. For the cake: Preheat the oven to 350°F. In a large mixing bowl, combine the sugar, vegetable oil, eggs, egg yolks and vanilla extract. Beat on medium speed until the eggs and oil are well incorporated and the batter is lighter in color, about 2 minutes. Scrape down the bowl as needed.
  2. Next mix in the sour cream and beat until well combined.
  3. Add half the flour followed by the baking powder and salt, and beat on low speed while pouring in half of the buttermilk and mix just until the flour starts to incorporate.
  4. Finally add the remaining flour, mixing on low speed while pouring in the remaining buttermilk and beating until all of the ingredients are well combined.
  5. Use a spatula to scrape down the sides of the bowl and stir the batter from the bottom to the top to ensure it’s well mixed.
  6. Pour the batter in a 9-inch by 13-inch pan and bake at 350°F for 28-30 minutes, keeping a careful eye on the baking during the last few minutes. Remove from the oven and allow to cool completely.
  7. Test the cake for doneness by inserting a toothpick into the center of the cake. If the toothpick comes out clean, your cake is done. Cool completely.
  8. For the frosting: In a microwave-safe bowl, melt the chocolate in the microwave at 50% power in 30-second increments, stirring each time until the chocolate is melted. Stir until completely smooth. Set aside to cool.
  9. Cut the butter into pieces. Using the paddle attachment, whip butter for 5-7 minutes, scraping down the bowl occasionally. Beat until butter look light in color. Next, beat the cocoa powder into the butter until well mixed.
  10. Alternate adding 1 cup of powdered sugar at a time with the liquid ingredients: vanilla extract & heavy cream. Ensure the powdered sugar is well combined, and whip for 1-2 minutes before adding more powdered sugar.
  11. Next, pour in the melted chocolate and beat on slow speed until incorporated. Then, increase the speed to medium-high and beat for another 2-3 minutes to whip additional air into the frosting. Spread over cooled cake.


  • To substitute the sour cream use a plain non Greek yogurt. Full fat sour cream will also work
  • To make homemade buttermilk use 1 tablespoons of lemon juice or vinegar and then add enough milk to make 1 cup. Allow to sit for 5-10 minutes and then stir. You can substitute regular milk instead of buttermilk if absolutely necessary
  • If you prefer a more light and fluffy cake, then use only 2 cups of flour. However I only recommend doing this for the cake. For the cupcakes I do not recommend altering the recipe
  • Storage suggestions: If you live in a hot and humid environment then I would suggest that you refrigerate cupcakes that are frosted and allow them to come to room temperature before serving. Otherwise they can be stored in an air-tight container at room temperature.
  • Make-ahead: These are best served within 2 days of preparation but will proper storage they can stay fresh for several days.
  • Freezing: If needed, flash-freeze the cupcakes on a baking sheet for 15 minutes than transfer them to an air-tight, freezer-safe container. Thaw in the refrigerator for several hours then bring to room temperature prior to serving. If possible, it’s best to store them unfrosted.
  • You can make these as yellow cupcakes  or as a yellow layer cake
Nutrition Information:
1 slice
  • Category: Cake
  • Method: Baked
  • Cuisine: American

Keywords: Yellow Cake, Yellow Cake with Chocolate Frosting, Yellow Birthday Cake, Yellow Cupcakes, Easy Cupcake Recipe

Recipe Card powered byTasty Recipes

You might also like:

Tips for Baking Cupcakes

Tip and Tricks for making perfect cupcakes. This is your go-to guide for how to bake cupcakes including pan sizes and how full to fill each liner.

Banana Split Poke Cake

A slice of banana split cake on a gold polka dot plate. The vanilla cake is filled with a banana pudding and topped with sundae toppings

Funfetti Poke Cakes

A close up shot of a slice of funfetti cake topped with whipped cream and sprinkles



68 Responses
  1. Rose

    I made this cake in two nine inch pans. Next time I’ll use two eight inch pans. This cake does not rise enough to make a nine cake look high. Have not tasted it yet. Just out of the oven.

  2. Kathleen Hillman

    Thanks so much for taking time to develop this recipe! It’s delicious and just the kind of yellow cake I was looking for. 🙂

  3. Sharon Clements

    I made this cake for my birthday. It was amazing! One of the best cakes I’ve ever eaten! Thank you for this recipe!!!!!

  4. Lauren

    This recipe is amazing! Finally a yellow cake recipe that I love. The first time I made it I felt like it was a little dense as some other comments have said, but the second time around I cut the flour back to closer to 2- 2 and 1/4 cup of flour and it was perfect! It may help others to just cut back on the flour a little to get a slightly more “airy” cake. I also beat it at the end until I saw some air bubbles and made sure not to “tap” the pan. Thank you- I’ve been looking for years for a yellow cake that didn’t taste dry and this recipe is amazing!

  5. Pamela Long

    I made this cake last night and baked into cupcakes. I loved the flavor of the cake. it was very good… however it was definitely dryer than expected. I think I will try your other yellow cake recipe.

  6. Katrena Fink

    This cake is so delicious! Very moist and I love that slight tang. It didn’t have that “light as air” box mix texture that I was hoping for but, reading through this again, I see that was addressed here. Losing that is a small price to pay for dropping those chemicals, and the flavor is far superior. My daughter, who doesn’t even like cake, says that she needs this one for her next birthday! Thank you! My only substitution was using full fat sour cream, because that is what I already had on hand. Lucky me that I happened to have buttermilk in my fridge because that definitely put this over the top!

    1. Beyond Frosting

      Katrena, thank you so much for your comment! I in fact found the same challenge when I was developing the recipe. The light and fluffy cake mix texture is so drastically different from homemade cake.

    1. Beyond Frosting

      I have not personally, but I have baked my vanilla cake recipe with melted butter and it will work but I don’t prefer it that way.

  7. Jojo

    Hi. I’ve just come across your site and think it is amazing. I love the sound of your yellow cake and I’m wondering if it’s possible to put the ingredients in pound and ounces or grams? I’ve never had much luck when trying to convert US cup measures in to British measures.
    Thanks Jojo

  8. Maria B Rugolo

    What an excellent recipe. I did use Greek yogurt in place of sour cream (and also forgot about adding it until I was incorporating the buttermilk and flour mixture. I added it then and if it made any difference, it is not evident in how this yummy cake turned out. My husband is not a fan of chocolate so I didn’t use the frosting recipe but I will eventually – but will wait for company or I’ll devour it all on my own!

  9. Michelle

    I made this cake (9×13 Pan) and it was FABULOUS! I want to make it again as a layer cake. Will this recipe make two 9in rounds? If so, how long should I bake them for?

    1. Beyond Frosting

      Hi Michelle, that is awesome! Thank you for sharing! Yes it can be made in 2 9 inch layers. For my vanilla cake, the 9 inch layers bake for 28-32 minutes, but this recipe is a little bit different, so I would start with 25 minutes and then keep a close eye on it, checking every few minutes after that. Enjoy!

  10. Lydia

    I’m British and I’m astonished at how much Americans rely on boxed cake mix. I find lots of recipes on Pinterest that I want to make but they all start with “1 box of yellow cake mix”.
    Cake is so easy to make, my mum taught me the 4,4,4,2 recipe when I was a child and it makes a perfect cake every time (4oz of flour, sugar, butter and 2 eggs).
    The odd time I’ve used a box mix it has been nowhere near as good as this simple recipe.
    You don’t even have to cream the butter and sugar, just throw it all in together and mix. You can add any flavour you like. It never lets me down 🙂

    1. Beyond Frosting

      Thanks for sharing Lydia. I think boxed cake mix is a quick and easy go-to, especially if you’re intimidated by baking or just not great at it. But I love having from scratch alternatives as well.

  11. Jay

    I plan to bake this cake using only one 9 inch cake pan. Will cutting the recipe in half give me enough batter for the one pan? Thank you.

  12. Dena Dickinson

    Made this with butter (1 cup) instead of oil, 3 yolks instead of 2 and half cup sour cream. Used cake flour instead of all purpose, and got two thick layers in 9 inch rounds. At least 2 inches each.

    Used whipped dark chocolate ganache. Your recipe is amazing and thank you so much for posting. Love your site.

  13. Kasey Quiggins

    I made two of these yesterday, one for a step- daughters birthday and one for a son-in-law birthday. It made just enough icing to ice both 9×11 cakes. They were delicious. My only problem was the icing stayed so thick that was a little difficult to spread. Suggestions? My stand mixer did not like trying to whip cold butter.

    1. Beyond Frosting

      Hi Kasey, It is a thicker frosting but should definitely be spreadable. If your mixer won’t whip the cold butter then you’ll have to start with softened butter. Whipping the butter greatly effects the consistency of the frosting. I hope you love the cakes! I am so glad you loved the cakes!

  14. Sarah

    I made this cake for my and my daughter’s birthday a couple of weeks ago. I’m not usually a huge cake person, but my kids insist that it cannot be a birthday without cake! 🙂 So I decided to try this one and boy am I glad I did!!! This was the best cake I have ever made. I topped it with a chocolate cream cheese frosting and it was absolute perfection!! We had the whole thing eaten in just a couple of days. Thank you so much for the wonderful recipe! I am making a birthday cake for my neighbor’s little girl today and I’m going to try your funfetti recipe! Thanks again!

    1. Beyond Frosting

      YEAH!!! This is so awesome Sarah! I am so glad you were the HERO for your daughter’s birthday!! And the chocolate cream cheese frosting was SUCH a good call!

  15. Janani Bandara

    Hi! These pictures are absolutely mouthwatering! I am hoping to make this cake this Sunday. I have a small problem because we don’t have good quality sour cream or greek yogurt available here. Can I just use plain yogurt? TIA.

  16. Shelly

    Thanks for that. Also I just made the cake today and will ice tomorrow. I used an airbake pan which required an additional 7 minutes of bake time.

  17. Shelly

    There was nothing mentioned about greasing and flouring the pan. Is that done for this recipe or does it not stick to the pan?

    1. Beyond Frosting

      Hi Shelly, for a 9×13 inch cake I used a non stick pan. If you are not using a nonstick pan, you can certainly grease and flour the pan

  18. Rachel Gurk

    I made this cake (recipe as written, no changes) for my daughter’s birthday party and it was a huge hit! Everyone loved both the cake and the frosting. Will definitely be making this one again. Thanks Julianne!

  19. Tiffany Morris

    I don’t have the big mixer you used to mix the frosting ingredients I only have the handheld mixer can use that’s mixer to mix the frosting?

    1. Beyond Frosting

      Hi Tiffany, yes you can use a hand mixer. I would be sure to cut the butter into cubes, about 1 tablespoon in size and microwave for 10 seconds. You may have to mix the frosting a little bit longer with the hand mixer.

  20. Traci

    Have you ever tried baking the cupcakes with the half recipe? I just made these and they are awfully gummy and the texture is really off. Can you check the recipe for mistakes ? Baking soda vs powder etc.

    1. Beyond Frosting

      Hi Traci, the cupcake recipe here is for 12 cupcakes. Are you asking about baking only 6 cupcakes? I always bake the 12. There are no errors in the recipe, it’s been tested not only by myself but others as well. I am not certain what would be causing the gummy texture but it could perhaps be just a difference in your preferred cupcake texture.

      1. Traci

        No I meant half of the cake recipe to yield 12 cupcakes. But you’re probably right. I am accustomed to having cupcakes made with butter. Thus a different taste and texture. Thanks

  21. Becca

    I just made these cupcakes and they are delicious but about to 1/2 of mine sunk in the middle ? any suggestions on what I can do differently next time? I do live in Colorado so would it have to do with high elevation? Thanks!

    1. Beyond Frosting

      Hi Becca, I think that’s likely the cake. I am not too familiar with baking in elevation, but this batter is a bit thicker and heavier. How badly did they sink? Were they fully baked in the middle?

  22. Gene C

    Hi there! I’ve been looking for a yellow cake recipe that will produce a moist, flavorful and light cake even when eaten straight out of the refrigerator. It’s like a Holy Grail for bakers. I never liked baking using a cake mix so your recipe looks very good on paper. I like the idea of combining sour cream and buttermilk and using oil as oil-based cakes tend to be moist even when cold. I have yet to try your recipe and I’m excited to do so. Just one question though: does it have to be light sour cream? I never get anything that is light or reduced-fat (I’d rather do portion control than compromise on flavor). Would you be able to use regular sour cream instead? Would it not alter the chemistry in the cake?

    Thanks a lot. I will be trying your recipe very soon.

    1. Beyond Frosting

      Hi Gene, I know others have baked with full fat sour cream. All I can say is that it probably makes the cake more dense due to the extra fat in the sour cream. If you can buy a small 8 ounce container, you’ll use about half of it for this cake.

      1. Gene C

        Hi Julianne! I have tried your recipe and it is wonderful. Like you, I also tested two other recipes for yellow cake aside from yours to make a side by side comparison. Compared to the other two, I love the flavor and texture of your cake, even when it is straight out of the refrigerator. It stayed moist and tender even when eaten cold.

        I did use full fat sour cream. I also used two 9-inch round pans instead of the 9- by 13-inch rectangular pan. It took the same amount of time as what you indicated for the rectangular pan. This will be my go-to recipe for yellow cake from now on.

        Thanks for sharing a great recipe!

  23. Taryn

    I made this cake last night, and it’s absolutely incredible! Brought it to the office today, and got rave reviews. For anyone trying it- the cake is moist, yet holds up perfectly to the frosting. It really brings out the flavor of the dark chocolate. I would make this 1000 times!!!

  24. Susan

    hi! can’t wait to try this recipe. One question, can i make it into a layer cake or do I need to make adjustments? I know there are different versions of the vanilla cake recipe.. My daughter’s birthday is the end of August and a yellow layer cake with that delicious fudge frosting would be a big hit!! thanks for all your delicious recipes 🙂

    1. Beyond Frosting

      Hi Susan! Happy birthday to your daughter! So I have no made this specific recipe in a layer cake yet, however the recipe is similar to my Moist Vanilla Cake Recipe. so I should think that you can make it into a layer cake. I would suggest maybe doubling the frosting recipe though, you may need even more than that for a 3 layer cake.

  25. Joanne

    You did a lot of testing, and thank you! I always prefer to bake cakes from scratch, and rarely rely on a box cake mix.

Share a Comment

Subscribe to my newsletter and get my fav tips to take your cakes & cupcakes to the next level.
Skip to content