This Perfect Chocolate Cake recipe is moist, flavorful, and inspired by Hershey’s famous chocolate cake, made with a touch of coffee for a unique twist. No more dry cakes! Passed down by my grandma, this recipe is a true classic. The addition of Homemade Chocolate Buttercream takes this cake to the next level and sets it apart from the rest.


Chocolate Cake on Cake Stand
Want to save this recipe?
Just enter your email and get it sent to your inbox! Plus you’ll get new recipes from us every week!

Ingredients & Substitutions

Buttermilk: I prefer to use store-bought buttermilk for this cake, but you can absolutely use homemade. I have a post on How to Make Buttermilk should you want to make your own! I like the sour cream method for this cake.

Coffee: I have many recipes on my site for chocolate cake and most of them use coffee. Coffee will enhance the flavor of the chocolate, not overpower it. If your recipe is good (and this one is) you will not taste the coffee at all, you will only taste the richest chocolate cake you have ever had. You may substitute water for the coffee if you prefer, but the chocolate flavor will not be as intense.

Chocolate Buttercream: The recipe for the whipped chocolate buttercream is a large amount. If you don’t plan on piping on embellishment, you can cut the recipe in half. Or, use your favorite kind of frosting.

The Perfect Chocolate Cake Recipe and Perfect Chocolate Buttercream on White Cake Stand

Can I Make This Chocolate Cake Into Cupcakes?

This recipe has not been tested as cupcakes, but if you decide to make it into cupcakes, here are some guidelines. Fill each cupcake liner 2/3 full with batter and bake at 350°F for 16-22 minutes. Check on the cupcakes starting at 16 minutes to avoid overbaking. For a tried and true cupcake recipe, try my Ultimate Chocolate Cupcake recipe.

Overhead of Chocolate Cake with Rosette Frosting

Can I Use a 9×13-inch Baking Dish?

Yes, you absolutely can. Bake at 350°F for 28-32 minutes. The cake is done when an inserted toothpick is removed with crumbs, but no wet batter.

Homemade Chocolate Cake Recipe with Pieces Missing on Cake Stand

Can This Cake be Gluten-Free?

I am often asked how to make this recipe gluten-free. I recommend good quality gluten-free flour that can be used interchangeably with all-purpose flour. (A 1:1 blend) This recipe is best when gluten is used, but will still taste delicious with gluten-free flour.

Piece of Chocolate Cake on Plate with Raspberries

How to Freeze Chocolate Cake

I don’t recommend freezing with frosting on. To freeze the cake, follow these instructions.

  • Allow the cake to completely cool in the pan.
  • Place a layer of plastic on top of the cake and then place a cutting board or cooling rack on top.
  • Flip the cake over, removing the pan.
  • Wrap the plastic up over the edges of the cake and then add another large piece and wrap it again as tightly as possible without crushing the cake. Make sure that none of the cake is exposed in the freezer as this can cause a freezer burn.
  • Finally, wrap it in a layer of foil. Label and date the cake. The cake will freeze well for 1 month and should be fine for up to 3 months.
Chocolate Cake on a Plate.

More Chocolate Cakes

The best recipe you will ever try!
4.97 from 111 votes

The Perfect Chocolate Cake

Prep Time 15 minutes
Cook Time 40 minutes
Total Time 55 minutes
This rich and decadent chocolate cake has been around for decades and is always a crowd-pleaser! Perfectly moist, rich, and flavorful.


  • 1 ¾ cups (219 g) all-purpose flour
  • 2 cups (400 g) granulated sugar
  • ¾ cup (90 g) good quality unsweetened cocoa powder
  • 2 teaspoons baking soda
  • 1 teaspoon baking powder
  • 1 teaspoon kosher salt
  • 1 cup (240 g) buttermilk, room temperature
  • ½ cup (112 g) vegetable oil
  • 2 large eggs, room temperature
  • 2 teaspoons McCormick pure vanilla extract
  • 1 cup (237 g) freshly brewed hot coffee, regular or decaf, or hot water
  • chocolate buttercream frosting


  • Preheat the oven to 350°F. Spray 2, 8-inch x 3-inch round cake pans with nonstick cooking spray. (8-inch cake pans with shorter sides may cause an overflow in your oven.) Set aside.
  • To the bowl of a stand mixer, add the flour, sugar, cocoa, baking soda, baking powder, and salt. Mix to combine.
  • In a separate bowl, combine the buttermilk, oil, eggs, and vanilla.
  • With the mixer on low speed, slowly add the wet ingredients to the dry. With the mixer still on low, add the coffee and stir just to combine, scraping the bottom of the bowl with a rubber spatula.
  • Pour the batter into the prepared pans and bake for 30-40 minutes, or until a cake tester or toothpick comes out mostly clean with no wet batter.
  • Let the cakes cool in the pans for 30 minutes. Then, turn them out onto a cooling rack to let them cool completely.
  • Frost the cake with chocolate buttercream frosting.

Did you make this recipe?

Thank you for making my recipe! You took pictures, right? Well go ahead and post them on Instagram! Be sure to mention me @iambaker and use the hashtag #YouAreBaker.

Share with your friends!

Categorized in: , ,

Related Recipes

Meet Amanda Rettke

Amanda Rettke is the creator of I Am Baker, and the bestselling author of Surprise Inside Cakes: Amazing Cakes for Every Occasion – With a Little Something Extra Inside.Over the course of her 15+ year blogging adventure, she has been featured in and collaborated with the Food Network, New York Times, LA Times, Country Living Magazine, People Magazine, Epicurious, Brides, Romantic Homes, life:beautiful, Publishers Weekly, The Daily Mail, Star Tribune, The Globe and Mail, DailyCandy, YumSugar, The Knot, The Kitchn, and Parade, to name a few.

Reader Comments

  1. Hi Tom – please understand that if a cake took an ADDITIONAL 35 minutes to bake, that is most certainly an oven issue.

  2. Adsolutely the best chocolate cake. I made it for several years and then moved to the mountains. Now going to try it at higher altitude with adjustments. I use a raspberry filling and chocolate frosting. Always get great compliments.

  3. After reading Megan’s response, I just have to try this recipe. Reading through it, it does seem to have a high sugar to flour ratio, but your recipes usually work well so I’m crossing my fingers.

  4. While I don’t care for chocolate cake, my family loves it. I tried this recipe and they found it amazing. I followed the recipe exactly as written and find no reason to embellish on it anywhere. This will be the “go to recipe” for birthdays and holidays. Thank you for all the great recipes.

  5. I love chocolate cake and now must make this one as soon as possible. As for Megan, someone needs to wash your mouth out with soap, however, that probably wouldn’t help since you apparently have no sense of taste.

  6. Hi, I see that you have a water substitution for the coffee but have had several people say that you cannot really taste the coffee in the cake…true? My family are not coffee lovers but are huge chocolate cake lovers:), and I would love to try this for them on our next bday get together. If I use the water instead of the coffee will it be watery? I do not even have coffee in the house! 🙂

    1. It won’t be watery at all. It will bake up nicely. Either hot coffee or hot water is fine. If you follow Amanda’s recipe like it says, it’ll be perfect! It will not be vile😂

  7. Hello Megan from the other side of the pond, every experienced baker knows you don’t just dump hot liquid into eggs. But, that you add the hot liquid slowly and in stages. That would be the proper way to do it. Plus, you do not kinda follow a recipe.
    Baking is like a puzzle. You have a lot of different ingredients (puzzle pieces). That when done properly the ingredients (puzzle pieces) all fit together perfectly. And you end up with a delicious & gorgeous cake.
    But, when you skip a puzzle piece you end up with what you made. A mess!
    Amanda shares her recipes and knowledge with millions of people.
    Megan, what is your legacy? To talk nasty and insult others. Wow, some goal you have set for yourself.
    Sincerely from the other side of the pond,
    Elisabeth S.

  8. Holy moly Amanda! That woman probably goes from site to site lambasting recipes that she hasn’t made for notoriety. I have made this cake, hot coffee and all, more than once and won a baking contest, judged by a Hershey flavorist. So there!

Leave a Reply

Your email address will not be published. Required fields are marked *

Recipe Rating

This site uses Akismet to reduce spam. Learn how your comment data is processed.