Dinners

Chocolate Cake with Vanilla Buttercream Frosting

Updated · By Patriot Kitchen

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

Jump to recipe Save

This chocolate cake features a moist, dark crumb paired with a sweet, airy vanilla buttercream. It is a standard dessert for birthdays, potlucks, and holiday celebrations. The balance depends on the ratio of cocoa powder to flour, which ensures the cake remains tender rather than bread-like.

What makes the chocolate cake moist?

The moisture in this cake comes from the combination of oil and boiling water. Oil provides a more consistent moisture level than butter because it remains liquid at room temperature, preventing the cake from drying out quickly. The boiling water blooms the cocoa powder, dissolving lumps and releasing the full flavor of the chocolate before it is folded into the batter.

To ensure the cake does not become too dense, avoid overmixing the batter after adding the flour. Overmixing develops gluten, which creates a tough texture. Mix only until the streaks of flour disappear. Using room temperature eggs also helps the batter emulsify, creating a smoother structure that rises evenly in the oven.

Ingredients

For the Cake

  • 2 cups (250 g) all-purpose flour
  • 2 cups (400 g) granulated sugar
  • 3/4 cup (75 g) unsweetened cocoa powder
  • 2 tsp (10 g) baking soda
  • 1 tsp (5 g) baking powder
  • 1 tsp (5 g) salt
  • 1 cup (240 ml) buttermilk, room temperature
  • 1/2 cup (120 ml) vegetable oil
  • 2 large eggs, room temperature
  • 2 tsp (10 ml) vanilla extract
  • 1 cup (240 ml) boiling water

For the Vanilla Buttercream

  • 1 1/2 cups (340 g) unsalted butter, softened to 65F (18C)
  • 6 cups (720 g) powdered sugar, sifted
  • 1/4 cup (60 ml) heavy cream
  • 2 tsp (10 ml) vanilla extract
  • 1/4 tsp (1.5 g) salt

Instructions

  1. Preheat the oven to 350F (175C). Grease two 9-inch (23 cm) round cake pans and line the bottoms with parchment paper to prevent sticking.
  2. In a large bowl, whisk together the flour, sugar, cocoa powder, baking soda, baking powder, and salt. Ensure there are no large clumps of cocoa.
  3. Add the buttermilk, vegetable oil, eggs, and vanilla extract to the dry ingredients. Beat with a hand mixer on medium speed for 2 minutes.
  4. Stir in the boiling water by hand using a whisk. The batter will be very thin; this is normal.
  5. Divide the batter evenly between the two prepared pans.
  6. Bake for 30-35 minutes. The cake is done when a toothpick inserted into the center comes out clean or with a few moist crumbs. The internal temperature should reach 210F (99C) for a fully set crumb.
  7. Cool the cakes in the pans for 10 minutes, then invert them onto wire racks to cool completely for at least 2 hours.
  8. To make the frosting, beat the softened butter on medium-high speed for 3-5 minutes until pale and fluffy.
  9. Add the powdered sugar one cup at a time, beating on low speed until incorporated, then increasing to medium for 1 minute between additions.
  10. Stir in the heavy cream, vanilla extract, and salt. Beat on high for an additional 2 minutes until the frosting is light and airy.
  11. Place one cake layer on a plate. Spread about 1 cup of frosting over the top. Place the second layer on top and frost the top and sides of the cake.

Why is the cake too dry, runny, or dense?

If the cake is too dry, it was likely overbaked. Even five extra minutes in the oven can evaporate the moisture provided by the oil and buttermilk. Check the cake 5 minutes before the minimum suggested time. If the cake is too runny or sinks in the middle, it may be due to expired baking soda or powder, which fails to provide the necessary lift to support the weight of the cocoa and sugar.

A dense, rubbery texture usually results from overmixing the batter. When flour meets liquid, gluten forms; excessive beating creates a network of gluten that is too strong for the cake to rise lightly. To fix this in future batches, switch to a spatula for the final folding process. If the frosting is too runny to hold its shape on the sides of the cake, beat in an additional 1/4 cup (30 g) of powdered sugar until the consistency is stiff enough to peak.

If the frosting is too gritty, the powdered sugar was not sifted. Sifting removes clumps that the mixer cannot break down. If the frosting feels too buttery or greasy, it may have been over-beaten or the butter was too warm. Chill the frosting in the refrigerator for 15 minutes and re-whip it to restore the structure.

How to store the chocolate cake?

Because of the buttercream frosting, this cake should be stored carefully to maintain freshness. If the cake is kept at room temperature, it will stay fresh for about 2-3 days. It must be stored in an airtight cake carrier or under a large inverted bowl to prevent the sponge from drying out. Do not leave the cake uncovered, as the sugar in the frosting can attract moisture from the air or dry out the cake layers.

For longer storage, refrigerate the cake in an airtight container for up to 5 days. Note that refrigeration firms up the butter in the frosting, making it harder to slice. For the best texture, remove a slice and let it sit at room temperature for 30-60 minutes before serving. This allows the buttercream to soften back to its original consistency.

The cake can be frozen for up to 3 months. For the best results, freeze the cake layers separately, wrapped tightly in plastic wrap and then aluminum foil, before frosting. If freezing a fully frosted cake, freeze it for 2 hours uncovered to set the frosting, then wrap it in plastic wrap. Thaw the cake in the refrigerator overnight before bringing it to room temperature.

What can be substituted in this recipe?

Various ingredients can be swapped based on availability or dietary needs. For a dairy-free version, replace the buttermilk with an equal amount of soy milk mixed with 1 tablespoon of lemon juice or white vinegar; let it sit for 5 minutes before using. Replace the unsalted butter in the frosting with a vegan butter stick at a 1:1 ratio. The texture of the frosting will remain similar, though the flavor may be slightly saltier depending on the brand.

If you do not have buttermilk, use 1 cup (240 ml) of whole milk and 1 tablespoon (15 ml) of lemon juice. This mimics the acidity of buttermilk, which reacts with the baking soda to create lift. If you prefer a deeper chocolate flavor, replace 1/2 cup (100 g) of the granulated sugar with 1/2 cup (100 g) of brown sugar. The molasses in the brown sugar adds a caramel note and increases the moisture of the crumb.

For the frosting, heavy cream can be replaced with whole milk, though the frosting will be slightly less stable and less creamy. If you lack a hand mixer, the buttercream can be made with a whisk and significant manual effort, though it will not be as aerated. To change the color of the frosting, add gel food coloring one drop at a time; avoid liquid colors as they can thin the frosting and make it slide off the cake.

How to serve and pair this cake?

This cake is most effectively served at room temperature to ensure the buttercream is creamy. For a professional presentation, use a serrated knife dipped in hot water and wiped dry between each cut to get clean slices. Serve each slice with a side of fresh raspberries or sliced strawberries; the acidity of the berries cuts through the sweetness of the vanilla frosting.

Pair the cake with drinks that balance the richness of the chocolate. A cup of black coffee or a strong espresso provides a bitter contrast that complements the sugar. For a non-caffeinated option, a glass of cold milk is a traditional pairing. If serving as part of a larger dessert spread, pair it with a light fruit salad or a citrus-based sorbet to cleanse the palate between bites.

For a more elaborate presentation, dust the top of the cake with a small amount of cocoa powder or add chocolate shavings. If the cake is for a birthday, place candles in the center and serve immediately after lighting. Because the cake is rich, smaller slices are typically sufficient for most guests.

Safety guidelines for raw ingredients

This recipe involves raw flour and raw eggs, both of which can carry bacteria. Raw flour should be heat-treated to 160F (71C) before use if the batter is to be tasted before baking. To heat-treat flour, spread it on a baking sheet and bake at 350F (175C) until it reaches the target temperature, then let it cool completely. Use pasteurized eggs to further reduce the risk of foodborne illness.

Pregnant people, young children, older adults, and anyone with a weakened immune system should strictly avoid consuming raw eggs or raw flour. Always bake the cake until it reaches the safe internal temperature of 210F (99C) to ensure all raw ingredients are fully cooked. Perishable components, such as the butter and cream in the frosting, should not sit at room temperature for more than 2 hours, or 1 hour if the ambient temperature is above 90F (32C).

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).