- 8 ounces (2 sticks) unsalted butter, softened, plus more for pans
- 3 cups all-purpose flour, plus more for dusting
- 1 tablespoon baking powder
- 1/2 teaspoon salt
- 2 cups sugar
- 4 large eggs
- 1 teaspoon pure vanilla extract
- 1 cup whole milk
Preheat oven to 350 degrees. For cupcakes: Line a standard muffin tin with paper liners. Set aside. For cake layers: Cut a long sheet of parchment or waxed paper into two 9-by-13-inch rectangles to line the bottom of two 9-by-13-inch baking pans. Butter and line pans. Butter linings, then flour pans, tapping out excess. Set aside. (Alternatively, if you have only one pan, set aside second piece of parchment paper to bake one layer at a time.)
Whisk together flour, baking powder, and salt in a medium bowl; set aside. Put butter and sugar in the bowl of an electric mixer fitted with the paddle attachment; cream on medium-high speed until pale, 2 to 3 minutes. On medium speed, add eggs one at a time, mixing well after each addition. Add vanilla, and mix, scraping down sides of bowl. With the mixer on low speed, add the flour mixture in three batches, alternating with two batches of milk. Stir with a rubber spatula until the batter is evenly blended.
For cupcakes: Pour batter into lined cups, filling each two-thirds full. (You will have batter left over for additional batches; set aside.) For cake layers: Pour 2 3/4 cups batter into each prepared pan. Smooth the top of each layer with a small offset spatula.
Bake until a cake tester inserted into centers comes out clean, 15 to 18 minutes for cupcakes, 20 to 25 minutes for layers.
Let layers or cupcakes cool in pans on wire racks, 20 minutes. Run a knife around edges of cakes to loosen. Invert cake layers or cupcakes to remove from pans (peel off parchment from cake layers). Reinvert, and let cool completely on racks. Wrap in plastic wrap, and refrigerate until ready to decorate.
For cupcakes (or cake layers, if baking in two batches): Repeat with remaining batter, lining muffin tin (or baking pan) when cooled.