Moist Yellow Cake Recipe from Scratch That Actually Delivers
There is a specific disappointment that comes from slicing into a homemade yellow cake only to find it dry, slightly rubbery, and somehow less satisfying than the boxed version you outgrew at age ten. Most from-scratch yellow cake recipes fail on one of two fronts: they’re technically correct but bland, or moist but so fragile the layers crumble when you try to stack them. This recipe fixes both.

The yellow cake here is buttery, tender, and golden without any food coloring. It holds together well enough to layer and frost, cuts cleanly, and tastes the way a proper birthday cake should. The ingredients are ordinary pantry staples. The method is straightforward enough for a home baker who hasn’t made a layer cake before.
Why This Yellow Cake Is Worth Making
- Ready in about 55 minutes. Prep takes 20 minutes; the rest is oven time and a short cooling window before you frost.
- One batter, three formats. It works as two 9-inch rounds, a 9×13-inch sheet cake, or 24 standard cupcakes. No recipe adjustment needed.
- Dense enough to stack, tender enough to eat plain. The ratio of fat to flour gives you a crumb that doesn’t fall apart under the weight of frosting but also doesn’t taste like bread.
- No unusual ingredients. Everything here, including the buttermilk, is available at any grocery store.
- The leftovers stay moist. Properly stored, this cake holds its texture for 3 days at room temperature and up to 5 days refrigerated.
Recipe Snapshot
| Detail | Info |
|---|---|
| Prep Time | 20 minutes |
| Cook Time | 30 minutes |
| Cooling Time | 30 minutes (before frosting) |
| Total Time | 1 hour 20 minutes |
| Servings | 12 slices (two 9-inch rounds) |
| Difficulty | Easy |
| Cuisine | American |
| Course | Dessert |
| Best For | Birthday cakes, celebrations, everyday baking |
Ingredients

For the Cake
- 2 ½ cups (315g) all-purpose flour
- 2 ½ teaspoons baking powder
- ½ teaspoon salt
- 1 cup (225g) unsalted butter, at room temperature
- 2 cups (400g) granulated sugar
- 4 large eggs, at room temperature
- 2 teaspoons pure vanilla extract
- 1 cup (240ml) full-fat buttermilk, at room temperature
For the Chocolate Buttercream (optional but classic)
- 1 cup (225g) unsalted butter, softened
- 3 cups (360g) powdered sugar, sifted
- ½ cup (45g) unsweetened cocoa powder, sifted
- 3–4 tablespoons whole milk or cream
- 1 teaspoon vanilla extract
- Pinch of salt
Substitutions: No buttermilk on hand? Stir 1 tablespoon of white vinegar into 1 cup of regular whole milk, wait 5 minutes, and use as a direct replacement. For a dairy-free version, full-fat coconut milk with the same vinegar trick works well; it adds a very faint coconut note that most tasters can’t identify.
Equipment
- Two 9-inch round cake pans (at least 2 inches deep)
- Stand mixer or electric hand mixer
- Rubber spatula
- Parchment paper
- Wire cooling rack
- Offset spatula (for frosting)
Parchment paper is worth mentioning specifically: grease the pans, line the bottoms with a parchment circle, then grease again. This two-step process is why cakes release cleanly. Skipping the parchment is the most common reason layers get left behind in the pan.
Step-by-Step Instructions
1.Preheat the oven to 350°F (175°C). Grease two 9-inch round pans, line the bottoms with parchment, and grease again. Set aside.
2.Combine the dry ingredients. Whisk together the flour, baking powder, and salt in a medium bowl. Whisking rather than sifting is fine here; the goal is even distribution.
3.Cream the butter and sugar. Beat the room-temperature butter on medium speed for 2 minutes until smooth, then add the sugar and beat for another 3 minutes. The mixture should look pale and noticeably fluffy. This step builds the structure of the cake: the sugar cuts tiny air pockets into the butter, and those pockets expand in the oven to give you lift. Undermixing here leads to a dense crumb.

4.Add the eggs one at a time. Add each egg individually, mixing on low until just incorporated before adding the next. Scrape down the bowl after the last egg. Adding them one by one lets the batter emulsify gradually instead of breaking into a greasy mess. Add the vanilla extract with the last egg.
5.Alternate the flour and buttermilk. With the mixer on low, add the flour mixture in three additions, alternating with the buttermilk in two additions (flour, buttermilk, flour, buttermilk, flour). Begin and end with the flour. Mix just until each addition disappears into the batter. Overmixing at this stage develops gluten and makes the crumb tough rather than tender.
CHEF’S NOTE: The batter will look slightly lumpy once the last flour addition goes in. That is fine. A few small lumps are better than a cake you’ve overworked trying to smooth them out.
6.Divide the batter evenly. Split the batter between the two prepared pans. A kitchen scale is the most reliable tool here: weigh the total batter, divide by two, and put exactly half in each pan. Even layers bake more consistently and stack more cleanly.

7.Bake for 28 to 32 minutes. The cake is done when the edges have pulled slightly away from the pan, the top springs back when pressed lightly in the center, and a toothpick inserted in the middle comes out with a few moist crumbs (not wet batter, not bone dry). Start checking at 28 minutes. An over-baked yellow cake dries out very quickly; pulling it one or two minutes early is always the safer call.
IMPORTANT: Baked goods with eggs should reach an internal temperature of at least 160°F (71°C) to be food-safe, per USDA guidelines. A quick-read thermometer confirms this without guesswork.
8.Cool in the pan for 10 minutes. Run an offset spatula or thin knife around the edge, then invert onto a wire rack. Peel off the parchment immediately. Let the layers cool completely before frosting, at least 30 minutes. Frosting a warm cake causes the buttercream to slide and melt into the crumb.
For the Chocolate Buttercream
9.Beat the butter. Beat softened butter on medium-high for 3 minutes until pale and fluffy.
10.Add the dry ingredients. Reduce speed to low, then add the sifted powdered sugar and cocoa powder in two additions, mixing until combined after each. Add the vanilla and salt.
11.Adjust the consistency. Add milk or cream one tablespoon at a time until the frosting is smooth, spreadable, and holds a peak. It should feel like thick sour cream, not runny and not so stiff it tears the cake surface when you spread it.
12.Frost the cooled cake. Place one layer on a plate or cake board, dome side down. Spread about ¾ cup of frosting evenly across the top. Place the second layer on top, also dome side down, so the flat bottoms face each other and the top is as level as possible. Apply a thin crumb coat over the entire cake, refrigerate for 15 minutes, then apply the final layer of frosting.

Common Mistakes
Butter or eggs straight from the fridge. Cold butter won’t cream properly with the sugar; it stays chunky and the air pockets never form. Cold eggs can cause the batter to curdle. Take both out at least an hour before you start.
Opening the oven door before 25 minutes. The structure of the cake is still setting during the first two-thirds of baking. Opening the door lets heat escape and can cause the center to sink. If your oven has a window, use it.
Not measuring flour correctly. Scooping the measuring cup directly into the flour bag packs it in and can add 20 to 30% more flour than the recipe intends. Spoon flour into the cup and level it off with a straight edge, or weigh it (315g for this recipe).
Frosting a warm cake. Even a cake that feels cool to the touch on the outside can be warm in the center. Give it a full 30 minutes on the wire rack before frosting.
Variations
Lemon yellow cake. Add the zest of two lemons to the creamed butter and sugar. Swap the vanilla for fresh lemon juice (2 tablespoons) added with the buttermilk. Pair with vanilla buttercream or a simple powdered sugar glaze instead of chocolate frosting.
Sprinkle (confetti) version. Fold ½ cup of rainbow sprinkles (jimmies, not nonpareils, which bleed color) into the finished batter just before pouring into the pans.
Sheet cake. Pour all the batter into a greased and lined 9×13-inch pan. Bake at 350°F for 35 to 40 minutes, checking for the same doneness cues. One-layer sheet cakes are easier to transport and serve at large gatherings.
Cupcakes. Fill lined standard muffin cups about two-thirds full. Bake at 350°F for 18 to 22 minutes. This recipe makes about 24 cupcakes.
Serving Suggestions
Classic yellow cake pairs best with chocolate buttercream frosting, and that combination is the standard birthday cake in most households for a reason. For something lighter, a vanilla bean buttercream or a whipped cream frosting works well in warmer months.
Serve with a glass of cold whole milk or a strong black tea. If you’re serving it as a celebration cake, add fresh berries between the layers alongside the frosting for a little color and acidity.
For a plated dessert, a warm slice with a small scoop of vanilla ice cream on the side is hard to argue with.
Storage
Room temperature: Store frosted or unfrosted cake covered (a cake dome or a large bowl inverted over the plate works) for up to 3 days. Keep it away from direct sunlight and heat.
Refrigerator: Place in an airtight container or cover tightly with plastic wrap for up to 5 days. Bring slices to room temperature for 20 to 30 minutes before eating; cold buttercream loses its texture and the crumb stiffens in the fridge.
Freezer: Unfrosted cake layers freeze well. Wrap each cooled layer tightly in plastic wrap, then in foil, and freeze for up to 3 months. Thaw overnight in the fridge still wrapped, then bring to room temperature before frosting.
Make-ahead: You can bake the layers up to 2 days ahead and store them wrapped at room temperature, or freeze them up to 3 months in advance. The chocolate buttercream keeps in the fridge for up to a week; bring it back to room temperature and re-beat briefly before using.
Allergen Information
This yellow cake contains dairy (butter, buttermilk), eggs, and gluten (all-purpose flour).
For a dairy-free version, use vegan butter (such as one made primarily from coconut or sunflower oil) and full-fat coconut milk in place of the buttermilk, using the same vinegar method described above.
For gluten-free baking, a 1-to-1 gluten-free flour blend with xanthan gum can be substituted at the same weight; texture may vary slightly. Always check that all other ingredients (including baking powder and vanilla extract) are certified gluten-free if serving someone with celiac disease.
This recipe is not suitable for someone with a severe egg allergy. Eggs are structurally essential here; there is no direct swap that produces the same result.
NOTE: Always check for cross-contamination risks based on your own kitchen setup and the specific brands you use. This recipe does not guarantee safety for anyone with a diagnosed allergy.
Nutrition (per serving, 1 of 12 slices, cake only, without frosting)
| Nutrient | Amount |
|---|---|
| Calories | ~380 kcal |
| Protein | 5g |
| Carbohydrates | 52g |
| Fat | 17g |
| Fiber | 1g |
| Sugar | 33g |
| Sodium | 190mg |
NOTE: Values are approximate estimates and may vary depending on specific ingredients and portion size. To be verified with exact ingredient brands using a nutrition calculator before publishing.
FAQ
Can I make this yellow cake ahead of time?
Yes. Bake the layers, let them cool completely, and wrap each one tightly in plastic wrap. They keep at room temperature for 2 days or in the freezer for up to 3 months. Frost on the day you plan to serve. The chocolate buttercream also keeps refrigerated for up to a week; re-beat it at room temperature before using.
Why did my yellow cake come out dry?
Dry yellow cake almost always comes down to one of three things: overbaking (even by 5 minutes), too much flour from packing the measuring cup, or cold butter that never properly creamed with the sugar. Pull the cake when a toothpick shows moist crumbs rather than waiting for it to come out completely clean, and measure flour by spooning and leveling or by weight.
Can I use salted butter instead of unsalted?
You can, though it changes the flavor noticeably and the salt level becomes harder to control. If you only have salted butter, reduce the salt in the recipe to ¼ teaspoon and taste the batter before baking. Some bakers actually prefer salted butter here for a more complex flavor.
What makes yellow cake yellow?
The color comes from whole eggs and butter. Recipes that use extra egg yolks (in addition to whole eggs) will produce a deeper golden crumb. No food coloring is needed. The yellow in boxed mixes often comes from artificial dyes (Yellow 5 and Yellow 6 are common), which is why homemade cakes sometimes look a little paler in comparison.
How do I know when the cake is done without a thermometer?
The three reliable cues: the edges pull slightly away from the pan sides, the top springs back when you press the center gently, and a toothpick inserted in the middle comes out with a few moist crumbs (not wet batter). All three together means it’s done. If only one or two of the three are present, give it another 2 to 3 minutes and check again.
Can I make this yellow cake into cupcakes?
Yes. Fill standard cupcake liners about two-thirds full and bake at 350°F for 18 to 22 minutes. The same doneness cues apply: a toothpick should come out with moist crumbs. This batter makes approximately 24 cupcakes.
Conclusion
A good yellow cake from scratch is not a complicated project. Get your butter and eggs to room temperature, cream the butter and sugar long enough to build real air into the mixture, and pull the cake from the oven before a toothpick comes out bone dry. Those three things matter more than anything else in the recipe. Once you have reliable layers, the frosting choice is yours, though chocolate buttercream on yellow cake is a combination that has lasted for very good reasons.

Moist Yellow Cake Recipe from Scratch
Ingredients
Equipment
Method
- Preheat oven to 350°F (175°C). Grease two 9-inch round pans, line with parchment, and grease again.
- Whisk flour, baking powder, and salt together in a medium bowl. Set aside.
- Beat room-temperature butter on medium speed for 2 minutes. Add sugar and beat for 3 more minutes until pale and fluffy.
- Add eggs one at a time, mixing until just incorporated after each. Add vanilla with the last egg.
- On low speed, alternate adding the flour mixture (3 additions) and buttermilk (2 additions), beginning and ending with flour. Mix only until each addition is incorporated.
- Divide batter evenly between the two prepared pans.
- Bake for 28 to 32 minutes, until a toothpick inserted in the center comes out with a few moist crumbs and the edges pull from the pan.
- Cool in pans for 10 minutes, then invert onto a wire rack. Peel off parchment. Cool completely before frosting, at least 30 minutes.
- For the buttercream: beat softened butter for 3 minutes on medium-high. Add sifted powdered sugar and cocoa on low in two additions. Add vanilla, salt, and milk one tablespoon at a time until spreadable.
- Frost cooled layers. Apply a thin crumb coat, refrigerate 15 minutes, then apply the final layer of frosting.
Notes
- Buttermilk substitute: 1 tablespoon white vinegar stirred into 1 cup whole milk, rested 5 minutes.
- Measure flour by spooning into the cup and leveling, or use grams (315g) to avoid a dry cake.
- Take butter and eggs out of the fridge at least 1 hour before baking.
- For cupcakes: fill liners two-thirds full, bake 18 to 22 minutes at 350°F. Makes about 24.
- For a 9×13 sheet cake: pour all batter in, bake 35 to 40 minutes.
- Calories: ~380 kcal
- Protein: 5g
- Carbohydrates: 52g
- Fat: 17g
- Fiber: 1g
- Sugar: 33g
- Sodium: 190mg
- Serving size: 1 slice
- Servings per recipe: 12
- Values are estimates. To be verified with a nutrition calculator before publishing.