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!!
Two things: Every time I bake a cake with cocoa powder, the cake sticks to the pans–they are non-stick pans and I use a baking spray w/flour. This doesn’t happen with any other cake.
Also, I reduced the oven temperature to 325 F., as that is usually recommended for non-stick pans. I increased the baking time for five more minutes, but the centers still didn’t seem quite done. Should I have baked at 350 F. as the recipe instructs, even considering the type pans I used?
My suggestions: Use parchment paper rounds in the bottom of your cake pans. Also spray them with cooking spray.
Then bake at 350.
I’m not a baker at all but decided to make this chocolate cake for my sister’s birthday. Much to my surprise and everyone else’s it turned out great! If I can make it, ANYONE can! Thanks for sharing!
Wow this is amazing! I was so scared since the batter was so thin. But it turned out so good. I used 3 pans instead of 2. And make sure to sift all dry ingredients. Nobody tell on me for getting a second piece ?
Awesome, thank you very much, I hope my dad will love it. However, I definitely do!
This cake recipe seemed delightful at first, I tried it out the first time and the cake was delicious. I attempted a second try but when I tried to cook it, the water kept rising to the top and the cake wasn’t cooking at all. In all, I ended up cooking it for over an hour. I tried every way to fix it, but it just stayed exactly the same.
Hi, how can I modify this recipe to omit the egg? I am a vegetarian thus should like to substitute the egg with any other ingredient.
Thanks
I have not tried any of these but these are all recommended substitutes for eggs. For each whole egg you could substitute any of the following: 1/2 medium banana mashed or
1/4 cup apple sauce or 1 Tb. ground flax seed and 3 Tbl. water
Best Wishes
Hi! For the temp. setting, is the 350F with fan assist or without? My oven is fan assisted so wanted to see if the time or temp. would change?
Hi i recently baked these again using a fan assisted oven at 165 the rise slight uneven but they were certainly better than baking at 180.
I think the next time i bake them i will do 160 , check at 22 mins .
Please do let me know what your experience is ?
I have bake a batch for my daughters birthday.
defintely going to give it a try, but please can you tell me, if I don’t want to make it a double layered cake, can I just use a 13inch x 9 inch rectangular pan? Any difference in baking time or result?
You can find the directions for a 9×13 cake under the “instructions” in the recipe card. (takes 35 to 40 minutes to bake).
Hi Lauren Allen,
What if you use a bundt cake pan? What is the cook time for that?
For a bundt pan bake at 350 degrees for 50-55 minutes 🙂
Great cake recipe. Whipped it up in no time.
Absolutely scrumptious! Followed the directions to a “T” and it came out perfect. I made this for my nephews birthday and everyone loved it. I would definitely make it again and again. Thanks so much for sharing. Can’t wait to try the “German Chocolate” variety.
Hi
I was thinking of making this for my daughters birthday
Did you so 3x 8 inch cakes or 2 x 9 inch cakes ?
Would you mind sharing a picture how you decorated it. Thanks