Basic Yellow Cake Recipe for Cakes and Cupcakes
In this article
This classic yellow cake is moist, tender, and rich with buttery flavor—perfect for birthdays, layer cakes, or a batch of cupcakes. The recipe uses simple ingredients and a reliable creaming method, giving you a sturdy yet soft crumb that holds up to frosting and stacking. Whether you bake it as two 9-inch layers or 24 cupcakes, this is the go-to yellow cake you'll make again and again.
Ingredients
- 2 1/2 cups (300g) all-purpose flour
- 2 1/2 teaspoons baking powder
- 1/2 teaspoon salt
- 3/4 cup (1 1/2 sticks, 170g) unsalted butter, softened
- 1 3/4 cups (350g) granulated sugar
- 3 large eggs, at room temperature
- 1 tablespoon vanilla extract
- 1 1/4 cups (300ml) buttermilk, at room temperature
Instructions
- Preheat your oven to 350°F (175°C). Grease and flour two 9-inch round cake pans, or line two 12-cup muffin tins with paper liners.
- In a medium bowl, whisk together the flour, baking powder, and salt. Set aside.
- In a large bowl, using an electric mixer, beat the butter and sugar on medium speed until light and fluffy, about 3–4 minutes. Scrape down the sides of the bowl as needed.
- Add the eggs one at a time, beating well after each addition. Beat in the vanilla extract.
- With the mixer on low speed, add the flour mixture in three additions, alternating with the buttermilk in two additions, starting and ending with the flour. Mix just until combined—do not overmix.
- Divide the batter evenly between the prepared pans or cupcake liners. For cakes, fill each pan about 2/3 full. For cupcakes, fill each liner about 2/3 full.
- Bake cakes for 25–30 minutes, or cupcakes for 18–22 minutes, until a toothpick inserted in the center comes out clean or with a few moist crumbs.
- Let cool in the pans for 10 minutes, then turn out onto wire racks to cool completely before frosting.
Tips
- Room temperature ingredients: Butter, eggs, and buttermilk should be at room temperature for a smooth, evenly mixed batter. Cold ingredients can cause the batter to curdle or result in a dense cake.
- Don't overmix: Once you add the flour, mix just until no streaks remain. Overmixing develops gluten, making the cake tough.
- Buttermilk substitute: If you don't have buttermilk, add 1 tablespoon of lemon juice or white vinegar to 1 1/4 cups of milk and let it sit for 5 minutes before using.
- Bake times vary: Ovens differ, so start checking for doneness at the lower end of the time range. Cupcakes often bake faster than layers, so check them early.
Serving Suggestions
This yellow cake is delicious with a simple chocolate buttercream, vanilla cream cheese frosting, or a dusting of powdered sugar. For a classic birthday cake, layer with your favorite jam and whipped cream. Serve with fresh berries or a scoop of vanilla ice cream for an extra treat.
Variations
- Lemon yellow cake: Add 1 tablespoon of lemon zest and replace the vanilla with 1 teaspoon of lemon extract.
- Marble cake: Divide the batter in half and stir 2 tablespoons of cocoa powder mixed with 2 tablespoons of hot water into one half. Swirl the two batters together in the pan.
- Cupcake twist: Use this batter for 24 cupcakes and top with your favorite frosting—add sprinkles for a festive look.
Storage and Reheating
Store unfrosted cake layers or cupcakes in an airtight container at room temperature for up to 2 days. Frosted cakes can be refrigerated for up to 4 days, but bring to room temperature before serving for best flavor. To freeze, wrap unfrosted layers tightly in plastic wrap and then foil; they'll keep for up to 3 months. Thaw overnight in the refrigerator. To reheat a slice, microwave for 10–15 seconds until just warm—be careful not to dry it out.
Frequently Asked Questions
Can I use salted butter instead of unsalted?
Yes, but reduce the added salt to 1/4 teaspoon to avoid an overly salty cake.
Why did my cake sink in the middle?
This can happen if the oven door is opened too early, the batter is overmixed, or the baking powder is old. Make sure your oven is fully preheated and avoid opening the door during the first 15 minutes of baking.
Can I make this cake without buttermilk?
Yes, use the substitute mentioned in the Tips section: 1 1/4 cups milk mixed with 1 tablespoon lemon juice or vinegar, left to sit for 5 minutes.
How do I know when the cake is done?
Insert a toothpick into the center—it should come out clean or with a few moist crumbs. The edges will pull away from the pan slightly, and the top will spring back when lightly pressed.
Can I double this recipe?
Absolutely. Double all ingredients and bake in three 9-inch pans or use the batter for a 9x13-inch sheet cake (increase baking time to 30–35 minutes).
Can I use this batter for a sheet cake?
Yes, pour the batter into a greased 9x13-inch pan and bake at 350°F for 30–35 minutes, or until a toothpick comes out clean.