Dessert Recipes

Chocolate Peanut Butter Cake Recipe

Updated · By Cooking with Sandra

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

Save

This chocolate peanut butter cake combines a moist cocoa base with a creamy nut butter frosting. It is a rich dessert that suits weekend gatherings, potlucks, or holiday celebrations. Serve it with a glass of cold milk or a side of fresh raspberries to balance the sweetness.

Cake Components and Texture

This cake consists of two primary layers: a chocolate sponge and a peanut butter buttercream. The sponge uses the creaming method to incorporate air, resulting in a crumb that is sturdy enough to support the heavy frosting but moist enough to melt in the mouth. Because cocoa powder can be drying, the recipe includes oil and buttermilk to ensure the cake does not become crumbly. The frosting is a high-fat emulsion of peanut butter and butter, which provides a salty contrast to the sugar in the cake.

To achieve the correct texture, the butter and eggs must be at room temperature, typically about 65-70°F (18-21°C). Cold ingredients do not emulsify properly, which can lead to a broken batter and a dense, uneven cake. If you are in a rush, you can place cold eggs in a bowl of warm water for 5 minutes to take the chill off. For the butter, cut it into small cubes and let it sit for 30 minutes.

Required Baking Equipment

Use two 9-inch (23 cm) round cake pans. For the best release, grease the pans with butter or shortening and line the bottoms with parchment paper circles. If you do not have round pans, you can use an 8-inch (20 cm) square pan, but you will need to increase the baking time by 5-10 minutes and check the center with a toothpick. A hand mixer or a stand mixer is necessary to cream the butter and sugar and to whip the frosting to a light consistency. A rubber spatula is needed to fold in the dry ingredients to avoid overmixing, which can develop too much gluten and make the cake tough.

Ingredient Substitutions

You can swap the buttermilk for a mixture of 1 cup (240 ml) milk and 1 tablespoon (15 ml) lemon juice or white vinegar; let it sit for 5 minutes before using. This creates a homemade buttermilk substitute that provides the same acidity needed to react with the baking soda. If you need a dairy-free version, use an unsweetened almond milk and apple cider vinegar mixture, and replace the butter with a plant-based butter stick. Note that plant-based butters may result in a slightly softer frosting that requires more chilling.

For those with peanut allergies, almond butter or cashew butter can be used in a 1:1 ratio. Almond butter is slightly less salty, so you may need to add an extra pinch of salt to the frosting to maintain the flavor profile. Sunflower seed butter is another option, though it has a more distinct, earthy taste that changes the overall flavor of the cake. If you prefer a darker, more intense chocolate flavor, replace the natural cocoa powder with Dutch-processed cocoa powder, but be aware that Dutch-process cocoa is less acidic and may require a small increase in baking powder to ensure the cake rises.

Chocolate Peanut Butter Cake 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 teaspoons (10 g) baking soda
  • 1 teaspoon (5 g) baking powder
  • 1 teaspoon (6 g) salt
  • 2 large eggs, room temperature
  • 1 cup (240 ml) buttermilk, room temperature
  • 1/2 cup (120 ml) vegetable oil
  • 2 teaspoons (10 ml) vanilla extract
  • 1 cup (240 ml) boiling water

For the Peanut Butter Frosting

  • 1 cup (225 g) unsalted butter, softened
  • 1 cup (250 g) creamy peanut butter
  • 3-4 cups (360-480 g) powdered sugar, sifted
  • 1/4 cup (60 ml) heavy cream or whole milk
  • 1 teaspoon (5 ml) vanilla extract
  • 1/4 teaspoon (1.5 g) salt

Cake Preparation Steps

  1. Preheat your oven to 350°F (175°C). Grease and flour two 9-inch (23 cm) cake pans and line the bottoms with parchment paper.
  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 eggs, buttermilk, vegetable oil, and vanilla extract to the dry ingredients. Beat on medium speed with a mixer for about 2 minutes until the batter is smooth.
  4. Reduce the mixer speed to low and carefully pour in the boiling water. Stir by hand or on low speed until combined. The batter will be very thin; this is normal and ensures a moist crumb.
  5. Divide the batter evenly between the two prepared pans.
  6. Bake at 350°F (175°C) for 30-35 minutes. The cakes are done when a toothpick inserted into the center comes out clean or with just a few moist crumbs.
  7. Remove the pans from the oven and let them cool for 10 minutes before inverting them onto wire racks to cool completely. The cakes must be entirely cold before frosting, or the butter in the frosting will melt.
  8. While the cakes cool, prepare the frosting. Beat the softened butter and peanut butter together 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.
  10. Stir in the heavy cream, vanilla extract, and salt. Beat on high for another 2 minutes until the frosting is light and spreadable. If it is too thick, add more cream one tablespoon (15 ml) at a time. If too thin, add more powdered sugar.
  11. Place one cake layer on a plate. Spread about 1 cup (240 ml) of frosting over the top. Place the second layer on top and cover the top and sides of the cake with the remaining frosting.

Cake Storage and Safety

Because this cake contains dairy in the frosting and buttermilk in the sponge, it must be stored properly to prevent spoilage. Raw flour and raw eggs can contain bacteria; ensure the cake is baked through and reaches a safe internal temperature. For egg-based cakes, the USDA FSIS safe minimum internal temperature for egg dishes is 160°F (71°C), though the doneness cue of a clean toothpick is the standard for baking.

Once frosted, the cake can sit at room temperature for about 2 hours. After this, move it to the refrigerator. Store the cake in an airtight cake carrier or cover it tightly with plastic wrap to prevent it from absorbing odors from other foods in the fridge. The cake will keep in the refrigerator for 3-4 days.

For longer storage, you can freeze the unfrosted cake layers. Wrap each layer tightly in two layers of plastic wrap and then a layer of aluminum foil. Frozen layers keep for about 3 months. To use, thaw the layers in the refrigerator overnight before frosting. If you freeze the fully frosted cake, let it thaw in the refrigerator for 24 hours before serving to prevent condensation from forming on the frosting.

When reheating cake slices, avoid the microwave if they are frosted, as the frosting will melt rapidly. Instead, let the slice sit at room temperature for 30-60 minutes to soften. If you are reheating a plain slice of cake, you can microwave it for 10-15 seconds. Any leftovers that have been kept in the fridge should be reheated to 165°F (74°C) if they are being served as part of a warm dessert, though cake is typically served cold or at room temperature.

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