This post contains affiliate links.
There's a reason the Hershey Chocolate Cake recipe has been the best chocolate cake recipe for decades! It's soft, moist, and has the perfect chocolate flavor, and don't even get me started on that homemade chocolate frosting! This one of our favorite desserts!

The Only Chocolate Cake Recipe You'll Ever Need.
This Matilda's Chocolate Cake recipe is one of the very first recipes I ever shared here on TBFS, back in 2010. I've made it hundreds of times, and my kids now make it on their own, too. Thank you Hershey's! Some changes I've made to improve the original recipe are using hot coffee, instead of water (to boost the rich flavor) and adding buttermilk instead of plain milk (for a more tender and moist cake).
I recommend freezing the baked cake rounds ahead of time, and then frosting them right out of the freezer, for super easy prep. Once you see how easy homemade chocolate cake is, you'll never buy a box mix again.
Don't miss all of my cake recipes, including Yellow Cake, Carrot Cake, Biscoff Cake, or Flourless Chocolate Cake.
How to make Chocolate Cake:
Make Cake Batter: Combine sugar, flour, cocoa, baking powder, baking soda, and salt. Add eggs, buttermilk, oil, and vanilla then mix. While stirring, slowly pour in the boiling water or hot coffee, mixing to incorporate (the batter will be thin).

Bake: Carefully pour cake batter into prepared pans and bake at 350°F(180°C) for 30-35 minutes, or until a toothpick inserted in the center comes out clean. Let cakes cool in the pan for a few minutes then invert onto a cooling rack. Let the cakes cool completely before frosting.
Frosting: mix butter and cocoa powder then add powdered sugar, milk, and vanilla. Mix for several minutes until it has a smooth and fluffy texture.
Assemble and Frost: Carefully transfer one cake layer to your serving tray. Spread a generous amount of frosting on top then place the second cake layer on top. Use a cake spatula to frost the top and sides of the cake with remaining frosting. Slice and enjoy!

Recipe Variations:
- 9×13 Cake: Spray a 9×13 pan with cooking spray then pour the batter. Bake at 350°F (180°C) for 35-40 minutes. Let cool completely then frost and serve.
- Cupcakes: Place cupcake liners in a muffin pan then fill each one 2/3 of the way full with batter. Bake for 22-25 minutes then let them cool completely before frosting. This recipe makes 24-30 cupcakes.
- Bundt Cake: Grease and flour a 12 cup bundt pan then pour in batter. Bake for 50-55 minutes then let cool in the pan for 15 minutes. Invert on a wire cooling rack and let cool completely before frosting.
- Gluten-Free: Use a 1:1 ratio of Bob's Red Mill Gluten-Free Flour instead.
- Dairy-Free: Instead of cow's milk, use almond milk in the cake and frosting with a 1:1 ratio.
Make Ahead and Freezing Instructions:
To Make Ahead: The cakes and the chocolate frosting can both be made ahead of time. Store frosting in an air-tight container in the fridge for up to two weeks, or in the freezer for up to three months. Let frosting come to room temperature (I also like to re-whip it, with electric beaters), until soft and smooth.
To Freeze: Allow the cakes to cool completely then wrap each layer in plastic wrap and place in a freezer bag. Freeze for up to three months. Fully frosted cake can also be frozen, if covered really well.
More Cake Recipes:

Hershey Chocolate Cake
Equipment
Ingredients
Chocolate Cake:
- 2 cups granulated sugar
- 1 ¾ cup + 2 Tablespoons all-purpose flour
- 3/4 cup unsweetened cocoa powder
- 1 1/2 teaspoons baking powder
- 1 1/2 teaspoons baking soda
- 1 teaspoon salt
- 2 large eggs, , room temperature*
- 1 cup buttermilk*
- 1/2 cup oil, (vegetable or canola oil)
- 2 teaspoons vanilla extract
- 1 cup boiling water, , or hot coffee
Chocolate Frosting:
- 1/2 cup melted butter
- 2/3 cup unsweetened cocoa powder
- 3 cups powdered sugar
- 1/3 cup milk
- 1 teaspoon vanilla extract
Instructions
- Preheat oven to 350°F(180°C). Line two 8 inch round baking pans with parchment paper* and then spray lightly with non-stick cooking spray. Set aside.
- Dry Ingredients: Stir together sugar, flour, cocoa, baking powder, baking soda and salt in large bowl.
- Add eggs, milk, oil and vanilla and mix until well combined. Stir in boiling water (or hot coffee). Batter will be thin. Pour batter into prepared pans.
- Bake 30 to 35 minutes or until a toothpick inserted in the center of the cake comes out clean.
- Chocolate Frosting: Combine butter and cocoa powder. Add powdered sugar, milk, and vanilla extract. Mix for several minutes until smooth and fluffy.
- Assemble: Place one cake layer on serving tray. Spread a generous amount of frosting on top. Add second cake layer. Frost top and sides of cake with remaining frosting. Cut and serve.
Notes
Nutrition
Nutrition information is automatically calculated, so should only be used as an approximation.
Text me new recipe ideas!
Simple, tasty ideas sent once a week. No spam.
Follow Me
*I originally shared this recipe June 2010. Updated June 2019, April 2021 and April 2023 and February 2025.
The material in this blog post references the trademarked brand “Hershey’s.” The use of this trademark is for informational and editorial purposes only and does not imply sponsorship or endorsement by The Hershey Company.




This is the best chocolate cake recipe I’ve ever made! It’s irresistible and makes my chocolate dreams come true! This recipe is a gem that I will never lose 😍
This is the best chocolate cake and icing I have ever had – my family loved it and keeps asking me to make it again!
This is a keeper! Absolutely delicious, just the right amount of chocolate taste and super easy recipe! Made it for my sister’s birthday and everyone said it was the best chocolate cake they have ever tasted!! WOW!!
I have made this cake for years. I got it on the back of the Hershey’s Coco container. I have read how some people had spill over in the oven & yes this has happened to me before. So what I do now is I divide the cake batter into 3 9″pans. Cook it for 15 minutes then look at the cake if it’s not set cook for 5min more. Take the toothpick & see if it’s set. Keep doing this till there is moist crumbs on your toothpick. Cooking this cake in 3 pans is going to mess with your time so you have to keep your eyes on it. We love this cake. This is my go to cake & everyone asks me for it. You can do a lot with the fillings & frostings. I have had cherry filling & whipped cream frosting also if you like it you can poor rum into a bowl & brush the cake lightly. Then put the cherry filling & whipped cream take chocolate shavings & pat them on the sides of the cake. Also put strawberry filling with whipped cream & fresh strawberries on top or chocolate covered strawberries on top. There’s a lot you can do with this cake. Don’t forget you can do a ganache frosting to. Enjoy
I was reading some comments so I want to verify the exact measurements for the baking soda and baking powder. A couple of readers said they reduced the amount. Would you please let me know? Thank you.
I think readers who did that were trying to compensate for high altitude. I use the recipe as written.
can I replace the buttermilk for 2% milk?
I used 1 cup of 2% milk, and to substitute it for buttermilk, I put 1 tablespoon of vinegar in the milk and let it sit for 10-15 minutes while I put together the other ingredients.
Hi. I’m m looking for a good homemade chocolate cake recipe. I found your recipe and wanting to know what kind of butter do I need for this? Thank you
You can use salted or unsalted in the frosting.
wanting to make cupcakes with this recipe, any suggestions? should I not use the water? (I’m not a baker)
You would make the batter exactly as instructed. It will make about 30 cupcakes–bake at 350°F. Fill cups 2/3 full with batter and bake them for 22 to 25 minutes.
Hi! Thanks for the recipe! The cake was moist and simply delicious. My family finds the frosting a tad bit too sweet though. If I make it again, can I reduce the powdered sugar in the frosting? What do I replace it with to maintain the same consistency though?
Amazing texture, it was fluffy and moist, but it didn’t taste very chocolate-y. I’m not a very experienced baker so I’m not sure how the recipe could be altered to make it richer, but it definitely needs more sweetness and a fuller flavor.
I made this perfect chocolate chocolate cake and followed the recipe by far the best chocolate cake I have ever made. Rich Moist and delicious frosting also was delicious. Thanks
I followed the the recipe, but the cake didn’t set. Only the top was fine and the rest of the cake was still a batter mix
Hi Megan, it sounds like it needed to bake longer. Take it out when a toothpick inserted in the center of the cake comes out clean (without batter on it and with a few crumbs), or when you touch the baked cake in the center it should feel spongy.
Hey!! Lauren this is princy from Coimbatore,India. I tried this delicious cake and output was really amazing that I couldn’t believe, everyone of my family really loved!! But the only difficulty was that my cake was soo soft and it broke when I lifted it from the plate!! What can do to avoid it!!! Only tat was my query other than that everything was perfect!
Hi Grace–nice to meet you! Next time you could try adding some more flour and bake for a few extra minutes.