Dinners

How to Prepare Chocolate Cake at Home

Updated · By Stir & Share

Total timeincludes chilling, rising or resting
2 hr 5 min
Prep
25 min
hands-on
Cook
30 min
oven or stovetop
Serves
12
as written

Jump to recipe Save

Underbaking leaves the center wet and dense, while overmixing the batter makes the cake tough. Use room-temperature ingredients and mix just until combined to ensure a moist, tender crumb.

Choose the Right Pan and Prepare It First

Start with two 9-inch (23 cm) round cake pans. Using the correct size ensures even baking and proper rise. If you use a different size, adjust the baking time: a larger pan yields thinner layers that bake faster, while a smaller pan requires longer baking.

Grease the pans with butter or nonstick spray, then line the bottoms with parchment paper. This double protection prevents sticking and allows easy removal after cooling. Dust the greased pans lightly with cocoa powder instead of flour to avoid white residue on the dark cake.

Use Room-Temperature Ingredients

Take the eggs, buttermilk and butter out 60–90 minutes before mixing. Cold ingredients do not emulsify well, leading to a lumpy batter and uneven texture. The butter should be soft enough to press easily but not melted or greasy.

If you forget to soften the butter, cut it into small cubes and microwave in 5-second bursts, checking between each. Eggs can be warmed quickly by placing them in a bowl of warm (not hot) water for 5–10 minutes.

Measure and Mix the Batter Correctly

Use dry measuring cups for flour and cocoa powder, and liquid measuring cups for buttermilk and oil. Spoon the flour into the cup and level it with a knife; do not scoop directly from the bag, which packs the flour and leads to dry cake.

Heat-treat the flour if you plan to taste the batter: spread 2 cups (250 g) on a baking sheet and bake at 350°F (175°C) for 5 minutes, then cool completely. This kills any potential bacteria. Use pasteurized eggs if tasting raw batter, especially for pregnant people, young children, older adults or those with weakened immune systems.

Ingredients

  • 2 cups (250 g) all-purpose flour
  • 2 cups (400 g) granulated sugar
  • ¾ cup (65 g) unsweetened cocoa powder (not Dutch-process if using buttermilk)
  • 2 tsp baking soda
  • 1 tsp baking powder
  • 1 tsp salt
  • 2 large eggs, room temperature
  • 1 cup (240 ml) buttermilk, room temperature
  • ½ cup (120 ml) vegetable oil
  • 2 tsp vanilla extract
  • 1 cup (240 ml) hot coffee or boiling water

Instructions

  1. Preheat oven to 350°F (175°C). Prepare two 9-inch (23 cm) round cake pans as described.
  2. In a large bowl, sift together flour, sugar, cocoa powder, baking soda, baking powder and salt. Sifting prevents lumps and aerates the dry mix.
  3. In a separate bowl, whisk eggs, buttermilk, oil and vanilla until smooth.
  4. Pour the wet ingredients into the dry ingredients. Mix with an electric mixer on low speed for 30 seconds, then on medium for 2 minutes. Scrape the bowl’s sides as needed.
  5. Reduce speed to low. Gradually add the hot coffee or boiling water. Mix just until combined; the batter will be thin. Do not overmix.
  6. Divide batter evenly between the prepared pans. Tap each pan gently on the counter to release air bubbles.
  7. Bake for 30–35 minutes, until a wooden skewer inserted in the center comes out with a few moist crumbs (not wet batter).
  8. Let cakes cool in pans for 10 minutes. Run a knife around the edges, then invert onto wire racks. Remove parchment and cool completely before frosting.

Check That the Cake Is Done

The cake is finished when the top springs back lightly when touched and the edges pull slightly from the pan. If the center sinks, it may be underbaked or removed too early. A wet center means the cake needs more time; a dry, cracked top suggests overmixing or too much flour.

Symptom Most Likely Cause Fix Next Time
Cake sinks in the center Underbaked, opened oven too early, or too much leavener Extend baking time, avoid opening oven in first 25 minutes, measure baking powder/soda carefully
Surface is cracked and dry Overmixed, too much flour, or oven too hot Mix just until combined, spoon and level flour, verify oven temperature with a thermometer
Cake sticks to pan Pans not greased well or cooled too long in pan Grease and line pans thoroughly, invert within 10–15 minutes of baking
Uneven rise Oven hot spots, uneven batter distribution, or old leavener Rotate pans halfway, distribute batter evenly, test baking powder/soda freshness

Frost and Finish the Cake

Only frost when the cakes are completely cool. Warm layers melt the frosting and cause sliding. Use a crumb coat: spread a thin layer of frosting over the entire cake, then chill for 15–20 minutes before adding the final layer.

A classic chocolate buttercream uses 1 cup (230 g) softened butter, 3½ cups (440 g) powdered sugar, ½ cup (45 g) cocoa powder, ¼ cup (60 ml) milk and 1 tsp vanilla. Beat until smooth and creamy.

Stack layers with frosting in between. For a smooth finish, use a bench scraper or offset spatula. Garnish with chocolate shavings or berries if desired.

Clean Up and Store Leftovers

Wash bowls and tools immediately after use. Chocolate hardens quickly and is harder to remove once dry. Soak beaters and spatulas in warm, soapy water while you finish decorating.

Store unfrosted cake layers wrapped in plastic at room temperature for up to 1 day or in the fridge for 3 days. Frosted cake keeps in the refrigerator for 4 days. Bring to room temperature before serving for best texture.

Freeze unfrosted layers: wrap tightly in plastic, then foil. Freeze for up to 3 months. Thaw overnight in the refrigerator, then at room temperature before frosting.

Refrigerate any cake with perishable fillings (like custard or whipped cream) within 2 hours. Do not leave at room temperature longer than 2 hours (1 hour if above 90°F/32°C).

Related

Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.

Spotted an error? Tell us and we will correct it (corrections policy).