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.

The Only Chocolate Cake Recipe You'll Ever Need. 



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!!
hi I am using a 12inch by 18 inch pan (Wilton) how much of the Hersheys perfect brecipe should I use?
I think if you times the recipe by 1.5 it would work!
I would put half the cake in the freezer for another time freezes well and makes the cake more moist delicious
Amazing cake, thanks, can i stack this cake, 3 or 4 layers
You could bake it in three 8in pans for a three layer cake. Or you can torte the two layers in half for a thin, 4 layer cake 🙂
Delicious and very simple! Definitely a keeper!
Went to the cupboard to pull out the box of cake mix only to find it was brownie mix. Googled chocolate cake and found this. What a hit with the family. I took cake decorating classes years ago and learned that if you grease and flour the bottom and sides of the cake pan well the cake won’t stick while trying to remove it. I was disappointed to find that this cake was very difficult to remove from the pan and some of the cake stuck to the bottom. Also, I used a 10 inch round pan but the pan was no more than 3/4 full with batter so I don’t think that was an issue.
can i bake it to 7inch pans to make a 4layer cake?like bake 2 pans and then the other two or it will be flatter as batter will sit 30min or so,,?or should i use half recipe for 2 7inch pans?
Hi Dimitra,
That should work. The layers would be thinner. Be sure the batter is evenly divided in the pans and smoothed evenly. Also don’t cook it as long!
As an alternative, you could cook it regularly in the 8inch rounds, freeze it, and then tort it (cut each round in half). Best of luck!
My cake came out a bit dry. I let it cook for 35 mins. I followed the recipe as instructed, including having the ingredients at room temperature. What can I do to help it be more moist? P.S. the flavor is amazing, taste very chocolatey. Thanks f9r the information 🙂
Hi Diana, the most common reason for this would be too much flour. When you measure the flour be sure to gently spoon the flour into the cup and then level it off with a knife. You want to make sure there isn’t too much flour packed into the measuring cup. Too little of liquids could also cause dryness, so make sure you’re measuring liquids using a liquid measuring cup. Hope those tips help for next time!
WHERE ARE THE INGREDIENTS!?!?!?!?!?!?!?!?
If you scroll through the post or click “jump to recipe” at the beginning of the post you should find the recipe card.
My go to recipe. Instead of the eggs I substituted it for onions.. yes onions. Joking. I made it as described-no substitution or alteration needed. Thank you.
If i would like to make a smaller cake, say 6 inch or 7 inch one, how should i adjust the amount?
I would recommend to make the recipe as is and only fill the pans about 3/4 full. You will have a little leftover that you can toss or use for cupcakes!