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!!
Do you have any suggestions on how to get the cake out of the pans, or any tips to get it not to stick? Just made this with my son, it turned out great and tastes super good! Just bummed the cakes stuck to the bottom of them pans even tho I grease and floured them! Going to try and rebuild it with the frosting ha ha
Hi Jordan, if you keep scrolling under the recipe you will find helpful”TIPS”. I am confident TIP #3 will solve your problem. Good luck.
Used 1x 9in and 1x 9.5in tins. My cakes looked ok as I took them out the oven after checking that they were done with a toothpick (30min) but they fell totally flat immediately after…. I made the recipe twice, to see if I’d done something wrong but same result 🙁
Hi Ruby, I’m so sorry the cakes fell flat. There many factors that could have caused that, based on your method when baking the cake, and even your altitude and humidity. Here are two great articles that may help you figure out what went wrong in your case. https://www.bhg.com/recipes/how-to/bake/how-to-make-sure-your-cake-will-rise/ https://www.foodnetwork.com/recipes/articles/cakes-tips-and-techniques
I made these cakes last night- only Change I made was that I used whole wheat flour. The taste is a great just a tad dry. Any recommendations to make it moister when using whole wheat flour? My son loved it- I just added Greek yogurt frosting on top. I will make the frosting next time as well. Thanks for sharing your tips.
I just baked this cake and followed the instructions perfectly. It was very thin, as you said it would be. It didn’t rise very much and has fallen after it has cooled. Does yours not rise very much? I’m used to cakes that rise in the middle and don’t fall. I haven’t tasted it yet so I don’t know how it tastes. I made the icing and that tastes great.
Hi Cayla, I’m sorry something went wrong here, and there are many factors that could have lead to it (I’m can’t say for sure since I wasn’t in the kitchen with you.) Here’s a good resource that may be help you understand what happened during the preparation: http://www.alwaysorderdessert.com/2010/11/kitchen-tip-5-ways-to-keep-your-cakes.html
This cake came out great, but I ran out of cocoa powder and vanilla before I got to the icing so I just used 1/2 cup butter, 3 cups of powdered sugar, 1/4 almond milk (I’m allergic to normal milk), 3 shakes of cinnamon, and about half a teaspoon of lemon juice. Turned out really nice and gave the icing a lighter, less sweet flavor.
I also didn’t have a 2nd cake pan, so I made half of the batter into cupcakes (I know I’m breaking all kinds of rules XD ). Brought the baking time down to 20 minutes, which seemed perfect.
Successful experiment all in all, I think.
I love baking and this cake is amazing. I’m also diabetic. Could I substitute splenda in place of the sugar? Thanks again for this recipe.
Thanks! I haven’t tested this with splenda, so I couldn’t say for sure how it will effect it. I’d love to know if you do!
I baked this cake tonight, but my cake did not rise much after I made a few adjustments. I am really curious to know if any of my changes would especially limit the cake’s ability to rise. First, I used 2 tablespoons of cornstarch for each cup of flour (minus 2 tbsps) to make my flour more like cake flour. I thought cake flour would help make the cake rise better. Second, I substituted water and butter (1 tbsp) for the 1 cup of milk. My only other alternative for cow’s milk was soy, which I didn’t have. Third, I whipped the egg yolks and whites separate. I saved the whipped whites for the very end after the boiling water and gently folded them in before filling the pans. The third change was a huge risk because I am not much of a baker and I don’t know if I ruined some special baking sequence by doing it that way. I like the whipped egg white result when I make waffles so I gave it a try after seeing at least one search result of someone using it for cakes. I followed the rest of the recipe exactly. My cake did not rise much or at all. I used two 9″pans filled at least halfway and each baked layer is barely an inch. I would appreciate any advice on whether any of my changes were particularly bad and what I could do better next time. ~Thank you
Hi
Can you please give the measures in metric units like in grams for dry ingredients and MLS for liquids?not sure what do you mean by cup measures?
Hi Priya, I would suggest using an online converter. Here are two good ones: https://www.gourmetsleuth.com/conversions/grams/general-gram-calculator http://dish.allrecipes.com/cup-to-gram-conversions/
Hi! I’m planning to use this as the base layer for an ice cream cake. Do you think it’s okay to freeze?
Yum! Absolutely–it will freeze well 🙂
Would you say this is a good cake for a tiered wedding cake. On the video it looks very moist and I want to know if you think it’ll hold well?
For a tiered wedding cake, as long as it had the proper dowel supports I would imagine it could work fine, but I haven’t tried it so I can’t say for sure. Sorry!