Hero shot of a tall two-layer homemade chocolate cake with glossy chocolate ganache frosting on a white cake stand

If you have ever wanted to bake a chocolate cake that tastes better than anything from a box mix — rich, deeply chocolatey, perfectly moist — this is the only recipe you will ever need. I have tested this dozens of times in my home kitchen, and it works every single time, even for total beginners.

No fancy equipment. No hard-to-find ingredients. Just a really, truly great chocolate cake.


What You Will Need Before You Start

Ingredients at a Glance

Ingredient Amount Approx. Cost (USA)
All-purpose flour 1¾ cups (220g) ~$0.30
Unsweetened cocoa powder ¾ cup (75g) ~$1.20
Granulated sugar 2 cups (400g) ~$0.60
Baking soda 2 tsp ~$0.10
Baking powder 1 tsp ~$0.10
Salt 1 tsp ~$0.05
Eggs (large) 2 ~$0.60
Buttermilk 1 cup (240ml) ~$0.70
Strong hot coffee 1 cup (240ml) ~$0.20
Vegetable oil ½ cup (120ml) ~$0.40
Pure vanilla extract 2 tsp ~$0.30
Total estimated cost ~$4.55 for 12 servings

Why coffee? Coffee does not make the cake taste like coffee — it makes the chocolate flavour taste deeper and richer. It is the secret ingredient most bakeries use.

For the Chocolate Frosting

Ingredient Amount Approx. Cost (USA)
Unsalted butter (softened) 1 cup (225g) ~$1.50
Unsweetened cocoa powder ¾ cup (75g) ~$1.20
Powdered sugar 3 cups (360g) ~$0.80
Heavy cream ⅓ cup (80ml) ~$0.60
Pure vanilla extract 1 tsp ~$0.15
Pinch of salt ~$0.02

Equipment You Will Need

  • Two 9-inch (23cm) round cake pans
  • Large mixing bowl
  • Whisk and rubber spatula
  • Electric hand mixer or stand mixer (for frosting)
  • Wire cooling rack
  • Measuring cups and spoons

1. Prepare Your Pans and Oven

Preheat your oven to 350°F (175°C). This matters — an oven that is not fully preheated will cause uneven rising.

Grease both 9-inch cake pans with butter or baking spray, then line the bottoms with a circle of parchment paper. Grease the parchment too. This extra step means your cakes will come out cleanly every time.

Set the pans aside while you mix the batter.


2. Mix the Dry Ingredients

In a large mixing bowl, sift together:

  • 1¾ cups all-purpose flour
  • ¾ cup unsweetened cocoa powder
  • 2 cups granulated sugar
  • 2 tsp baking soda
  • 1 tsp baking powder
  • 1 tsp salt

Whisk everything together until combined. Sifting the cocoa powder is important — it tends to clump, and those clumps will not mix out later.


3. Mix the Wet Ingredients

In a separate medium bowl (or a large measuring jug), whisk together:

  • 2 large eggs
  • 1 cup buttermilk
  • ½ cup vegetable oil
  • 2 tsp pure vanilla extract

Whisk until the eggs are fully incorporated and the mixture looks uniform. The oil keeps this cake moist for days — do not be tempted to swap it for butter in the batter.

No buttermilk? Make a quick substitute: add 1 tablespoon of white vinegar or lemon juice to a measuring cup, then fill to the 1-cup line with regular whole milk. Stir and let it sit for 5 minutes before using.


4. Combine the Batter

Pour the wet ingredients into the dry ingredients. Stir with a rubber spatula or whisk until just combined — a few streaks of flour are fine at this point.

Now slowly stir in 1 cup of hot, strong coffee. The batter will look very thin. That is completely normal and exactly right. Do not worry — the thin batter is what gives this cake its incredibly moist crumb.

Mix until smooth and no dry patches remain, but do not overmix.


5. Pour and Bake

Divide the batter evenly between your two prepared cake pans. Each pan should be about half full.

Place them on the centre rack of your preheated oven, side by side if possible. Bake for 30 to 35 minutes.

How to know when they are done: Insert a toothpick into the centre of a cake. If it comes out with a few moist crumbs (not wet batter), it is done. The top should spring back lightly when touched.


6. Cool the Cakes Completely

Two baked chocolate cake layers cooling on a wire rack on a marble countertop

Remove the pans from the oven and let them cool in the pans for 15 minutes. Then run a thin knife around the edge of each pan, flip the cakes out onto a wire cooling rack, and peel off the parchment.

Let the layers cool completely before frosting — at least 1 hour at room temperature. If you frost a warm cake, the frosting will slide right off and melt.

Make ahead tip: Wrap cooled cake layers tightly in plastic wrap and refrigerate for up to 2 days, or freeze for up to 3 months. Frost straight from the fridge — cold cake is actually easier to frost.


7. Make the Chocolate Frosting

In a large bowl, beat the softened butter with an electric hand mixer on medium speed for about 2 minutes until pale and fluffy.

Add the ¾ cup cocoa powder and mix until combined. Then add the powdered sugar, one cup at a time, alternating with splashes of heavy cream. Beat on medium-high between additions.

Add the vanilla extract and a pinch of salt, then beat for 2 to 3 minutes more until the frosting is very smooth, light, and spreadable.

Frosting too thick? Add cream 1 teaspoon at a time.
Frosting too thin? Add powdered sugar 2 tablespoons at a time.


8. Assemble and Frost the Cake

Place one cake layer on your serving plate or cake stand, flat side up. Spoon a generous amount of frosting onto the centre (about ¾ cup) and spread it evenly to the edges with an offset spatula or butter knife.

Set the second layer on top, flat side down (domed side up). Press gently so it sits level.

Apply a thin layer of frosting all over the outside of the cake — top and sides. This is called a crumb coat and it traps any loose crumbs so your final layer looks clean. Refrigerate for 15 minutes.

Then apply the remaining frosting generously over the top and sides. Smooth it out or create swirls — either way looks beautiful.


9. Slice and Serve

Your cake is ready to slice. Use a sharp knife wiped clean between cuts for neat slices.

This cake keeps well covered at room temperature for up to 3 days, or in the refrigerator for up to 5 days. Bring refrigerated slices to room temperature for 20 minutes before serving for the best texture.

Quick Reference: Chocolate Cake Troubleshooting

Problem Likely Cause Fix
Cake sank in the middle Underbaked or oven too hot Always check with a toothpick
Cake is dry Overbaked or too much flour Measure flour by spooning into cup, not scooping
Cake stuck to pan Pan not greased well enough Always use parchment + grease
Frosting melted Cake was still warm Cool completely before frosting
Frosting is grainy Butter too cold Use truly room-temperature butter

Final Thoughts

This homemade chocolate cake is the kind of recipe you will come back to again and again — for birthdays, for weekends when you just want to bake something, for any occasion that deserves something a little special.

The steps are simple, the ingredients are affordable (under $5 for the whole cake), and the result is genuinely impressive. Once you make it from scratch, you will never want a box mix again.

If you try this recipe, I would love to know how it turned out. Leave a comment below or tag me on Pinterest — and if you find a shortcut or variation that works well, share it!

Happy baking. 🍫

Updated: