8 Homemade Chocolate Cake Recipes for Every Occasion
A homemade chocolate cake can be a simple square to share with coffee or a layered centerpiece covered in buttercream. This collection brings together eight chocolate cake recipes, from a classic moist layer cake to glossy ganache, mocha, orange, raspberry, peanut butter, an eggless bake and cupcakes.
Each recipe includes its own ingredient list, pan size, baking instructions and matching image. Several use the same flexible cocoa-and-oil batter, with different finishes and formats; the loaf and eggless cake use their own formulas.
Find Your Chocolate Cake
- 1. Classic Moist Chocolate Layer Cake
- 2. Dark Chocolate Ganache Cake
- 3. Mocha Chocolate Sheet Cake
- 4. Chocolate Orange Loaf Cake
- 5. Chocolate Raspberry Layer Cake
- 6. Chocolate Peanut Butter Snack Cake
- 7. Eggless Chocolate Snack Cake
- 8. Chocolate Fudge Cupcakes
Read This Before Baking
Use a kitchen scale for the dry ingredients and level measuring spoons for the leaveners. The cocoa listed here is natural unsweetened cocoa, not sweetened drinking chocolate. Use the specified pan size and avoid filling any pan more than two-thirds full. Bake excess batter separately if your pan is shallower than specified.
All temperatures are for a conventional oven. Baking times are estimates: begin checking at the lower end, then use the cake’s spring and a skewer to judge doneness. Cooling time is separate from prep and baking time. Butter for frosting should be soft enough to indent, but not oily or melted.
1. Classic Moist Chocolate Layer Cake

A soft cocoa crumb and generous chocolate buttercream make this the celebration cake closest to the inspiration image. Hot water helps disperse the cocoa, while oil keeps the crumb tender.
Pan: Two 8-inch round pans, at least 2 inches deep
Makes: 12 slices
Prep: about 25 minutes | Bake: 30–38 minutes | Cooling: allow about 90 minutes, or until completely cool
Cake Ingredients
- 210 g all-purpose flour
- 350 g granulated sugar
- 65 g natural unsweetened cocoa powder
- 1½ tsp baking powder
- 1½ tsp baking soda
- ¾ tsp fine salt
- 2 large eggs
- 240 ml milk
- 120 ml neutral vegetable oil
- 2 tsp vanilla extract
- 240 ml hot water
Frosting or Topping
- 225 g unsalted butter, softened
- 360 g powdered sugar, sifted
- 65 g cocoa powder, sifted
- 60–90 ml milk
- 2 tsp vanilla extract
- Pinch of salt
- 20 g chocolate shavings, optional
How to Make It
- Heat a conventional oven to 350°F (175°C). Grease both pans and line their bases with parchment.
- Whisk flour, sugar, cocoa, baking powder, baking soda and salt. Add eggs, milk, oil and vanilla; mix until smooth, about 1 minute. Slowly whisk in hot water. The batter will be thin.
- Divide evenly between pans. Bake for 30–38 minutes, until the centers spring back and a skewer has a few moist crumbs but no wet batter.
- Cool in pans for 10 minutes, then turn onto racks. Peel off parchment and cool completely, about 90 minutes.
- Beat butter until creamy. Gradually beat in powdered sugar and cocoa, then 60 ml milk, vanilla and salt. Beat until fluffy, adding remaining milk a teaspoon at a time only if needed.
- Level cooled layers if necessary. Spread frosting between them, then cover the top and sides. Reserve a little for simple piped rosettes and finish with optional shavings.
Baking tip: Cool the cake fully before frosting. Even a slightly warm center can soften buttercream.
2. Dark Chocolate Ganache Cake

This single-layer cake gets its rich finish from a glossy chocolate-and-cream topping. It is a good choice when you want a chocolate centerpiece without stacking layers.
Pan: One 8-inch round pan, at least 2 inches deep
Makes: 8 slices
Prep: about 20 minutes | Bake: 30–38 minutes | Cooling: allow about 90 minutes, or until completely cool
Cake Ingredients
- 105 g all-purpose flour
- 175 g granulated sugar
- 33 g natural unsweetened cocoa powder
- ¾ tsp baking powder
- ¾ tsp baking soda
- ¼ tsp fine salt
- 1 large egg
- 120 ml milk
- 60 ml neutral vegetable oil
- 1 tsp vanilla extract
- 120 ml hot water
Frosting or Topping
- 150 g dark chocolate, 55–65% cocoa, finely chopped
- 150 ml heavy cream
How to Make It
- Heat oven to 350°F (175°C). Grease the pan and line its base with parchment.
- Whisk flour, sugar, cocoa, baking powder, baking soda and salt. Mix in egg, milk, oil and vanilla, then gradually stir in hot water.
- Pour into the pan and bake for 30–38 minutes. A skewer should show moist crumbs but no liquid batter. Cool in pan for 10 minutes, then turn out and cool completely.
- Put chopped chocolate in a heatproof bowl. Heat cream until steaming with small bubbles at the edge, then pour over chocolate. Stand for 3 minutes and stir gently until smooth.
- Let ganache thicken for 15–25 minutes, stirring occasionally. Spoon onto the cooled cake and ease a little over the edge. Allow it to settle before slicing.
Baking tip: Ganache should pour slowly, like thick honey. If too runny, give it more cooling time.
3. Mocha Chocolate Sheet Cake

Coffee in the batter deepens the chocolate flavor, and a pale mocha buttercream adds a clear coffee note. This easy-to-cut sheet cake is convenient for sharing.
Pan: One 9 × 13-inch metal baking pan
Makes: 15 pieces
Prep: about 25 minutes | Bake: 30–38 minutes | Cooling: allow about 90 minutes, or until completely cool
Cake Ingredients
- 210 g all-purpose flour
- 350 g granulated sugar
- 65 g natural unsweetened cocoa powder
- 1½ tsp baking powder
- 1½ tsp baking soda
- ¾ tsp fine salt
- 2 large eggs
- 240 ml milk
- 120 ml neutral vegetable oil
- 2 tsp vanilla extract
- 240 ml hot brewed coffee
Frosting or Topping
- 170 g unsalted butter, softened
- 300 g powdered sugar, sifted
- 1 tbsp cocoa powder
- 2 tsp instant espresso powder
- 2 tbsp hot water
- 1 tsp vanilla extract
- 1–2 tbsp milk, if needed
How to Make It
- Heat oven to 350°F (175°C). Grease the pan and line the base with parchment.
- Combine flour, sugar, cocoa, leaveners and salt. Mix in eggs, milk, oil and vanilla. Slowly add hot coffee and whisk until smooth.
- Pour into the pan. Bake for 30–38 minutes, until a skewer in the center shows no wet batter. Cool completely in the pan on a rack.
- Dissolve espresso powder in 2 tablespoons hot water, then cool completely.
- Beat butter until creamy. Add powdered sugar and cocoa gradually, followed by cooled espresso and vanilla. Beat until fluffy; add milk only if needed for spreading.
- Spread frosting in soft swirls over the cooled sheet cake and cut into 15 pieces.
Baking tip: Cool the espresso mixture before adding it to the butter, or the frosting may become loose.
4. Chocolate Orange Loaf Cake

Orange zest gives this chocolate loaf a bright aroma without turning it into a citrus cake. A thin chocolate glaze and a little more zest finish it simply.
Pan: One 9 × 5-inch loaf pan
Makes: 10 slices
Prep: about 20 minutes | Bake: 45–55 minutes | Cooling: allow about 90 minutes, or until completely cool
Cake Ingredients
- 150 g all-purpose flour
- 40 g natural unsweetened cocoa powder
- 180 g granulated sugar
- 1 tsp baking powder
- ½ tsp baking soda
- ¼ tsp salt
- 2 large eggs
- 120 g plain yogurt
- 80 ml neutral oil
- 60 ml orange juice
- 1 tbsp finely grated orange zest
- 1 tsp vanilla
Frosting or Topping
- 100 g dark chocolate, finely chopped
- 75 ml heavy cream
- 1 tsp finely grated orange zest
How to Make It
- Heat oven to 350°F (175°C). Grease and parchment-line the loaf pan, leaving paper over the long sides.
- Whisk flour, cocoa, baking powder, baking soda and salt. In another bowl, whisk sugar, eggs, yogurt, oil, orange juice, zest and vanilla.
- Fold dry ingredients into wet just until no flour remains. Scrape into the pan and smooth the top.
- Bake for 45–55 minutes, until a skewer comes out clean or with a few moist crumbs. If the top darkens early, cover loosely with foil.
- Cool in pan for 15 minutes, then lift onto a rack and cool completely.
- Heat cream until steaming and pour over chopped chocolate. Wait 3 minutes, then stir smooth. Cool until slightly thickened, spread over loaf and scatter with zest.
Baking tip: Grate only the colored orange peel. The white pith beneath it can taste bitter.
5. Chocolate Raspberry Layer Cake

Tart raspberry jam cuts through the cocoa richness, and naturally pink raspberry buttercream makes a pretty finish. Freeze-dried raspberry powder adds flavor without excessive liquid.
Pan: Two 8-inch round pans, at least 2 inches deep
Makes: 12 slices
Prep: about 30 minutes | Bake: 30–38 minutes | Cooling: allow about 90 minutes, or until completely cool
Cake Ingredients
- 210 g all-purpose flour
- 350 g granulated sugar
- 65 g natural unsweetened cocoa powder
- 1½ tsp baking powder
- 1½ tsp baking soda
- ¾ tsp fine salt
- 2 large eggs
- 240 ml milk
- 120 ml neutral vegetable oil
- 2 tsp vanilla extract
- 240 ml hot water
Frosting or Topping
- 225 g unsalted butter, softened
- 400 g powdered sugar, sifted
- 20 g freeze-dried raspberries, finely ground and sieved
- 45–60 ml milk
- 1 tsp vanilla extract
- 120 g thick raspberry jam
- 125 g fresh raspberries, washed and dried
How to Make It
- Heat oven to 350°F (175°C). Grease pans and parchment-line the bases.
- Whisk dry cake ingredients. Add eggs, milk, oil and vanilla, mixing until smooth. Slowly whisk in hot water.
- Divide batter between pans. Bake for 30–38 minutes, until the centers spring back and a skewer shows no wet batter. Cool 10 minutes in pans, then turn out and cool fully.
- Beat butter until creamy. Gradually add powdered sugar and raspberry powder. Beat in 45 ml milk and vanilla, adding more milk only if needed.
- Set one layer on a plate. Spread a thin layer of buttercream and pipe a buttercream border around its edge. Spread jam inside the border, then add the second cake layer.
- Frost the top and sides with remaining buttercream. Add fresh raspberries just before serving.
Baking tip: Keep the jam within the frosting border so it does not squeeze out when the top layer goes on.
6. Chocolate Peanut Butter Snack Cake

Creamy peanut butter frosting turns a simple square chocolate cake into a rich afternoon treat. Chopped peanuts add a little crunch against the soft crumb.
Pan: One 8-inch square pan
Makes: 9 pieces
Prep: about 20 minutes | Bake: 28–35 minutes | Cooling: allow about 75 minutes, or until completely cool
Cake Ingredients
- 105 g all-purpose flour
- 175 g granulated sugar
- 33 g natural unsweetened cocoa powder
- ¾ tsp baking powder
- ¾ tsp baking soda
- ¼ tsp fine salt
- 1 large egg
- 120 ml milk
- 60 ml neutral vegetable oil
- 1 tsp vanilla extract
- 120 ml hot water
Frosting or Topping
- 85 g unsalted butter, softened
- 125 g smooth commercial peanut butter, not runny natural-style
- 150 g powdered sugar, sifted
- 2–3 tbsp milk
- ½ tsp vanilla
- 25 g chopped roasted peanuts
How to Make It
- Heat oven to 350°F (175°C). Grease and parchment-line the square pan.
- Whisk dry cake ingredients, then mix in egg, milk, oil and vanilla. Gradually whisk in hot water.
- Pour into the pan. Bake for 28–35 minutes, until a skewer in the center has moist crumbs but no wet batter.
- Cool completely in the pan on a rack.
- Beat butter and peanut butter together until smooth. Gradually add powdered sugar, then 2 tablespoons milk and vanilla. Beat until fluffy, adding extra milk only if needed.
- Spread frosting over cake, scatter with chopped peanuts and cut into nine squares.
Baking tip: This version contains peanuts. Use a clean knife between cuts for neater frosting edges.
7. Eggless Chocolate Snack Cake

This straightforward cake uses pantry ingredients and needs no eggs or dairy in the batter. A dusting of powdered sugar lets the chocolate crumb stay the focus.
Pan: One 8-inch square pan
Makes: 9 pieces
Prep: about 15 minutes | Bake: 30–35 minutes | Cooling: allow about 60 minutes, or until completely cool
Cake Ingredients
- 180 g all-purpose flour
- 200 g granulated sugar
- 30 g natural unsweetened cocoa powder
- 1 tsp baking soda
- ½ tsp fine salt
- 240 ml water, room temperature
- 80 ml neutral vegetable oil
- 1 tbsp white vinegar, 5% acidity
- 1 tsp vanilla extract
Frosting or Topping
- 1 tbsp powdered sugar for dusting
How to Make It
- Heat oven to 350°F (175°C). Grease the pan and line with parchment.
- Whisk flour, sugar, cocoa, baking soda and salt until evenly mixed.
- Whisk water, oil, vinegar and vanilla separately. Add to the dry mixture and stir just until smooth; do not beat excessively.
- Pour into the prepared pan immediately and bake for 30–35 minutes. The center should spring back lightly and a skewer should show no wet batter.
- Cool completely in the pan on a rack. Lift out, dust lightly with powdered sugar and cut into nine pieces.
Baking tip: Do not leave the mixed batter standing: the vinegar and baking soda start reacting as soon as they meet.
8. Chocolate Fudge Cupcakes

These individual chocolate cakes have a tender cocoa crumb and generous chocolate buttercream swirls. They are easy to portion for birthdays or small celebrations.
Pan: One standard 12-cup muffin tin
Makes: 12 cupcakes
Prep: about 25 minutes | Bake: 18–22 minutes | Cooling: allow about 60 minutes, or until completely cool
Cake Ingredients
- 105 g all-purpose flour
- 175 g granulated sugar
- 33 g natural unsweetened cocoa powder
- ¾ tsp baking powder
- ¾ tsp baking soda
- ¼ tsp fine salt
- 1 large egg
- 120 ml milk
- 60 ml neutral vegetable oil
- 1 tsp vanilla extract
- 120 ml hot water
Frosting or Topping
- 115 g unsalted butter, softened
- 200 g powdered sugar, sifted
- 35 g cocoa powder, sifted
- 30–45 ml milk
- 1 tsp vanilla
- 15 g chocolate shavings
How to Make It
- Heat oven to 350°F (175°C). Line a standard 12-cup muffin tin with paper liners.
- Whisk the dry cake ingredients. Mix in egg, milk, oil and vanilla, then slowly whisk in hot water.
- Divide batter among liners, filling each about halfway to two-thirds full. If your liners are smaller, bake any excess in additional liners rather than overfilling.
- Bake for 18–22 minutes, until tops spring back and a skewer shows no wet batter. Cool in tin for 5 minutes, then transfer cupcakes to a rack.
- Beat butter until creamy, then gradually add powdered sugar and cocoa. Beat in 30 ml milk and vanilla. Add remaining milk only as needed for a pipeable texture.
- Once cupcakes are completely cool, pipe or spread frosting over them and add chocolate shavings.
Baking tip: A spring-loaded scoop makes portioning easier, but leave room for the batter to rise.
How to Keep Chocolate Cake Soft
Measure flour carefully. Extra flour makes the crumb drier and heavier. Weighing it is more consistent than scooping it from the bag with a cup.
Do not overbake. The skewer does not have to be bone-dry; a few moist crumbs are fine. Liquid batter means the center needs more time.
Keep the hot liquid in the recipe. Thin batter is expected in the classic, ganache, mocha, raspberry, peanut butter and cupcake recipes. Adding extra flour to thicken it changes the intended texture.
Frost only when cool. A warm cake can melt the frosting and make stacked layers slide. Let layers cool completely before trimming or assembling.
Frosting Fixes
If buttercream feels stiff, add milk one teaspoon at a time. If it becomes too soft because the kitchen is warm, chill it briefly and beat again. Adding lots of extra powdered sugar immediately can make it unnecessarily sweet.
If ganache is too thin, let it cool longer. If it has firmed too much to spread, warm it gently in short bursts and stir. Pouring hot ganache over a cake can send most of it straight down the sides.
Make-Ahead and Serving Tips
For easier decorating, bake the layers ahead, let them cool fully and wrap them well. Keep the fresh raspberry garnish separate until serving. Wrap unfrosted cake before freezing and thaw while wrapped to help limit drying.
Keep finished cakes covered. Refrigerate the ganache, fresh raspberry and dairy-frosted versions; bring only the portion you plan to serve out briefly to soften. Follow the storage guidance on your dairy and fruit products. A cake carrier or tall covered container helps protect piped frosting.
Frequently Asked Questions
Can I use coffee instead of hot water?
For the recipes that list hot water, you can replace it with the same volume of hot brewed coffee for a deeper flavor. The mocha version already uses coffee and adds espresso to the frosting. Use decaf if preferred.
Can I use Dutch-process cocoa?
These formulas specify natural cocoa. Dutch-process cocoa has different acidity and may change the rise and flavor, particularly in the eggless cake. For the most predictable result, use the type listed.
Why did my chocolate cake sink?
Common causes include an underbaked center, inaccurate leavener measurements, an overfilled pan or opening the oven before the cake has set. Check pan size, measure the baking powder and soda carefully, and test the center before removing the cake.
Can I leave out eggs from the classic recipe?
Use the separate eggless recipe instead. Simply removing eggs from another batter changes its structure and can leave the cake fragile or dense.
Is the eggless cake dairy-free?
The listed eggless batter and powdered-sugar topping contain no dairy ingredients. Check individual product labels and avoid adding dairy-based frosting if that matters for your needs.
Which cake is easiest for a beginner?
The eggless snack cake and peanut butter square cake need no stacking or piping. The ganache cake is another simple option because the topping spreads naturally over one layer.
For another chocolate dessert idea, try our brownie fruit pizza with fresh fruit.