Yellow Cake Recipe: Soft Homemade Butter Cake From Scratch
A good yellow cake recipe needs only flour, butter, sugar, eggs and milk. It makes a tender, buttery cake that works for birthdays, cupcake-style snacking or a layer cake with any frosting. The recipe below makes two 20 cm round layers and uses metric units and Celsius throughout.
A note on the numbers: the quantities are built from the proportions of well-known from-scratch yellow cakes, converted to metric. The bake time is an estimate, because layer-pan timings vary by oven. Check the cake early and use the doneness tests below rather than trusting the clock.
Yellow Cake Recipe: Ingredients, Pan Size and Timings
Yield: two 20 cm (8-inch) round layers, about 12 slices Prep time: about 20 minutes Bake time: about 25-30 minutes (estimate) Cooling: at least 1 hour before frosting Total time: about 2 hours (estimate)
Ingredients
- 270 g plain (all-purpose) flour
- 10 g baking powder (2 level teaspoons)
- ½ teaspoon fine salt
- 140 g unsalted butter, softened
- 200 g granulated sugar
- 3 large eggs
- 2 teaspoons vanilla extract
- 240 ml whole milk
- Butter or oil and baking parchment for the pans
The yellow colour comes mainly from the butter and the egg yolks. You don't need food colouring.
Equipment
- Two 20 cm round cake pans with bottoms lined with parchment
- Electric mixer or a strong arm and a wooden spoon
- Oven thermometer (many ovens run 10-20° off, so this is worth having)
- Skewer or toothpick
Step-by-Step Method for a Tender Yellow Butter Cake
- Prepare. Heat the oven to 175°C. Grease the pans, line the bottoms with parchment, and put the rack in the middle. Take the eggs and milk out of the fridge so they aren't ice-cold. Not every ingredient has to be at room temperature, but a batter made with fridge-cold milk and eggs tends to mix less smoothly.
- Check the butter. Softened butter should bend without breaking and feel cool to the touch, about 18-20°C. If it is greasy or shiny, it's too warm.
- Mix the dry ingredients. Whisk the flour, baking powder and salt together in a bowl. Level the baking powder carefully, since too much makes the cake rise fast and then collapse.
- Cream the butter and sugar. Beat them for 3-4 minutes until pale and fluffy. Scrape down the bowl.
- Add the eggs. Beat them in one at a time, then mix in the vanilla. If the mixture looks slightly curdled, carry on. It will come together once the flour goes in.
- Alternate flour and milk. Add a third of the flour mixture and mix on low speed. Add half the milk, then another third of flour, the rest of the milk, and finish with the last of the flour. Stop as soon as the dry streaks disappear. Overmixing is a common cause of dense cake.
- Fill the pans. Divide the batter evenly (weigh the pans if you want matching layers), smooth the tops and tap each pan gently on the counter.
- Bake. Bake for about 25-30 minutes. Don't open the oven door in the first 20 minutes, because opening it can drop the temperature by 10-20°C. The cake is done when a toothpick or skewer comes out clean or with a few dry crumbs and the top springs back lightly.
- Cool. Leave the layers in their pans for about 10 minutes, then turn them out onto a rack and peel off the parchment. Cool them completely before filling or frosting.
Troubleshooting: Dense, Sunken, Dry or Domed Cake, and Doneness Checks
These are the most common causes reported by baking sources. They are not absolute rules, so use them as a checklist.
Dense cake
- The wrong flour, too much flour (scoop-and-pack measuring adds more than you think, so weigh it), or overmixing after the flour goes in.
- Very cold ingredients that didn't blend smoothly.
- Opening the oven door early. See common cake baking mistakes and fixes for more.
Sunken middle
- Too much baking powder is the most consistent culprit across sources. Cakes sink when gas bubbles expand faster than the starch and egg proteins can set, which is why a fast rise followed by a collapse is such a classic pattern. This explainer from Profiterole covers the mechanism.
- Underbaking, or an oven door opened too soon.
- An inaccurate oven. Check it with a thermometer.
Dry cake
- Overbaking is the usual reason, so start checking at the early end of the range.
- Too much flour has the same effect as in a dense cake.
- A light brush of simple syrup on the cooled layers helps (see the frosting section).
Domed or uneven top
- A very hot oven tends to set the edges before the centre finishes rising, so verify your temperature.
- Repeated uneven rising on one side points to hot spots or pan position. Rotate the pans halfway through, but only after the first 20 minutes.
- Pan size matters too. A wider pan means a thinner layer that bakes faster, so adjust the timing if you swap pans.
If the cake is underbaked Return it to the oven at 10°C lower for another 10-15 minutes. Check with a skewer. You want moist crumbs, not wet batter. This is blog-level guidance, so use it as a rescue and not a plan.
Substitutions, Storage and Food Safety
Substitutions
- Cake flour: this recipe works with plain flour, but low-protein flour (about 7-9% protein) suits cakes well. If you want a softer crumb, a common home swap is to replace some of the flour with cornstarch. For this recipe that is about 30-35 g of the 270 g flour. It is a cup-based approximation, and two sources describe it in slightly different quantities.
- Milk and butter: we haven't found reliable evidence for swaps such as buttermilk, oil or plant-based butter in this particular formula. If you try one, expect the texture to change and bake a small test batch first.
- Salted butter: if that's all you have, reduce or skip the added salt.
Storage
We don't have sourced shelf-life figures for this cake, so here is general guidance. Cool the cake completely, then keep unfrosted layers wrapped airtight. A frosting or filling made with cream, custard or other perishable ingredients changes the rules, so store the cake in the fridge.
Bacteria multiply fastest between 4°C and 60°C. According to FDA/FoodSafety.gov guidance cited by VanillaGoods, perishables should be refrigerated within 1 hour when the ambient temperature is above 32°C. Egg-based dishes should reach 71°C. That applies to custard fillings, not to the baked cake.
Raw flour and egg safety
Don't taste the batter. According to the CDC, raw flour and raw eggs can carry harmful germs, and grinding and bleaching don't kill them. The CDC has linked outbreaks to raw flour or cake mix in 2016, 2019, 2021 and 2023. Wash your hands, bowls and surfaces after handling flour or eggs.
Frosting and Decorating Your Yellow Cake
Vanilla buttercream, chocolate ganache, whipped cream and fresh berries all go well with yellow cake. Whatever you choose, make sure the layers are fully cool first. A warm cake melts the frosting.
For a moister cake, make a simple syrup: dissolve 100 g sugar in 120 ml water, which gives about 220 g, enough to brush two 20-23 cm layers lightly. Cool it for about 30 minutes, then brush it onto the cooled cake. Leftover syrup keeps in a covered jar in the fridge for about 2 weeks, according to one baking blog.
If the cake will sit out for a party, keep cream-based frostings and fillings in the fridge until close to serving time.
Homemade yellow cake is lovely with simple decoration. If you need sharp edges, piped details or a themed design, that is a different skill set from baking the sponge. For a celebration where the look matters as much as the taste, you can see finished examples on the ТартаЛєнка cakes page or order a custom cake in Poltava.
FAQ
Can I make yellow cake without cake flour?
Yes. This recipe is written for plain (all-purpose) flour. For a softer crumb, replace about 30-35 g of the flour with cornstarch. This is a common approximation, not a tested guarantee.
Why did my yellow cake sink in the middle?
The usual causes are too much baking powder, an underbaked centre, or opening the oven door too early. Cakes sink when gas expands faster than the structure can set. Measure the baking powder with level spoons, check your oven temperature with a thermometer, and wait until the last 5-10 minutes to open the door.
How do I know the cake is done?
A skewer inserted in the centre should come out clean or with a few dry crumbs, and the top should spring back lightly when pressed. Start checking at about 25 minutes.
Is it safe to taste the batter?
No. Raw flour and raw eggs can both carry harmful germs, and the CDC advises against eating raw batter.
Can I bake this in a different pan?
Yes, but adjust the timing. A wider pan makes a thinner layer that usually bakes faster, and a deeper pan takes longer. Check early and use the skewer test.