Zimt

How to Bake Chocolate Cupcakes from Scratch

· 4 min read · Cakes

In this article
  1. Ingredients
  2. Instructions
  3. Frosting and Filling
  4. Pan Sizes and Yields
  5. Substitutions and Swaps
  6. Storage and Freezing
  7. When It Goes Wrong
  8. Food Safety Notes

Baking chocolate cupcakes takes about 35 minutes from start to finish, costs about $5 for a dozen, and is easy for a beginner. You'll mix a simple batter, bake at 350°F (175°C) for 18–22 minutes, and frost when cool. This recipe makes 12 standard cupcakes with a moist crumb and a deep cocoa flavor.

Ingredients

  • 1 1/2 cups (190 g) all-purpose flour
  • 1 cup (200 g) granulated sugar
  • 1/2 cup (50 g) unsweetened cocoa powder (natural or Dutch-process)
  • 1 tsp baking soda
  • 1/2 tsp salt
  • 1/2 cup (120 ml) vegetable oil
  • 1 cup (240 ml) buttermilk, at room temperature
  • 2 large eggs, at room temperature
  • 2 tsp vanilla extract
  • 1/2 cup (120 ml) hot coffee or hot water

Instructions

  1. Heat the oven to 350°F (175°C). Line a 12-cup muffin tin with paper liners.
  2. In a large bowl, whisk together the flour, sugar, cocoa powder, baking soda, and salt until no lumps remain.
  3. Add the oil, buttermilk, eggs, and vanilla. Beat with a hand mixer on medium speed for 2 minutes, or whisk vigorously until the batter is smooth and slightly thickened.
  4. Pour in the hot coffee or hot water and stir until just combined. The batter will be thin—that's correct.
  5. Divide the batter evenly among the liners, filling each about 2/3 full (about 1/4 cup / 60 ml per cupcake).
  6. Bake for 18–22 minutes, until a toothpick inserted in the center comes out clean or with a few moist crumbs. The tops should spring back when lightly pressed.
  7. Cool in the pan for 5 minutes, then transfer to a wire rack to cool completely before frosting.

Frosting and Filling

Use any frosting you like—chocolate buttercream, vanilla buttercream, or cream cheese frosting all work well. For a simple chocolate buttercream, beat 1/2 cup (1 stick, 113 g) softened butter with 2 cups (240 g) powdered sugar, 1/4 cup (25 g) cocoa powder, 2 tbsp (30 ml) milk, and 1 tsp vanilla until fluffy. Frost cooled cupcakes with a knife or piping bag.

If you want to fill the cupcakes, cut a small cone from the top, pipe in a spoonful of jam, curd, or ganache, then replace the top before frosting.

Pan Sizes and Yields

PanBatter amountBake time
12-cup muffin tin1/4 cup (60 ml) per cup18–22 min
24 mini muffin cups1 tbsp (15 ml) per cup10–12 min
9x5-inch loaf panall batter45–50 min

Substitutions and Swaps

Buttermilk: If you don't have buttermilk, add 1 tbsp (15 ml) lemon juice or white vinegar to 1 cup (240 ml) milk and let sit 5 minutes. This will still give the same tender crumb.

Cocoa powder: Dutch-process cocoa gives a milder, less acidic flavor; natural cocoa is more intense. Either works here because the baking soda is balanced for both.

Hot coffee: Coffee enhances the chocolate flavor without making the cupcakes taste like coffee. If you prefer, use hot water instead—the result is slightly less deep but still good.

Storage and Freezing

Store unfrosted cupcakes in an airtight container at room temperature for up to 2 days, or refrigerate for up to 5 days. Frosted cupcakes should be refrigerated if the frosting contains dairy; bring to room temperature before serving. Freeze unfrosted cupcakes in a zip-top bag for up to 3 months; thaw at room temperature for about 1 hour before frosting.

When It Goes Wrong

SymptomCauseFix
Cupcakes sink in the middleOven not hot enough, or batter overmixedCheck oven temperature with an oven thermometer; mix just until combined
Dry, crumbly textureOverbaked or too much flourPull them out at 18 minutes and test; spoon flour into the cup, don't scoop
Muffin tops stick to linersBaked too long or cooled completely in the panCool 5 minutes in the pan, then remove promptly
Batter tastes bitterToo much baking soda or cocoaMeasure cocoa and soda carefully; use the exact amounts listed

Food Safety Notes

This batter contains raw flour and raw eggs. Do not taste it before baking. Heat-treated flour (spread on a baking sheet and baked at 350°F/175°C for 5 minutes, then cooled) and pasteurized eggs are safer if you must sample, but the safest choice is to wait for the baked cupcake. Refrigerate any frosted cupcakes within 2 hours, especially in warm weather.