A homemade layer cake has a way of turning an ordinary Tuesday into an occasion. The best ones are tall, tender, and so moist that a fork glides through each slice. The worst ones are dry, crumbly, and need a big glass of milk to get down. The gap between them is rarely talent. It comes down to a few choices about ingredients, mixing, temperature, and timing that anyone can learn.
This guide takes you through a classic two-layer cake from the first measurement to the last swirl of frosting. You will learn why each ingredient matters, how to mix batter so it stays tender, how to prepare pans and judge doneness, and how to level, fill, and frost the cake neatly. There is also a troubleshooting section for the usual problems and a set of answers to the questions people ask most.
Key takeaways
- Moisture comes from fat, sugar, and liquid, and from not overbaking. Even one extra flour scoop or five extra minutes in the oven can dry a cake out.
- Bring butter, eggs, and milk to room temperature, about 65 to 70 degrees F (18 to 21 C), so they blend into a smooth emulsion.
- Weigh ingredients if you can. Measure flour by spooning it into the cup and leveling it.
- Mix the flour in only until combined. Overmixing builds gluten and makes cakes tough.
- Bake at 350 degrees F (175 C) and check early. A toothpick should come out with a few moist crumbs, not wet batter and not completely clean.
- Cool layers in the pan for 10 to 15 minutes, then turn out onto a rack and cool completely before frosting.
- Cakes contain common allergens: wheat, eggs, and milk, and often soy or nuts.
The Science of a Moist Cake
When people say a cake is moist, they usually mean three things at once: it contains enough water and fat, it holds on to them during baking and storage, and its crumb is tender enough that it does not feel dry in the mouth. You can influence all three.
Fat
Butter gives flavor, oil gives a lasting soft texture. Because oil is liquid at room temperature, cakes made with oil often stay moist longer on the counter and even when chilled, while butter cakes can firm up in the refrigerator. Many bakers combine the two: butter for flavor and oil for tenderness. Fat coats flour proteins and shortens gluten strands, which is where the word shortening comes from.
Sugar
Sugar holds water. A cake with too little sugar bakes up dry and pale. Sugar also helps trap air when creamed with butter, and it caramelizes at the crust. Do not reduce sugar by more than a tablespoon or two per cup without expecting a drier, tougher result.
Liquid
Milk, buttermilk, sour cream, and yogurt all add moisture. Acidic dairy such as buttermilk also softens the crumb and works with baking soda for lift. If you do not have buttermilk, you can stir 1 tablespoon of lemon juice or white vinegar into a cup of milk and let it stand for 5 to 10 minutes, though real buttermilk gives a better flavor.
Flour
Flour is the structure. Too much, and the cake is dry and dense. Cake flour, with lower protein, makes a finer, softer crumb than all-purpose flour. If you only have all-purpose, you can approximate cake flour. For each cup, remove 2 tablespoons of flour and replace it with 2 tablespoons of cornstarch, then sift it together a few times.
Eggs
Eggs add structure, richness, and moisture. Yolks contribute fat and emulsifiers that make the crumb tender. An extra yolk is a simple way to enrich a cake. Whole eggs set the structure, so too many make the cake rubbery.
Leaveners
Baking powder and baking soda produce the gas that lifts the cake. Both lose strength with age, so check the date and test them if they have been open a long time. Too much leavener makes a cake rise fast and then collapse, with a coarse, crumbly texture.
Salt and vanilla
A small amount of salt keeps a cake from tasting flat. Real vanilla extract gives depth. Neither affects moisture, but both change how sweet and rich the cake tastes.
A Dependable Vanilla Layer Cake Recipe
This recipe makes two 9 inch (23 cm) round layers, enough for 12 to 16 slices. It uses butter and oil together and buttermilk for tenderness.
Ingredients
- 2 1/2 cups (300 g) cake flour, or 2 1/4 cups (270 g) all-purpose flour plus 1/4 cup (30 g) cornstarch in place of the cake flour
- 2 1/2 teaspoons baking powder
- 1/2 teaspoon baking soda
- 3/4 teaspoon salt
- 1/2 cup (113 g, 1 stick) unsalted butter, softened
- 1/4 cup (60 ml) neutral oil
- 1 3/4 cups (350 g) granulated sugar
- 3 large eggs plus 1 egg yolk, at room temperature
- 2 teaspoons pure vanilla extract
- 1 cup (240 ml) buttermilk, at room temperature
The recipe above uses all-purpose flour with cornstarch if you do not have cake flour. If you do use all-purpose, replace 1/4 cup (30 g) of the 2 1/2 cups with cornstarch, which gives the same total weight as the cake flour.
Equipment
- Two 9 inch (23 cm) round cake pans, at least 2 inches (5 cm) deep
- Parchment paper
- Electric mixer (hand or stand) or a strong arm and a whisk
- Mixing bowls, a rubber spatula, and a whisk
- A wire rack
- An oven thermometer
- A long serrated knife for leveling
Step-by-Step Method
Step 1: Set up (20 minutes before mixing)
- Take the butter, eggs, and buttermilk out of the refrigerator at least 45 to 60 minutes ahead. To warm eggs quickly, set them in a bowl of warm water for 10 minutes.
- Place a rack in the center of the oven and preheat to 350 degrees F (175 C). Confirm the real temperature with an oven thermometer.
- Grease the pans with butter or baking spray. Trace the bottoms on parchment, cut out two circles, and press them into the pans. Grease the parchment lightly. Dust the sides with flour and tap out the extra.
Pan prep is not fussy for no reason. Parchment on the bottom guarantees the cake releases cleanly. A layer that sticks is nearly impossible to fix.
Step 2: Mix the dry ingredients
Whisk the flour, baking powder, baking soda, and salt together in a medium bowl. If your flour is lumpy, sift it. This distributes the leavening evenly, so one part of the cake will not rise more than another.
Step 3: Cream the butter and sugar
In a large bowl, beat the butter, oil, and sugar on medium speed for 3 to 4 minutes until the mixture is pale, light, and fluffy. Stop once or twice to scrape the sides and bottom of the bowl. The sugar crystals cut tiny air pockets into the fat. These pockets expand in the oven and give the cake its rise and soft crumb.
Step 4: Add eggs and vanilla
Add the eggs and the extra yolk one at a time, beating about 30 seconds after each. Add the vanilla. The batter should look smooth and glossy. If it looks curdled, the ingredients were probably too cold. It will usually come back together once the flour goes in.
Step 5: Alternate dry ingredients and buttermilk
With the mixer on low, add about one third of the dry ingredients, then half of the buttermilk, another third of the flour, the rest of the buttermilk, and finish with the last of the flour. Mix only until the last streaks of flour disappear. Scrape the bowl and give the batter two or three folds with a spatula by hand.
The alternation matters. Adding the dry and wet ingredients in turns lets the batter absorb liquid without developing too much gluten. Starting and ending with flour prevents the batter from becoming too loose.
Step 6: Fill the pans
Divide the batter evenly between the pans. For accuracy, weigh the pans on a kitchen scale, which also ensures the layers bake in the same time. Smooth the tops with a spatula. Tap each pan firmly on the counter two or three times to release large air bubbles.
Step 7: Bake
Bake for 28 to 35 minutes. Start checking at 25 minutes. Resist opening the oven door in the first 20 minutes, since a rush of cool air can make the center sink.
The cake is done when the top springs back when pressed lightly, the edges have just begun to pull from the sides, and a toothpick inserted in the center comes out with a few moist crumbs clinging to it. Wet batter means it needs more time. A perfectly clean toothpick means it is probably already a touch overdone. If you have an instant-read thermometer, the center should read about 205 to 210 degrees F (96 to 99 C).
Step 8: Cool
Set the pans on a wire rack for 10 to 15 minutes. Run a thin knife around the edges, flip each layer out onto the rack, peel off the parchment, and turn them right side up. Cool completely, about 1 to 2 hours, before frosting. A warm cake will melt frosting and tear as you spread it.
For extra moisture, wrap the cooled layers in plastic wrap and chill them for 30 to 60 minutes. Cold cakes are firmer and easier to level and frost. You can also freeze wrapped layers for up to 2 to 3 months and thaw them in the refrigerator overnight.
Optional step: Brush with simple syrup
To add moisture, heat equal parts sugar and water until the sugar dissolves, then cool it completely. Brush a thin layer over the cut surfaces of each layer, using about 2 to 3 tablespoons per layer. Do not soak the cake. A thin coat is enough to add moisture and keep the crumb tender for days.
A Simple Vanilla Buttercream
Ingredients
- 1 1/2 cups (340 g, 3 sticks) unsalted butter, softened but still cool
- 5 to 6 cups (600 to 720 g) powdered sugar, sifted
- 1/4 cup (60 ml) heavy cream or milk, plus more if needed
- 2 teaspoons pure vanilla extract
- 1/4 teaspoon salt
Method
- Beat the butter alone for 3 to 4 minutes until pale and creamy.
- Add 4 cups of the powdered sugar on low speed, then increase the speed to medium and mix for 2 minutes.
- Add the cream, vanilla, and salt. Beat for 2 to 3 minutes until light and fluffy.
- Add more sugar to thicken or a teaspoon of cream to loosen.
This buttercream is made with butter and cream, so it is perishable. Frosted cakes should not sit out for more than 2 hours, or 1 hour in a warm room above 90 degrees F (32 C), and cakes with cream cheese, whipped cream, or custard fillings belong in the refrigerator.
Assembling and Frosting the Cake
Level the layers
If your layers have domed tops, use a long serrated knife to slice off the peak so the layer is flat. Hold the knife level and saw gently with the layer on a turntable or flat board, turning it as you go. Save the scraps. They make a fine snack for the baker.
Fill
Place the first layer on a cake board or plate, cut side up. Spread about 3/4 to 1 cup of frosting evenly over the top, almost to the edge. For a softer filling, such as jam or lemon curd, pipe a ring of frosting around the edge to act as a dam, then fill the center. Place the second layer upside down, so that its flat bottom becomes the top of the cake.
Crumb coat
Spread a thin layer of frosting over the whole cake to trap loose crumbs. It does not need to look nice. Chill the cake for 20 to 30 minutes until the frosting firms up.
Final coat and finishing
Cover the cake with a thicker, smooth layer of frosting. Use an offset spatula or a bench scraper, and dip it in hot water and wipe it dry for a smoother finish. If you would rather skip perfection, make soft swoops with the back of a spoon. Decorate with sprinkles, fruit, or nothing at all.
Why Your Cake Might Not Turn Out Moist
Overbaking
The leading cause of dry cake. Most home ovens run hot or cold, and even a few degrees off can dry a cake in a few minutes. Use an oven thermometer, check for doneness early, and pull the cake as soon as a toothpick shows a few moist crumbs.
Too much flour
Packing the flour into the cup can add an extra 1/2 cup (60 g) or more to a recipe. Spoon and level, or weigh.
Overmixing
Mixing after the flour goes in develops gluten, which makes cakes tough, dry, and tunneled. Stop as soon as the batter is smooth.
Cold ingredients
Cold eggs or buttermilk can cause the butter to seize into lumps, which gives an uneven, dense crumb. Room-temperature ingredients combine into a smooth batter that traps more air.
Not enough fat or sugar
Cutting back too much to make the cake healthier can dry it out. If you want to lighten a recipe, do it in small steps and expect a different texture.
Poor storage
A cake left uncovered goes stale quickly. Wrapping cooled layers tightly, frosting soon after, and covering the finished cake all help it stay moist.
Fixing Common Cake Problems
| Problem | Likely cause | Fix |
|---|---|---|
| Dry, crumbly cake | Overbaked, too much flour | Weigh flour, check early, brush with syrup |
| Sunken center | Underbaked, oven door opened early, too much leavener | Bake longer, keep the door closed, measure carefully |
| Tall dome with a crack | Oven too hot | Lower the oven temperature and use an oven thermometer |
| Dense, heavy cake | Overmixed, cold ingredients, old leavener | Mix gently, use room-temperature ingredients, replace leaveners |
| Gummy streak at the bottom | Underbaked or batter not mixed evenly | Scrape the bowl, bake until the center is done |
| Cake stuck to the pan | Pan not prepped well | Use parchment and grease the pan thoroughly |
| Tunnels and holes | Overmixing | Fold gently, tap pans on the counter |
| Dark, tough edges | Dark pans or high heat | Use light-colored pans or lower the temperature by 25 degrees F (14 C) |
Pan Sizes and Baking Times
If you need a different shape, here are rough guides. Always start checking early, and check by feel rather than time alone.
- Three 8 inch (20 cm) rounds: 22 to 28 minutes at 350 degrees F (175 C). Thinner layers bake faster.
- Two 8 inch (20 cm) rounds: 35 to 40 minutes. The layers will be taller.
- 9 by 13 inch (23 by 33 cm) sheet cake: 30 to 38 minutes.
- Cupcakes, standard size: 18 to 22 minutes. This recipe makes about 24.
- Bundt or tube pan, 10 cups: 45 to 55 minutes.
Fill pans a little over half full. If you fill them higher, the batter can overflow and the cake may sink or bake unevenly.
Flavor Variations
Chocolate layer cake
Replace 1/2 cup (about 45 g) of the flour with unsweetened cocoa powder, and use hot coffee or hot water in place of half of the buttermilk, which deepens the chocolate flavor and keeps the cake moist. Sift the cocoa to avoid lumps.
Lemon cake
Add the finely grated zest of 2 lemons to the sugar and rub it in with your fingers before creaming. Replace 2 tablespoons of the buttermilk with fresh lemon juice. Fill with lemon curd.
Almond or citrus-vanilla
Use 1 teaspoon of vanilla and 1/2 teaspoon almond extract, or add orange zest. If you add nuts or almond flavor, label the cake for guests with nut allergies.
Berry cake
Toss 1 cup of fresh or frozen berries in a spoonful of flour and fold them into the batter at the end. Frozen berries should not be thawed first, and bake time may increase by 5 to 8 minutes.
Make-Ahead, Storage, and Food Safety
Cake layers can be baked 1 to 2 days ahead, cooled fully, wrapped tightly in plastic, and stored at room temperature. For longer storage, freeze for up to 3 months. Thaw wrapped layers in the refrigerator or on the counter.
A cake frosted with butter-based buttercream can sit at room temperature for a day or two in a cool home, under a cover, but follow the 2-hour rule when it is out on display. Cakes with cream cheese frosting, whipped cream, pastry cream, or fresh fruit fillings should be refrigerated, and leftovers eaten within 3 to 4 days. Bring slices to room temperature for 20 to 30 minutes before serving, since cold butter makes cake taste drier.
Raw eggs and raw flour can carry harmful bacteria, so avoid tasting the batter. If your recipe uses a meringue or other frosting made with raw or lightly cooked egg whites, use pasteurized eggs or cook them to 160 degrees F (71 C).
Allergens
Cakes commonly contain wheat, eggs, milk, soy (in some butters, margarines, and chocolate), and tree nuts or peanuts in variations. If you are baking for a group, ask about allergies and label the cake clearly. Washing bowls, pans, and utensils well between batches helps limit cross-contact.
Common Mistakes
- Skipping the room-temperature step. Cold ingredients break the batter.
- Measuring flour by scooping. It packs in too much.
- Opening the oven door too soon. It can make the cake collapse.
- Overbaking by relying only on the timer. Check with a toothpick and a gentle touch.
- Frosting warm layers. The frosting melts and the cake tears.
- Skipping the crumb coat. You end up with crumbs in the final frosting.
- Using old baking powder. The cake will not rise properly.
- Using different pan sizes than the recipe. Baking times and results change.
- Not leveling the layers. The stacked cake can lean or crack.
- Serving too cold. Chilled cake tastes drier and firmer.
When to Call a Professional
- Oven trouble. If the oven cannot hold temperature, is off by more than 50 degrees F (28 C), or shows signs of electrical or heating problems, call a qualified appliance technician.
- Gas smell. If you smell gas, do not turn on the oven or use switches. Leave the home and call your gas utility or emergency services from outside.
- Allergic reactions. Swelling, hives, vomiting, or trouble breathing after eating cake need emergency care. See a doctor or allergist if you suspect a food allergy.
- Wedding or large-event cakes. Multi-tier cakes need dowels, structure, and transport planning. Hire an experienced baker if you are not comfortable with that scale.
- Selling cakes. Check your state’s cottage food laws and labeling rules before selling.
Frequently Asked Questions
Can I use all-purpose flour instead of cake flour?
Yes. Replace 2 tablespoons of each cup of all-purpose flour with cornstarch and sift together. The cake will be a little less delicate than with true cake flour, but still tender.
Should I use butter, oil, or both?
Butter gives flavor and oil gives lasting moisture. Using both is a good compromise. A cake made entirely with oil is very moist but lacks buttery flavor, while an all-butter cake has great flavor but firms up when chilled.
How do I know when the cake is done without a thermometer?
Look for edges just starting to pull away from the pan, a top that springs back when lightly pressed, and a toothpick with a few moist crumbs. If the toothpick has wet batter, bake a few more minutes.
Why did my cake sink in the middle?
Common causes are underbaking, opening the oven too early, too much leavener, or too much liquid. Keep the oven door closed for at least the first 20 minutes, and measure leaveners precisely.
Can I make the batter ahead of time?
Not really. Baking powder starts working once it is wet, so batter left standing loses lift. Bake soon after mixing. You can, however, bake the layers a day or two ahead and store them wrapped.
How do I keep the cake from doming?
Lower the oven to 325 degrees F (165 C) and bake a bit longer, or wrap the pans with damp cake strips, which slow edge baking. You can also just trim the dome when leveling.
Can I substitute milk for buttermilk?
Yes, with a little acid. Stir 1 tablespoon of lemon juice or white vinegar into 1 cup of milk, let it sit for 5 to 10 minutes, and use it as buttermilk. Because the cake has baking soda, some acid is needed for proper lift.
How long does a homemade layer cake stay fresh?
A buttercream-frosted cake keeps for about 2 days at cool room temperature under a cover, and 3 to 4 days in the refrigerator. Cakes with cream cheese frosting or perishable fillings should always be refrigerated.
Bake It Once, Then Make It Yours
The first time you make a layer cake, follow the recipe as written and take a few notes on what you notice: how the batter looked, when the cake was done, how the crumb felt. The second time, change one thing, maybe the flavor, maybe the pan size. By the third cake you will have your own house recipe and an instinct for the batter. And there is real satisfaction in setting a cake you made from scratch on the table and watching everyone go quiet for the first bite.