The short answer: to bake a cake, heat the oven to 350°F, prepare two 9-inch pans, mix a creamed-butter batter with room-temperature ingredients, and bake 25 to 30 minutes until a toothpick comes out clean. Cool the layers completely before you frost them.
- Makes: one 2-layer 9-inch cake, 12 to 16 slices
- Time: 35 minutes of prep, 30 minutes in the oven, about 1 hour 10 minutes to cool
- Key rules: room-temperature ingredients, measure flour lightly, do not overmix
- Done test: a toothpick comes out clean and the top springs back
- Next step: save the recipe in the Family Recipe Binder ($6.99)
Prep time: 35 minCook time: 30 minTotal time: 2 hr 15 minServings: 12 to 16 slicesTotal includes 1 hr 10 min of cooling.
This page teaches the method that works for nearly any cake: pans, mixing, doneness, cooling and frosting. The recipe below is a basic vanilla butter cake. Once you have the method, move on to a specific cake like our chocolate cake, German chocolate cake, carrot cake or banana cake.
Equipment for baking a cake
- Two 9-inch round cake pans, at least 2 inches deep
- Parchment paper for lining the pan bottoms
- Large mixing bowl and an electric hand or stand mixer
- Measuring cups and spoons, ideally a kitchen scale
- Rubber spatula and a wire cooling rack
- Toothpicks or a cake tester
- An oven thermometer, because many ovens run hot or cool
Cake ingredients
| Ingredient | Amount | Tip |
|---|---|---|
| All-purpose flour | 2½ cups (300 g) | Spoon into the cup and level it off |
| Baking powder | 2½ teaspoons | Check the date; old powder does not lift |
| Salt | ½ teaspoon | Use ¼ teaspoon if your butter is salted |
| Unsalted butter, softened | ¾ cup (1½ sticks) | Soft enough to dent with a finger |
| Granulated sugar | 1¾ cups | |
| Eggs, room temperature | 3 large | |
| Vanilla extract | 1 tablespoon | |
| Whole milk, room temperature | 1 cup |
Buttercream ingredients
| Ingredient | Amount | Tip |
|---|---|---|
| Unsalted butter, softened | 1 cup (2 sticks) | |
| Powdered sugar | 4 cups | Sift if it is lumpy |
| Whole milk or heavy cream | 3 to 4 tablespoons | Add 1 tablespoon at a time |
| Vanilla extract | 2 teaspoons | |
| Salt | 1 pinch | Balances the sweetness |
Directions
- Heat the oven to 350°F with a rack in the center. Grease two 9-inch round pans, line the bottoms with parchment, then grease the paper.
- Whisk the flour, baking powder and salt in a bowl and set it aside.
- In a large bowl, beat the butter and sugar with a mixer on medium speed for 3 minutes, until pale and fluffy.
- Beat in the eggs one at a time, mixing 30 seconds after each, then beat in the vanilla.
- On low speed, add the flour mixture in 3 parts, alternating with the milk in 2 parts, starting and ending with flour. Mix only until no dry flour is visible.
- Divide the batter evenly between the pans and tap each one on the counter twice to pop large bubbles.
- Bake 25 to 30 minutes, until the tops are light golden, spring back when pressed and a toothpick in the center comes out clean.
- Cool the cakes in the pans for 10 minutes, run a knife around the edges and turn them onto a wire rack. Cool at least 1 hour, until completely cool to the touch.
- For the frosting, beat the butter for 2 minutes until creamy. Add the powdered sugar 1 cup at a time on low speed, then the vanilla, salt and 3 tablespoons of milk. Beat 2 minutes on medium until fluffy, adding more milk 1 tablespoon at a time if it is too stiff.
- Set one layer on a plate, spread about 1 cup of frosting on top, add the second layer bottom-side up and frost the top and sides. Chill for 15 minutes to set before slicing.
Nutrition (per serving, estimated)
Serving size: 1 slice (1/12 of the recipe).
| Calories | 640 |
|---|---|
| Total fat | 29 g |
| Saturated fat | 18 g |
| Cholesterol | 120 mg |
| Total carbohydrate | 91 g |
| Dietary fiber | 1 g |
| Total sugars | 70 g |
| Protein | 5 g |
Excludes ingredients listed without an amount (to taste, for serving, for the pan). Sodium is not shown because salt or salty items are added to taste.
This is an estimate calculated from USDA FoodData Central data for the listed ingredients and amounts. Actual values vary with brands, portions and substitutions.
Do not taste the raw batter. The FDA notes that raw flour can carry harmful bacteria until it is baked, and the batter also has raw eggs.
Rate this recipe
Baking a cake: the rules that matter
- Room-temperature ingredients. Cold eggs and milk make creamed butter seize and the batter look curdled.
- Measure flour lightly. Spoon it into the cup and level it, or weigh it. Scooping packs in extra flour and dries the cake.
- Cream the butter and sugar fully. Three minutes builds the air that makes the crumb tender.
- Stop mixing once the flour goes in. Overmixing makes a tough, tunneled cake.
- Use the oven's center rack and do not open the door during the first 20 minutes.
- Check the temperature. An oven thermometer shows whether your oven is really at 350°F.
- Trust the test, not the timer. Start checking 3 to 5 minutes early.
Pan sizes and bake times
| Pan | Batter | Bake at 350°F |
|---|---|---|
| Two 9-inch round pans | Split evenly | 25 to 30 minutes |
| Two 8-inch round pans | Split evenly | 28 to 35 minutes |
| 9x13 pan | Full recipe | 35 to 40 minutes |
| Cupcakes | Fill liners ⅔ full, about 24 | 18 to 22 minutes |
Fill pans no more than ⅔ full. For a 9x13 cake, make the frosting as written and use it for the top only. For three layers, use three 8-inch pans.
Signs a cake is done
- A toothpick in the center comes out clean or with a few dry crumbs.
- The top springs back when lightly pressed.
- The edges just begin to pull away from the pan.
- The surface is set, not glossy or wobbly.
Fix common cake problems
| Problem | Likely cause | Fix next time |
|---|---|---|
| Sunk center | Door opened early, underbaked or oven too cool | Keep the door shut and use the toothpick test |
| Dry cake | Too much flour or overbaking | Spoon and level the flour; check early |
| Dense cake | Overmixing or old baking powder | Mix until just combined; replace the powder |
| Domed top | Oven too hot | Check with a thermometer |
| Stuck to the pan | Pan not greased and lined | Grease, line with parchment and grease again |
| Crumbly frosting | Cake still warm | Cool the layers completely |
Frosting a cake: the basics
- Level the layers with a serrated knife if the tops are domed.
- Put a dab of frosting on the plate so the bottom layer stays put.
- Spread a thin crumb coat over the whole cake and chill it 15 minutes.
- Add the final coat with an offset spatula or the back of a spoon.
For other flavors, our cream cheese frosting uses the same method, and our vanilla buttercream pipes clean borders. For decorating, see royal icing.
New to baking in general? Our easy baking recipes give you simple bakes to practice on. Butter, eggs and sugar add up, so see how to grocery shop on a budget before a big bake.
Store, freeze and make ahead
- Buttercream-frosted cake: cover it and keep it at room temperature for 1 to 2 days. If it has cream cheese frosting, cream or fresh fruit, refrigerate it; FoodSafety.gov's cold storage chart lists safe refrigerator times.
- Unfrosted layers: wrap each well and keep at room temperature for 1 day.
- Freeze: wrap the cooled, unfrosted layers in plastic and foil and freeze for up to 3 months. Thaw them wrapped, at room temperature, then frost.
- Make ahead: bake the layers a day early and frost on the day.
How to bake a cake: questions
How do you bake a cake from scratch?
Heat the oven to 350°F, prepare two 9-inch pans, cream butter and sugar, beat in eggs and vanilla, alternate flour and milk, divide the batter and bake 25 to 30 minutes. Cool the layers completely before frosting.
How long do you bake a cake at 350°F?
Two 9-inch layers bake 25 to 30 minutes at 350°F, a 9x13 cake 35 to 40 minutes and cupcakes 18 to 22 minutes. Start checking early.
How do you know when a cake is done?
A toothpick in the center should come out clean or with a few dry crumbs, and the top should spring back when pressed. Wet batter on the toothpick means it needs more time.
Why did my cake sink?
A cake sinks when the oven door is opened early, the oven is too cool, the batter is overmixed or the cake is underbaked. Keep the door closed for the first 20 minutes and use the toothpick test.
Can I use cake flour instead of all-purpose flour?
Cake flour gives a softer crumb, but it is measured differently from all-purpose flour. This recipe is written for all-purpose flour, so weigh any substitute rather than swapping by the cup.
Plan the bake

Write down your pan, bake time and any changes so the next cake comes out the same.
- Family Recipe Binder, $6.99. Recipe cards and dividers to keep this cake with your family's favorites.
For a fat-free foam cake made with egg whites, see our angel food cake recipe. More dessert ideas are in our Thanksgiving desserts and Christmas desserts roundups. Browse all our Printables.
More cakes and frostings you'll love
Frequently asked questions
How do you bake a cake from scratch? To bake a cake from scratch, heat the oven to 350°F, grease and line two 9-inch pans, cream butter and sugar, beat in eggs and vanilla, alternate the flour mixture with milk, divide the batter between the pans and bake 25 to 30 minutes until a toothpick comes out clean. Cool the layers completely before frosting.
How long do you bake a cake at 350°F? A two-layer cake in 9-inch pans bakes at 350°F for 25 to 30 minutes, a 9x13 cake for 35 to 40 minutes and cupcakes for 18 to 22 minutes. Start checking a few minutes early, because ovens and pans vary.
How do you know when a cake is done? A cake is done when a toothpick in the center comes out clean or with a few dry crumbs, the top springs back when lightly pressed and the edges pull slightly from the pan. Wet batter on the toothpick means it needs more time.
Why did my cake sink in the middle? A cake usually sinks because the oven door was opened early, the oven was too cool, the batter was overmixed or the cake was underbaked. Keep the door closed for the first 20 minutes, check your oven temperature with an oven thermometer and use the toothpick test before removing the cake.
Should cake ingredients be room temperature? Yes. Room-temperature butter, eggs and milk blend into a smooth batter that traps air, which gives a lighter crumb. Butter should be soft enough to dent with a finger but not greasy or melted.
How long should a cake cool before frosting? Cool cake layers in the pan for 10 minutes, then on a wire rack until completely cool to the touch, about 1 hour. Frosting a warm cake melts the buttercream and makes the layers slide.
Can I use butter or oil in a cake? Butter gives a cake flavor and a fine, tender crumb when it is creamed with sugar, while oil keeps a cake moist for longer. This basic cake uses butter; for an oil-based cake see our chocolate cake recipe.
How do you store a frosted cake? Store a buttercream-frosted cake covered at room temperature for 1 to 2 days, or refrigerate it if the frosting or filling contains cream cheese, fresh cream or fruit. FoodSafety.gov's cold storage chart lists safe refrigerator times for perishable foods.
Newsletter
Get the HomeBase email
Fresh tips three times a week, Mon/Wed/Fri, with our deals and new products, from printables, spreadsheets and bundles to paperback planners and apparel, plus simple home, money and planning tips.








Made this? Tell us how it went
Your notes help the next cook: what you changed, how long it took, how it turned out.