This cake is a soft, moist vanilla base swirled with rich peanut butter and a hint of chocolate for visual drama. The frosting is silky, sweet, and packed with nutty flavor. It works well for birthdays, potlucks, or a weekend treat.
Ingredients
- 2 ½ cups (312 g) all‑purpose flour – spoon into the cup and level; do not scoop directly to avoid compacting.
- 2 tsp (8 g) baking powder – provides lift; measure with a level spoon.
- ½ tsp (2 g) baking soda – reacts with the acidic milk to help the cake rise.
- ½ tsp (2.5 g) fine sea salt – balances the sweetness.
- 1 cup (226 g) unsalted butter, softened to about 68°F (20°C) – softened butter incorporates air more easily.
- 1 ½ cups (300 g) granulated sugar – adds sweetness and helps create a tender crumb.
- 3 large eggs, room temperature – room‑temperature eggs emulsify better and give a uniform texture.
- 1 cup (240 ml) whole milk, slightly warmed (about 110°F/43°C) – warm milk activates the baking soda.
- 1 tsp (5 ml) pure vanilla extract – adds depth of flavor.
- ½ cup (120 ml) smooth creamy peanut butter, divided – half goes in the batter, half in the frosting.
- ¼ cup (30 g) unsweetened cocoa powder (optional for swirl) – provides a contrasting color.
- ¼ cup (60 ml) hot water (only if using cocoa) – dissolves cocoa for a smooth swirl.
- For the frosting: ½ cup (113 g) unsalted butter, softened; ½ cup (120 ml) peanut butter; 3 cups (360 g) powdered sugar, sifted; 2‑3 tbsp (30‑45 ml) heavy cream; ½ tsp (2.5 ml) vanilla extract; pinch of salt.
Instructions
- Preheat the oven to 350°F (177°C). Position the rack in the middle of the oven. Grease a 9‑inch (23 cm) round cake pan with butter, then dust with a thin layer of flour, tapping out excess. Alternatively, line the pan with parchment paper for a cleaner release.
- In a medium bowl whisk together the flour, baking powder, baking soda, and salt. Whisking aerates the dry mix and ensures the leavening agents are evenly distributed.
- Using a handheld or stand mixer on medium speed, cream the softened butter and granulated sugar together until the mixture is pale, fluffy, and has increased in volume. This usually takes 3–4 minutes. Scrape the sides of the bowl frequently to keep the mixture uniform.
- Add the eggs one at a time. After each egg, beat for about 20 seconds until fully incorporated before adding the next. This prevents curdling and keeps the batter smooth.
- Stir in the vanilla extract and the first ½ cup of peanut butter. Use a spatula to scrape the sides, then mix until the peanut butter is fully blended and the batter is uniform in color.
- Begin adding the dry ingredients to the butter‑egg mixture in three additions, alternating with the warm milk. Start with one‑third of the dry mix, then half of the milk, then another third of the dry mix, the remaining milk, and finish with the last dry mix. Mix on low speed just until no dry streaks remain; over‑mixing can develop gluten and make the cake tough.
- If you are using cocoa for a visual swirl, dissolve the cocoa powder in the hot water, stirring until smooth. Drop the cocoa mixture in two or three spoonfuls over the batter in the pan and use a thin knife or skewer to gently swirl in a “crazy” pattern. Do not over‑mix; the goal is a marbled appearance.
- Pour the batter into the prepared pan, spreading it evenly with a spatula. Tap the pan lightly on the counter to release any large air bubbles.
- Place the pan in the preheated oven. Bake for 30–35 minutes. The cake is done when a toothpick inserted about 1 inch (2.5 cm) from the edge comes out clean, and the top is lightly golden. The center should spring back when pressed gently with a fingertip.
- Remove the cake from the oven and set the oven to “warm” (about 200°F/93°C) to keep the heat steady while the cake cools. Allow the cake to sit in the pan for 15 minutes; this helps the crumb set and reduces the chance of cracking.
- Run a thin knife around the edge of the pan to loosen the cake, then invert onto a wire rack. Let it cool completely, at least 45 minutes, before frosting. A warm cake can melt the butter in the frosting and create a greasy surface.
- While the cake cools, prepare the frosting. In a large bowl, beat the softened butter and ½ cup peanut butter together on medium speed until creamy, about 2 minutes. The mixture should be smooth with no lumps.
- Gradually add the sifted powdered sugar, one cup at a time, mixing on low speed after each addition. This prevents a sugar cloud and ensures even incorporation.
- When the sugar is fully mixed, add 2 tbsp heavy cream, vanilla extract, and a pinch of salt. Increase the mixer speed to high and beat for 1 minute until the frosting is light, fluffy, and spreadable. If the frosting is too stiff, add another tablespoon of cream; if too soft, add a little more powdered sugar.
- Spread the frosting over the cooled cake using an offset spatula. Start at the center and work outward to create a smooth dome. For a “crazy” finish, you can drizzle a thin ribbon of melted chocolate or extra peanut butter on top and use a toothpick to create additional swirls.
- Slice with a serrated knife that has been warmed under hot water and dried. Warmed blades cut cleanly through the moist crumb without dragging.
Why the Cake Can Turn Dry, Dense, or Crumbly
Overmixing the batter stretches gluten strands, which makes the crumb tight and dry. The fix is to stop mixing as soon as the last streak of flour disappears. Use a rubber spatula for the final fold to keep mixing gentle.
Measuring flour with the scoop‑and‑level method adds about 20 % more flour, leading to a dense texture. Weighing flour on a kitchen scale eliminates this error. If you only have volume measures, spoon flour into the cup and level it with a flat edge.
Underbaking leaves a gummy interior that collapses as it cools, creating cracks and a crumbly appearance. Check doneness with a toothpick and also press the top lightly; it should feel set and not jiggle.
Using cold milk can shock the batter, slowing the rise and resulting in a flat cake. Warm the milk to about 110°F (43°C) before adding it to the batter.
Insufficient fat, such as using low‑fat butter or skipping the peanut butter, reduces moisture retention. The recipe’s butter‑to‑flour ratio (about 1:1.4 by weight) is calibrated for a tender crumb.
What Can I Substitute If I’m Out of Peanut Butter or Butter
Almond butter works in the same 1:1 ratio but adds a milder, slightly sweet flavor. Because almond butter contains less saturated fat, the frosting may be a touch softer; increase powdered sugar by ¼ cup (30 g) to regain stiffness.
Unsalted margarine can replace butter 1:1 for dairy‑free needs. The texture remains similar, though the flavor loses some richness. Choose a stick margarine with at least 80 % fat for best results.
For a completely dairy‑free version, substitute coconut oil (solid) for butter, using the same weight (113 g). Use a plant‑based milk such as oat or soy milk in place of whole milk. The cake will be slightly lighter and have a faint coconut note.
If you lack powdered sugar for the frosting, you can blend granulated sugar in a blender or food processor until fine, then sift. Use the same weight (360 g) as the powdered sugar called for.
How to Create the Crazy Swirl Effect
The visual “crazy” swirl comes from contrasting colors and gentle folding. Start with a base batter that is fully mixed and smooth. Prepare a small amount of cocoa‑water mixture (¼ cup cocoa dissolved in hot water) and let it cool for 2 minutes.
Drop the cocoa mixture onto the surface of the batter in three to four spoonfuls, spacing them evenly. Using a thin, flexible knife, a skewer, or a chopstick, draw quick, irregular lines through the batter. The goal is to create thin ribbons of chocolate that intersect the peanut‑butter‑tinged batter.
Do not over‑stir; the ribbons should remain visible after baking. If you want a more dramatic look, add a second color by mixing a few drops of food‑grade red or orange gel into a separate 1‑tbsp portion of batter before dropping it in.
Test a small 4‑inch (10 cm) pan first to see how the swirl behaves. Adjust the amount of cocoa or colored batter if the ribbons disappear during baking.
Safety Considerations for Raw Ingredients
This recipe uses raw eggs in the batter. To reduce the risk of salmonella, you may use pasteurised eggs, which are available in most grocery stores. If you choose regular eggs, keep the batter refrigerated and bake it promptly; do not let it sit at room temperature for more than 1 hour.
The frosting contains powdered sugar and butter but no raw flour, so the typical flour‑borne risk is not present. However, if you ever make a no‑bake version that uses raw flour, heat‑treat the flour to 160°F (71°C) in the oven on a baking sheet for 5 minutes, then let it cool before use.
All perishable components—cake, frosting, and any leftovers—should be refrigerated within 2 hours of preparation. Store in an airtight container to prevent drying and to keep out contaminants.
When serving to vulnerable groups (pregnant people, young children, elderly, immunocompromised), ensure the frosting is fully set and the cake has been baked to a safe internal temperature. Use a food thermometer to confirm the cake reaches at least 190°F (88°C) in the center; this is well above the USDA safe minimum for egg‑based baked goods (160°F/71°C).
How to Store This Cake and Keep Frosting Fresh
Cool the cake completely, then wrap the frosted cake tightly in plastic wrap, making sure the wrap contacts the frosting to prevent a dry skin. Place the wrapped cake in a large resealable bag or airtight container.
Refrigerate the cake within 2 hours of frosting. It will stay moist and flavorful for 3–4 days. Before serving, let the cake sit at room temperature for about 20 minutes; this restores the frosting’s softness.
For longer storage, slice the cake into individual wedges, wrap each piece in parchment, then place the wedges in a freezer‑safe zip‑top bag. Freeze for up to 2 months. To thaw, move the slices to the refrigerator overnight, then bring to room temperature before serving.
Avoid storing the cake at room temperature for more than 2 hours, as the butter in the frosting can become a breeding ground for bacteria. Do not attempt to can or preserve the cake at ambient temperature.
Related
- Basic Peanut Butter Cookie Recipe
- Peanut Butter Cookies for Kids
- Oatmeal Cookies With Frosting Recipe
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).