These yellow cupcakes with chocolate frosting pair soft, buttery cake with a creamy chocolate swirl. The batter uses familiar pantry ingredients, and a standard muffin pan keeps the batch manageable. They’re a lovely choice for a birthday tray, a school celebration, or a small get-together.
You’ll cream the butter and sugar, alternate the dry ingredients with milk, and bake the cupcakes until the centers are set. Give them time to cool before frosting. That little pause helps the chocolate buttercream stay where you pipe it.
Recipe at a glance: 12 standard cupcakes | 350°F (175°C) | 18–20 minutes baking | About 25 minutes hands-on work, plus cooling | A standard 12-cup muffin pan.
Why You’ll Love These Cupcakes
- A classic yellow cake and chocolate frosting combination.
- One standard pan makes a batch of 12.
- Clear mixing steps, with no complicated decorating required.
- Bake the cupcakes ahead and frost them closer to serving.
Ingredients and Helpful Notes
The recipe card separates the cupcake batter from the frosting so it’s easy to measure each part.
All-purpose flour: Spoon it into your measuring cup and level the top. Scooping a packed cup directly from the bag can add extra flour and make the crumb heavier.
Butter: Use softened unsalted butter for both parts. It should give slightly when pressed while still holding its shape. Melted butter won’t cream the same way.
Sugar: Granulated sugar goes into the batter. Powdered sugar gives the buttercream its smooth texture and structure; the two aren’t interchangeable.
Eggs and vanilla: Use the two large eggs and the batter’s 1 teaspoon vanilla. Add the eggs one at a time so they blend evenly into the creamed butter.
Milk: Measure the batter’s 1/2 cup separately from the milk for the frosting. Add frosting milk gradually so you can stop at a spreadable or pipeable consistency.
Cocoa powder: Use unsweetened cocoa, not hot cocoa drink mix. Sifting it with the powdered sugar helps keep lumps out of the frosting.
Baking powder and salt: Use the listed baking powder rather than baking soda. The small amount of salt balances the cake’s sweetness.
Swapping only the milk doesn’t make these cupcakes dairy-free because both the cake and frosting contain butter. Gluten-free flour, margarine, and other substitutions can change the texture, so don’t treat them as automatic equivalents.
Equipment
Use a standard 12-cup muffin pan with 12 paper liners, two mixing bowls, an electric mixer, a spatula, measuring cups and spoons, and a cooling rack. A piping bag and large star tip are optional; a small spatula works well for a simple frosting layer.
A 12-cup muffin pan is one option if you need a pan. Check the selected pack quantity before ordering.
How to Make Yellow Cupcakes with Chocolate Buttercream
1. Prepare the oven and pan
Heat a conventional oven to 350°F (175°C) with a rack near the middle. Line a standard 12-cup muffin pan with 12 paper liners. Measure the ingredients before starting so you won’t have to stop midway through mixing.
2. Cream the butter and sugar
Beat the batter’s 1/2 cup softened butter with 1 cup granulated sugar until noticeably lighter and fluffy. Scrape the sides and bottom of the bowl so there aren’t pockets of unmixed butter.
3. Add the eggs and vanilla
Beat in the 2 large eggs, one at a time, mixing after each addition. Add 1 teaspoon vanilla extract. Scrape the bowl again before moving on.
4. Finish the batter
In a separate bowl, whisk 1 1/2 cups all-purpose flour, 2 teaspoons baking powder, and 1/4 teaspoon salt. With the mixer on low, add the dry mixture in portions, alternating with 1/2 cup milk. Start and finish with the dry ingredients. Stop when the flour is incorporated, then fold gently with a spatula to catch any dry spots.
5. Fill and bake
Divide the batter among the liners, filling them about 2/3 full. Bake for 18–20 minutes, checking from 18 minutes. A toothpick inserted into the center should come out clean or with a few moist crumbs, without wet batter.
Let the cupcakes sit in the pan briefly until they’re easy to handle, then transfer them to a rack. Cool completely before frosting. Plan for roughly 45–60 minutes of cooling, depending on your kitchen.
6. Make the chocolate frosting
Beat 1 cup softened unsalted butter until smooth. Sift together 3 1/2 cups powdered sugar and 1/2 cup unsweetened cocoa. Mix them into the butter in portions on low speed, scraping the bowl as needed.
Add 2 teaspoons vanilla, 1/8 teaspoon salt, and 2 tablespoons milk. Beat until creamy, then add more milk, up to 4 tablespoons total, a teaspoon at a time if needed. The frosting should spread smoothly and hold a soft peak. Don’t pour in all the milk at once.
7. Frost the cooled cupcakes
Touch the tops and bottoms to check that no warmth remains. Spread frosting with a spatula or pipe a swirl, starting around the outside and moving toward the center. Divide the frosting across the batch instead of making the first few swirls extra tall.

Beginner Baking Tips
- Use softened butter, not melted butter. Creaming helps incorporate air into the batter.
- Scrape the bowl. Butter can cling to the bottom even when the mixture looks combined.
- Keep the liners evenly filled. Cupcakes with similar amounts of batter bake more evenly.
- Stop mixing once the flour disappears. A few gentle folds are enough to finish the batter.
- Cool before decorating. Warm cupcakes soften buttercream and make swirls slump.
- Adjust frosting slowly. Add milk by the teaspoon rather than a large splash.
For more on creaming and cooling butter cakes, see King Arthur Baking’s cake guide.
Common Problems and What to Check
| What you notice | What to check |
|---|---|
| Dense cupcakes | Check how the flour was measured, whether the butter was softened, and whether the batter was overmixed. |
| Overflowing tops | Keep the liners about 2/3 full instead of filling them to the rim. |
| Dry crumb | Start checking at 18 minutes and remove the cupcakes when the centers are done. |
| Frosting slides off | Let the cupcakes cool completely before frosting. |
| Frosting is too stiff to pipe | Add milk a teaspoon at a time, then mix and check again. |
| Frosting won’t hold its shape | If the butter is warm, chill the frosting briefly and re-beat before adding anything else. |
Simple Variations
Keep the batter and frosting quantities the same and change the presentation. Spread a smooth frosting cap for an everyday batch, pipe a low swirl for easier transport, or use a star tip for a more decorative finish.
If you’d like a larger dessert with the same classic flavor pairing, try Moist Yellow Cake. Don’t transfer this cupcake batter to a different pan and assume the baking time will stay the same.

Storage and Make-Ahead
Make ahead: Bake the cupcakes the day before. Once completely cool, cover the unfrosted cupcakes tightly. Prepare the frosting separately and refrigerate it in a covered container. Let it soften and beat it again before decorating.
Refrigerate: Store frosted cupcakes in a covered container in the refrigerator and enjoy within 3–4 days. Let a portion sit briefly at room temperature before serving so the butter-based cake and frosting soften. Avoid leaving them in a hot room or direct sun.
Freeze: Wrap cooled, unfrosted cupcakes individually and place them in a freezer-safe container for up to 3 months. Thaw them while wrapped, then frost once they’re fully thawed. Freezing the cakes separately helps protect the frosting shape.
Frequently Asked Questions
Why are these called yellow cupcakes?
Whole eggs and butter give the cake its warm yellow color. This is a butter-based cupcake recipe, rather than a white cake made with only egg whites.
Can I use a spoon instead of a piping bag?
Yes. Add frosting with a spoon, then smooth it with a small spatula or the back of the spoon. You don’t need a piping tip to make an inviting batch.
Can I use melted chocolate instead of cocoa?
Keep the cocoa amount listed in the recipe. Melted chocolate also adds sugar and fat, so it isn’t a direct swap for cocoa powder.
How do I keep the cupcakes from drying out?
Measure the flour lightly, avoid overmixing, and check the cupcakes at the start of the baking window. Once they’re cool, keep them covered.
Can I make them dairy-free by changing the milk?
Changing the milk alone isn’t enough; the cake and frosting also contain butter. Use a recipe developed for dairy-free ingredients if you need that option.
More Recipes to Try
For a full-size butter cake, take a look at Moist Yellow Cake. If you enjoy comparing decorating styles, our Chocolate Frosting article is another useful place to start. For a chilled chocolate dessert you can prepare ahead, try Hot Chocolate Poke Cake.
Yellow Cupcakes with Chocolate Frosting Recipe Card

Yellow Cupcakes with Chocolate Frosting
Ingredients
Method
- Heat a conventional oven to 350°F (175°C) with a rack near the middle. Line a standard 12-cup muffin pan with 12 paper liners. Measure the ingredients before starting so you won’t have to stop midway through mixing.
- Beat the batter’s 1/2 cup softened butter with 1 cup granulated sugar until noticeably lighter and fluffy. Scrape the sides and bottom of the bowl so there aren’t pockets of unmixed butter.
- Beat in the 2 large eggs, one at a time, mixing after each addition. Add 1 teaspoon vanilla extract. Scrape the bowl again before moving on.
- In a separate bowl, whisk 1 1/2 cups all-purpose flour, 2 teaspoons baking powder, and 1/4 teaspoon salt. With the mixer on low, add the dry mixture in portions, alternating with 1/2 cup milk. Start and finish with the dry ingredients. Stop when the flour is incorporated, then fold gently with a spatula to catch any dry spots.
- Divide the batter among the liners, filling them about 2/3 full. Bake for 18–20 minutes, checking from 18 minutes. A toothpick inserted into the center should come out clean or with a few moist crumbs, without wet batter. Let the cupcakes sit in the pan briefly until they’re easy to handle, then transfer them to a rack. Cool completely before frosting. Plan for roughly 45–60 minutes of cooling, depending on your kitchen.
- Beat 1 cup softened unsalted butter until smooth. Sift together 3 1/2 cups powdered sugar and 1/2 cup unsweetened cocoa. Mix them into the butter in portions on low speed, scraping the bowl as needed. Add 2 teaspoons vanilla, 1/8 teaspoon salt, and 2 tablespoons milk. Beat until creamy, then add more milk, up to 4 tablespoons total, a teaspoon at a time if needed. The frosting should spread smoothly and hold a soft peak. Don’t pour in all the milk at once.
- Touch the tops and bottoms to check that no warmth remains. Spread frosting with a spatula or pipe a swirl, starting around the outside and moving toward the center. Divide the frosting across the batch instead of making the first few swirls extra tall.