This decadent chocolate cake is the only recipe you need. It’s moist and fudgy with deep chocolate flavor and can be made in several pan sizes. Bake it as a layered cake and finish with chocolate frosting for an impressive dessert.
*Originally posted April 2016. Updated May 18, 2021 with recipe tweaks, new photos and tips.*
The Perfect Chocolate Cake
This double chocolate cake delivers everything you want in a celebration cake:
- Extremely moist, tender crumb
- Generous, creamy chocolate frosting
- Made with simple pantry ingredients
- Rich chocolate flavor without being overly sweet
It’s an ideal choice for chocolate lovers—elegant in appearance and reliably delicious.
This recipe is adapted from the well-known Hershey’s chocolate cake. I kept the pantry-friendly approach but adjusted the dry and liquid ratios slightly so the cake stays perfectly balanced—never gummy or too sweet.
Key Ingredients
All ingredients contribute, but these are especially important:
- Oil. Oil keeps the cake tender and helps it stay moist longer than butter. In chocolate cake, the buttery flavor isn’t necessary, so oil is preferred for texture.
- Buttermilk. It creates a soft, tender crumb. If you don’t have buttermilk, see the notes for a simple milk-and-vinegar substitute.
- Hot coffee. Adding hot coffee intensifies the chocolate flavor by “blooming” the cocoa. The coffee taste does not come through—only richer chocolate notes.
Making the Batter
Make the batter in four straightforward steps:
- Whisk together the dry ingredients.
- Whisk the wet ingredients (oil, sugar, eggs, vanilla, then buttermilk) in a separate bowl.
- Combine dry into wet until smooth—the batter will be thick at first.
- Slowly whisk in the hot coffee; the batter will thin out.
You can do this by hand with a whisk or use an electric mixer on low speed.
Cake Pan Sizes and Baking Times
- Two 8-inch pans (used for the photos): bake 35–40 minutes at 350°F. Use pans with at least 2.5-inch (5 cm) sides to prevent overflow.
- Three 8-inch pans: bake 30–35 minutes at 350°F.
- Two 9-inch pans: bake 30–35 minutes at 350°F.
- 9×13-inch pan: bake 35–40 minutes. Grease and lightly dust with cocoa; halve the frosting recipe for this size.
- For cupcakes, use a cupcake-specific version of this recipe.

Note: The photos show pans with tall sides and optional cake strips to encourage flat tops. Cake strips help but aren’t required unless you bake layer cakes often.
Assembling & Frosting the Cake
This frosting makes a thick, generous coating. The amount below is enough for a two- or three-layer cake (you may have a little left with two layers). Follow these tips for a clean finish:
- Make sure layers are completely cool before frosting.
- If layer tops are domed, trim them with a serrated knife once cooled.
- Assemble and frost the cake on the plate or stand you’ll serve from.
- If crumbs appear while frosting the sides, apply a thin crumb coat, chill for 1 hour, then finish with a thick final coat. The crumb coat seals loose crumbs so the final frosting stays clean.

When finished, you’ll have a moist, deeply chocolatey cake that’s easier to bake than it looks.
More Layer Cake Recipes to Love
- Funfetti Cake
- Classic Birthday Cake (yellow cake with chocolate frosting)
- Chocolate Peanut Butter Cake
- Strawberry Layer Cake


Double Chocolate Cake
Equipment
- Two 8-inch (20 cm) round cake pans with sides at least 2.5 inches (5 cm) tall
Ingredients
For the Chocolate Cake
- 2 cups all-purpose flour (250 g), spooned & leveled
- 3/4 cup cocoa powder (60 g)
- 2 teaspoons baking soda
- 1 teaspoon baking powder
- 1/2 teaspoon salt
- 1/2 cup vegetable oil (120 ml)
- 2 cups granulated sugar (200 g)
- 2 large eggs, room temperature
- 2 teaspoons vanilla extract
- 1 cup buttermilk (240 ml), room temperature
- 2/3 cup hot freshly brewed coffee (180 ml)
For the Frosting
- 1 1/2 cups unsalted butter (339 g), room temperature
- 3/4 cup cocoa powder (60 g)
- 4–5 cups powdered sugar (440–550 g)
- 1/2 teaspoon salt
- 4–6 tablespoons whipping cream (60–90 ml)
Instructions
Chocolate Cake
- Preheat oven to 350°F (180°C). Line the bottoms of two 8-inch round pans with parchment, grease the sides and dust lightly with cocoa. Pans should have at least 2.5-inch sides.
- Whisk together flour, cocoa, baking soda, baking powder and salt in a large bowl. Sift cocoa first if lumpy.
- In another large bowl whisk oil, sugar, eggs and vanilla until combined. Stir in the buttermilk.
- Mix the wet ingredients into the dry until smooth, then carefully whisk in the hot coffee. Batter will thin.
- Divide batter between prepared pans and bake 35–40 minutes, or until a toothpick inserted in the center comes out clean. Cool in pans 30 minutes, then transfer to a wire rack to cool completely.
Frosting
- Beat butter in a large bowl until smooth and fluffy.
- With mixer on low, add 2 cups powdered sugar and beat in. Sift powdered sugar if lumpy.
- Add cocoa powder and salt, mixing on low speed. Sift cocoa if needed.
- Add remaining powdered sugar in 1/2–1 cup increments, alternating with 1–2 tablespoons cream, until the frosting reaches desired sweetness and a thick, spreadable consistency.
Assembling the Cake
- Ensure layers are completely cool. Trim domed tops if necessary.
- Place one layer top-side down on your serving plate. Spread 1/4–1/3 inch of frosting to level the layer.
- Top with the second layer, then frost the sides and top. If crumbs mix into the frosting, apply a thin crumb coat, chill 1 hour, then finish with a thick outer layer of frosting.
Notes
- Pan sizes & baking times:
- Two 8-inch pans (high sides): 35–40 minutes.
- Two 9-inch pans: 30–35 minutes.
- Three 8-inch pans: 30–35 minutes.
- 9×13-inch pan: 35–40 minutes. Grease and dust with cocoa; halve the frosting and serve from the pan.
- Either Dutch-processed or natural cocoa works; Dutch gives a slightly deeper flavor.
- To make a buttermilk substitute: add 1 tablespoon white vinegar to a cup measure, fill to 1 cup with milk, stir and let sit 5 minutes.
- Hot coffee can replace boiling water to boost chocolate flavor.
- Storage & make-ahead:
- Unfrosted layers: airtight at room temperature up to 2 days, or in the fridge up to 5 days.
- Freeze unfrosted layers wrapped tightly for up to 2 months; thaw in the fridge (avoid room-temperature thawing).
- Frosted cake: covered at room temperature up to 8 hours, or refrigerated up to 5 days. Bring to room temperature 30 minutes before serving for softer frosting.
- Nutrition estimates assume 12 equal slices and all frosting used.
Nutrition