Peanut Butter Cake with Chocolate Frosting Recipe

Most peanut butter cakes end up tasting like vanilla with a faint hint of peanut butter. I began with my reliable vanilla cake base and recalculated the balance of fat and moisture to let peanut butter shine. The result is a light, tender cake that’s unmistakably peanut butter-forward without being dense or greasy.

A two-layer yellow cake with chocolate frosting sits on a plate, with one slice lifted up. A vase of yellow tulips and a glass of milk are in the background.

After perfecting the cake, I asked readers which frosting they preferred: peanut butter cream cheese or chocolate buttercream. Chocolate won, and it’s easy to see why — the chocolate buttercream is rich enough to stand up to the peanut butter without overwhelming it. The combination is classic and reliably delicious.

A slice of two-layer yellow cake with chocolate frosting sits on a white plate. A fork holds a bite-sized piece in front of the cake. The background is softly blurred.

The Peanut Butter Problem

Peanut butter is tricky in cakes because it is high in fat. Too much creates a heavy, oily crumb; too little leaves the cake with only a trace of flavor. This recipe balances creamy peanut butter with vegetable oil and sour cream so the crumb stays tender and the flavor stays front and center.

Bowl of flour, sugar, eggs, oil, sour cream, peanut butter, milk, vanilla extract, baking powder, baking soda, and salt, each labeled, arranged on a white countertop.

Key Ingredients & Their Function

These ingredients are central to the cake’s texture and flavor:

  • Creamy peanut butter: Use regular creamy (not natural) peanut butter to keep fat and moisture consistent so the cake bakes predictably.
  • Vegetable oil: Oil preserves moisture and lets the peanut butter flavor remain prominent without adding butter flavor.
  • Sour cream: Adds tenderness and a slight tang that balances sweetness.
  • Room-temperature eggs and milk: Avoids a curdled-looking batter and promotes even baking.
  • Unsweetened natural cocoa: Sifted into the frosting to avoid clumps and ensure a silky texture.
A close-up of a sliced yellow cake with two layers, filled and topped with chocolate frosting, on a white plate.

2 Layers or 3 Layers – You Pick!

This recipe works well as either a two-layer or three-layer cake. Two layers are slightly taller per layer and easier for beginners. Three layers add more frosting per bite and create a more celebratory presentation.

Three slices of yellow cake with chocolate frosting on white plates, forks beside them, with a white mug of milk and a vase of yellow tulips in the background on a peach-colored cloth.

How to Make Homemade Peanut Butter Cake

Follow these straightforward steps for a reliable result. Preheat oven to 350º F. Grease and line two or three 8-inch pans with parchment circles for easy removal.

Smiling person in a green striped shirt mixes flour in a green bowl on a kitchen counter.
A person in a green striped shirt uses a hand mixer in a glass bowl in a kitchen.

Whisk together the flour, baking powder, baking soda, and salt and set aside. In a large bowl, beat the peanut butter, vegetable oil, and granulated sugar until combined, about 1 minute. Add the eggs, sour cream, milk, and vanilla, then mix until smooth. Gradually add the flour mixture and mix just until no dry streaks remain—overmixing will toughen the cake.

A woman in a green striped shirt pours liquid from a measuring cup into a Pyrex bowl with eggs and sugar on a kitchen counter.
A woman in a green striped shirt uses a hand mixer to blend ingredients in a Pyrex bowl on a kitchen counter.

Divide the batter evenly among pans: about 3 cups (730 g) per pan for two pans, or about 2 cups (480 g) per pan for three pans. Bake two pans for 38–45 minutes or three pans for 30–37 minutes, until a toothpick inserted in the center comes out clean. Cool the cakes in their pans for 20–30 minutes, then loosen the edges and transfer to a cooling rack to cool completely before frosting.

A bowl with batter sits on a granite counter.
Two round cakes in white pans rest on a light surface.

The Chocolate Frosting

Beat room-temperature unsalted butter on high for 2–3 minutes until light and fluffy. Sift in the cocoa powder and 3 cups of powdered sugar to avoid lumps, then beat on low until thick. Mix in 3 tablespoons heavy cream, vanilla, and salt. Add the remaining 1–2 cups of powdered sugar on low speed until you reach your desired sweetness and consistency. If the frosting is too thick, beat in an extra tablespoon of cream.

A two-layer sponge cake with chocolate frosting in the middle sits on a white cake stand.
A hand uses a spatula to spread chocolate frosting on the side of a two-layer yellow cake, placed on a white cake stand.

Assembling the Cake

Spread a thin layer of frosting on your cake plate to act as glue. Place the first layer on the plate. For a two-layer cake, spread 1 cup of frosting between the layers. For a three-layer cake, use about 3/4 cup of frosting between each layer. Use the remaining frosting to coat the top and sides. Level layers if necessary before stacking for a neat finish.

A close-up of a slice of yellow cake with chocolate frosting, stacked in two layers, served on a white plate with a blurred background.

Storage and Make Ahead

This cake stays moist through day two and three. Store covered at room temperature or in the refrigerator. To make ahead, bake layers up to a day early and wrap them tightly in plastic wrap. For longer storage, wrap cooled, unfrosted layers individually and freeze; thaw wrapped at room temperature before frosting.

A slice of yellow cake with chocolate frosting sits on a white plate with a fork. A glass of milk and more cake slices are in the background.

FAQ

Can I use natural peanut butter in this recipe?

I don’t recommend natural peanut butter because it separates and has inconsistent fat content, which can affect texture. Use regular creamy peanut butter for the best result.

Can I freeze this peanut butter cake?

Yes. Wrap cooled, unfrosted layers individually in plastic wrap and freeze. Thaw at room temperature while still wrapped, then frost.

Can I use peanut butter frosting instead of chocolate?

Yes. A peanut butter cream cheese frosting pairs nicely if you prefer more peanut butter flavor. If using cream cheese frosting, add 8 ounces of room-temperature cream cheese to the frosting base and adjust sugar to taste.

More Peanut Butter Dessert Ideas

  • Peanut butter cups
  • Chocolate peanut butter bars
  • Homemade peanut butter cookies
  • Peanut butter cupcakes

Peanut Butter Cake with Chocolate Frosting

Yields: 16 servings

Ingredients

Peanut Butter Cake

  • 2 1/2 cups (300 g) all-purpose flour
  • 2 1/4 tsp baking powder
  • 1/2 tsp baking soda
  • 1/2 tsp salt
  • 3/4 cup (201 g) creamy peanut butter
  • 2/3 cup (132 g) vegetable oil (any neutral oil)
  • 1 3/4 cups (346 g) granulated sugar
  • 4 large eggs, room temperature
  • 1 cup (227 g) sour cream, room temperature
  • 1/2 cup (113 g) milk, room temperature
  • 1 tbsp vanilla extract

Chocolate Frosting

  • 2 cups (452 g) unsalted butter, room temperature
  • 1 cup (84 g) unsweetened natural cocoa powder, sifted
  • 4–5 cups (454–567 g) powdered sugar, sifted
  • 3–4 tbsp heavy cream or milk
  • 1/4 tsp salt
  • 1 tsp vanilla extract

Instructions

Cake

  1. Preheat oven to 350º F. Grease and line two or three 8-inch pans with parchment circles.
  2. Whisk flour, baking powder, baking soda, and salt; set aside.
  3. In a large bowl, beat peanut butter, vegetable oil, and sugar for about 1 minute until combined.
  4. Add eggs, sour cream, milk, and vanilla; beat until smooth.
  5. Gradually add the dry ingredients, mixing just until incorporated.
  6. Divide batter evenly: about 3 cups (730 g) per pan for two pans, or 2 cups (480 g) per pan for three pans.
  7. Bake two pans 38–45 minutes or three pans 30–37 minutes, until a toothpick comes out clean.
  8. Cool in pans 20–30 minutes, then loosen edges and transfer to a rack to cool completely.

Chocolate Frosting

  1. Beat butter on high for 2–3 minutes until light and fluffy.
  2. Sift in cocoa powder and 3 cups powdered sugar; beat on low until thick and combined.
  3. Add 3 tbsp heavy cream, vanilla, and salt. Add remaining 1–2 cups powdered sugar on low speed until you reach desired sweetness and consistency. If too thick, add an extra tablespoon of cream.

Assemble

  1. Spread a thin layer of frosting on the cake plate, place the first layer on top.
  2. For two layers, spread 1 cup frosting between layers. For three layers, spread 3/4 cup between each layer.
  3. Use remaining frosting to coat the top and sides. Level layers if needed for a clean finish.

Notes

  • Gluten-free: Substitute a 1:1 gluten-free flour blend for all-purpose flour.
  • To store: Keep covered at room temperature or refrigerated; cake stays moist for several days.
  • Make ahead: Bake layers up to one day ahead and wrap tightly; frost when ready.
  • To freeze: Wrap cooled, unfrosted layers individually and freeze. Thaw wrapped before frosting.