This is the best chocolate cake recipe ever, topped off with light and creamy chocolate frosting. Make this homemade chocolate cake and icing from scratch for birthdays, holidays, or any time you need the perfect dessert!
This post may include affiliate links that earn us a small commission from your purchases at no extra cost to you.
Our Favorite Chocolate Cake with Miracle Chocolate Frosting
It’s my birthday today! Let’s celebrate with this perfect chocolate cake.
This is the best chocolate cake recipe, one of my favorites! It’s rich and chocolatey, light and moist, and it’s simple enough to serve for any occasion.
Learn how to make chocolate cake from scratch and make your own homemade chocolate frosting to go with it. You can use it to make all different types and cake sizes.
Why you’ll love this perfect chocolate cake recipe:
- BEST EVER: This chocolate cake with chocolate frosting has the most perfect flavor, and it never disappoints.
- FROM SCRATCH: This homemade cake and frosting is made completely from scratch!
- ANY CAKE, ANY SIZE: Take your pick! Bake a layered cake, bundt cake, or cupcakes, all with this one recipe.
This chocolate cake is one of my favorites for birthdays, Valentine’s Day, or any family celebrations!
How to make Chocolate Cake with Chocolate Frosting
You can jump to the recipe card for full ingredients & instructions!
- Begin by combining frosting ingredients (without the butter or chocolate) in a saucepan on the stove. Cook and whisk until it becomes thick.
- Transfer it to a bowl and cover tightly with plastic wrap. Set it aside to cool for 2 hours.
- Preheat oven and prepare cake pans.
- In a stand mixer, combine dry ingredients. Then add in the wet ingredients and beat just until combined. (Don’t overmix!)
- Pour batter into cake pans and bake at 350F. (See below for baking times.)
- While the cake cools, finish making the chocolate frosting.
- Beat butter in the stand mixer until it becomes fluffy, then add in the cooled milk mixture from earlier.
- Continue beating until everything is combined, and becomes light and fluffy.
- Add in the melted chocolate and beat until incorporated.
- Frost the chocolate cake once it has cooled, slice, serve, and enjoy!
Cake Pans and Baking Times
One of the great things about this chocolate cake recipe is that you can use it to make a few different types and cake sizes. You don’t have to go looking for a new recipe every time!
All cakes should be baked at 350F.
- Rectangular Cake: Use a 13×9-inch cake pan and bake 30-40 minutes.
- 2 or 3 Layer Cake: Use 8-inch cake pans and bake 25-35 minutes.
- Bundt Cake: Use a 12-cup bundt cake pan and bake 45-55 minutes.
- Cupcakes: Use regular or mini cupcake/muffin tins. Makes 22-24 regular-sized cupcakes. Bake 18-25 minutes.
When should I serve this chocolate cake?
I love this cake because it works for any occasion. Making it from scratch means you do need to plan for this recipe, but I’ll use any excuse to make it.
It’s the perfect chocolate birthday cake, it’s always welcome on holidays, and it will certainly impress guests at dessert time.
What does adding coffee to chocolate cake do?
Because coffee and chocolate are so similar, adding coffee just enhances the chocolate flavor. It makes it much richer, but doesn’t leave a bitter coffee flavor behind.
Brew fresh coffee to mix in or use espresso powder. You can also skip the coffee if you prefer, and just use boiling water instead.
How do I store leftovers?
After baking, frosting, and serving the cake, you can store leftovers at room temperature or in the refrigerator.
Room Temperature: Store at room temperature up to 3 days. The best way to store it is using a cake stand and cover. You can also slice it up and store in airtight containers.
Refrigerator: To store longer than a few days, it’s best to refrigerate the cake. Refrigerate it uncovered for 15-20 minutes so the frosting hardens. Then wrap it with aluminum foil or plastic wrap. You can also freeze it.
Tips!
- Baking a cake from scratch takes time, so plan ahead for this recipe.
- Start making the chocolate frosting first, and let it cool while you bake the cake.
- I like adding coffee to this recipe for the flavor boost, but you can use boiling water instead.
- To make sure it’s done, stick a toothpick in the center of the cake. It should come out clean.
- Let the cakes cool in the pan for 10 minutes before taking them out.
- You can use a different frosting here if you prefer.
Make the best chocolate cake with chocolate icing from scratch for any occasion. Everyone will love this rich and delicious chocolate dessert!
More Chocolate Cake Recipes we Love
- German Chocolate Cake
- Swiss Roll Cake
- Black Magic Chocolate Cake
- Velvet Chocolate Cake with Ganache
- Gooey Texas Chocolate Sheet Cake
If you make this recipe be sure to upload a photo in the comment section below or leave a rating. Enjoy! You can also jump to recipe.
Chocolate Cake with Chocolate Frosting
Equipment
- Kitchen Scale (optional)
Ingredients
For the Chocolate Cake
- 2 cups granulated sugar 400 grams
- 1¾ cup all-purpose flour 210 grams
- ¾ cup unsweetened cocoa powder 63 grams
- 1½ teaspoons baking powder 6 grams
- 1½ teaspoons baking soda 9 grams
- 2 teaspoons kosher salt 6 grams
- 2 large eggs 100 grams
- 1 cup buttermilk 227 grams
- ½ cup vegetable oil 100 grams
- 2 teaspoons pure vanilla extract 8 grams
- 1 cup boiling water or freshly brewed strong hot coffee 227 grams
For the Chocolate Frosting (makes 5 cups)
- 1½ cups granulated sugar 300 grams
- ¼ cup all-purpose flour 30 grams
- 3 tablespoons cornstarch 21 grams
- 1 teaspoon kosher salt
- 5 tablespoons Dutch-processed or regular cocoa powder 26 grams
- 1½ cups milk
- 1½ cups unsalted butter 339 grams, room temperature (3 sticks)
- 2 teaspoons pure vanilla extract 8 grams
- 3¾ ounces semisweet chocolate 106 grams, melted and cooled
Instructions
For the Chocolate Cake
- Adjust oven rack to middle position and preheat oven to 350°F. Spray two 8-inch round cake pans with baking spray. Set aside.
- In the bowl of a stand mixer fitted with the paddle attachment, stir the sugar, flour, cocoa, baking powder, baking soda, and salt together on low speed for 30 seconds.2 cups granulated sugar, 1¾ cup all-purpose flour, ¾ cup unsweetened cocoa powder, 1½ teaspoons baking powder, 1½ teaspoons baking soda, 2 teaspoons kosher salt
- Add the eggs, buttermilk, oil and vanilla; increase speed to medium and beat for 2 minutes.2 large eggs, 1 cup buttermilk, ½ cup vegetable oil, 2 teaspoons pure vanilla extract
- Reduce speed to the lowest speed and slowly add the boiling water. Stir on low for 1 minute.1 cup boiling water or freshly brewed strong hot coffee
- Pour the batter evenly between the prepared cake pans and bake for 25-35 minutes (see notes for baking times for different sized cakes) or until a toothpick inserted in the middle comes out clean. Cool 10 minutes in the pan on a cooling rack, then remove from the pans. Return the cakes to the cooling rack to completely cool.
- Frost the cakes with our Chocolate Frosting or your favorite frosting.
For the Chocolate Frosting
- In a medium saucepan set over medium heat, whisk the sugar, flour, cornstarch, salt, and cocoa together.1½ cups granulated sugar, ¼ cup all-purpose flour, 5 tablespoons Dutch-processed or regular cocoa powder, 3 tablespoons cornstarch, 1 teaspoon kosher salt
- Slowly add the milk, while whisking briskly, and beat until smooth.1½ cups milk
- Cook, whisking constantly (and scraping the sides and corners of the pan) until mixture boils.
- Reduce heat to medium-low, and continue cooking and whisking until mixture is very thick, about 4-8 minutes. Transfer the mixture to a wide bowl, and place plastic-wrap directly on the surface of the chocolate/milk mixture. Set aside to cool completely, about 2 hours.
- Once the chocolate/milk mixture has cooled, fit a stand mixer with the paddle attachment and add the butter to mixing bowl.1½ cups unsalted butter
- Beat the butter on medium-high speed until lighter in color and fluffy, about 5 minutes.
- Reduce speed to medium speed and add the cooled chocolate/milk mixture and vanilla. Beat together, scraping down the inside of the bowl as needed, until incorporated.2 teaspoons pure vanilla extract
- Increase the speed to medium-high and beat until frosting is light and fluffy, about 3-5 minutes, scraping down the sides as needed.
- Add the melted (and cooled) chocolate, and beat until melted chocolate is incorporated, about 30 seconds.3¾ ounces semisweet chocolate
- Frost the cake with the completed chocolate frosting, cut into slices, and serve.
Video
Becky’s Tips
Yield: One (3-layer) 8-inch cake, One 13×9-inch cake pan, One (12-cup) Bundt Cake, or 22-24 regular-size cupcakes
- If baking a 9×13-inch cake, bake 30-40 minutes.
- If baking a 12-cup Bundt Cake, bake 45-55 minutes.
- If baking cupcakes, bake 18-25 minutes.
- This icing is so good and perfectly complements the cake. It does take extra time (about 2½ hours to make) so plan ahead if using this frosting recipe. I always start the frosting first, then bake the cake. By the time the cake cools, the frosting is almost cool enough to finish.
Nutrition information is automatically calculated, so should only be used as an approximation.
I’ve made this cake multiple times and it’s a fan favourite in my household! I have an issue though – each time I’ve baked, the middle of the cake sinks and I can’t figure out what I’ve been doing wrong :( some advice would be much appreciated!
Hi Dani, what size pans are you using? You may be overfilling them! We recommend filling the pans no more than 3/4 full, and pouring any excess batter into the wells of a cupcake tin and bake off some cupcakes to go with it. If the pan is overfilled, there is not enough structure for the cake to climb up as it bakes, so that can cause it to sink in the middle. Also, don’t open the oven during the bake, as this can reduce the oven temperature, causing the cake to fall.
Hi Becky, I used 2 8-inch pans that are 3 inches deep, so I split the batter evenly and each pan was 1/2 full. When they baked, it didn’t overflow and the edges were perfect. I only opened the oven door once the time was up, but the middle had sunk before then. Could high altitude be a factor as well?
Yes, if you are at a high altitude, you likely needed to add an extra 2 tablespoons of flour per cup!
Great, thank you!!!
Ok, I really wanted to love this recipe. Made it today for my son’s birthday. It was ok, but for the time and ingredients, it wasn’t great. Did everything as directed. Used the spoon and level method with flour. The flavor was wonderful but too dense. Almost like a brownie. And the frosting was yummy (not overly sweet) but there is enough for 3 cakes.
We’re sorry this recipe wasn’t quite to your tastes, Kristie!
Can I substitute the salt? I only have coarse kosher salt and table salt.
Table may be best!
My batter is real soupy. Is that the right consistency? It’s in the oven right now. I am hoping it will turn out. Please advise
I hope it worked out for you!
Mine is soupy too. I wonder how the recipe developer measures flour? Sifted or not?
We measure using the spoon-and-level method, but if you have a kitchen scale, that will be the most accurate!
The cakes came out beautifully! The batter was soupy, but they did great. 2 9 inch rounds. Baked for 32 min. Thanks for the recipe!
Thanks for stopping by, Kristie!
Why is there two salts listed in the frosting ingredients? I also would prefer a metric option. Born and raised in the US and metric is best for the accuracy needed in baking.
One is a coarser salt. The majority of my followers use the imperial system and we don’t quite have the technology for changing measurement units.
The recipe says add the salt which can be interpreted to mean its in singular form, am I adding both salts?
Add both
I am based in the US and most of my followers are as well! While I would love to include that, we just aren’t there yet!