The Best Chocolate Cake Recipe (From Scratch)!

Jump to Recipe

This post may contain affiliate links. Please read our disclosure policy.

This is the best chocolate cake recipe ever! It is rich, chocolatey and moist with a perfect crumb! Topped with chocolate buttercream frosting it’s the ultimate chocolate birthday cake. Check out the step-by-step photos and watch the video to learn how to make this easy chocolate cake recipe and ditch boxed cake mixes once and for all!

a slice of chocolate cake on a white plate, there are two layers of chocolate cake with chocolate buttercream frosting on the outside and in the middle. There are chocolate chips and chocolate sprinkles on top. There is a fork on the plate.

I spent years testing and perfecting this chocolate cake recipe. With six kids, we celebrate a lot of birthdays around here, so I wanted to create a homemade chocolate cake that was rich, moist and chocolatey enough to replace the boxed cake mix I had used for years.

Before perfecting this recipe, I had made many others that didn’t meet my expectations. Ingredients like boiling water, hot coffee, buttermilk etc. tend to yield a chocolate cake that wasn’t moist or rich enough for our tastes. So you will find none of those ingredients in this easy chocolate cake recipe.

 Instead, butter, sour cream, milk and more come together to make the most moist, rich chocolate cake ever. Frosted with my favorite chocolate buttercream recipe, it’s a chocolate-lover’s dream come true. 

Why You’ll Love This Chocolate Cake Recipe

  • Super moist. Oil, sour cream and whole milk give this chocolate cake a rich, moist texture that stays that way for days.
  • Rich & chocolatey. Cocoa powder, espresso powder mini chocolate chips make this cake so decadent.
  • Easy to make. You don’t need a mixer to make the cake batter, and it’s made with simple ingredients.
  • Made completely from scratch. This homemade chocolate cake tastes even better than a boxed cake mix.
  • Perfect for birthdays. This has been our family’s go-to chocolate birthday cake for years.
  • Tried and tested. I tested this recipe over years of family birthdays before it was perfect enough to share!
a two layer chocolate cake with chocolate buttercream frosting on the outside and in the middle. There are chocolate chips and chocolate sprinkles on top. There is a slice cut out of the cake so the moist layers are visible.
Want to save this recipe?
Enter your email below, and I’ll send the link straight to your inbox. Plus, you’ll receive cooking & baking tips & recipes weekly!

Chocolate Cake Recipe: Ingredients and substitutions 

Many people ask how to make a cake super moist. It’s all in the ingredients. I made sure to choose ingredients that would create a moist chocolate cake with a rich chocolate flavor that everyone raves about. So, let’s chat about the ingredients in this chocolate cake recipe, as well as possible substitutions. For the best results, I recommend making the recipe exactly as written.

overhead view of the ingredients in this chocolate cake recipe in bowls and labeled like flour, milk, eggs, sour cream, cocoa powder, chocolate chips, canola oil and vanilla.
  • All-purpose flour. Cake flour can be used in place of all-purpose flour. I have not tried all-purpose gluten-free flour so if you do report back and let me know how it goes. 
  • Granulated sugar. There really isn’t a substitute for the sugar. I suggest regular white sugar or organic cane sugar for the best results. 
  • Unsweetened cocoa powder. Choose your favorite variety. For an extra-dark cake use dark cocoa powder. 
  • Espresso powder. Espresso powder enhances the chocolate flavor, but does not make the cake taste like coffee! I use it in so many of my chocolate cake recipes.
  • Canola oil. Oil is liquid at room temperature, which helps this chocolate cake stay moist even after it has cooled. You can substitute equal amounts of melted butter or another neutral oil if desired, however canola oil will yield the best results.  Or try my olive oil chocolate cake.
  • Sour cream. Sour cream adds moisture and richness without making the batter too thin. Full-fat, plain Greek yogurt can be used in place of sour cream. I recommend using full-fat ingredients for the richest, most moist chocolate cake. 
  • Whole milk. Again, I am an advocate for using full-fat whole milk in this chocolate cake recipe. You could substitute 2% milk but nothing with a lower fat content. Half and half is also a good substitute.
  • Vanilla extract. You can switch up the extract and use almond, peppermint, orange, etc. if you prefer a flavored chocolate cake. 
  • Mini chocolate chips. These are an absolute must. Regular-sized chocolate chips sink to the bottom of the cake while baking. Be sure to use mini chips for the best results. 
a slice of chocolate cake on a white plate, there are two layers of chocolate cake with chocolate buttercream frosting on the outside and in the middle. There are chocolate chips and chocolate sprinkles on top. A bite is taken out of the cake so the moist texture and perfect crumb are visible.

How to Make Chocolate Cake from Scratch

This chocolate cake recipe is easy to make, but we’ll walk through the process step-by-step to ensure your success! Don’t forget to watch the video.

Prepare the Cake Pans

Line two 6” round cake pans with parchment paper and grease well, then set them aside. I like to line them by tracing the bottom of the cake pans onto parchment paper and then drawing “handles” out of opposite sides (see below). This makes it very easy to lift the cake out after baking.

making chocolate cake recipe - two cake pans line with parchment paper and greased

Make the Chocolate Cake Batter

Combine the flour, sugar, cocoa powder, baking soda, baking powder, sea salt and espresso powder in a medium. bowl and set it aside to use later. This step is important to ensure the ingredients are evenly distributed and that there are no lumps. 

Next, in a large bowl whisk the canola oil, eggs, sour cream, milk and vanilla together until the mixture is smooth.

Once the wet ingredients are combined, add the dry ingredients and stir until the batter is smooth.  

Stir in the mini chocolate chip until evenly distributed.

Bake the Chocolate Cake

Next, divide the batter evenly into the two prepared cake pans. You can either eyeball it or actually measure. I like to put 1 cup of batter at a time into each cake pan. 

Cake Pan Sizes

This recipe makes two, 6″ round chocolate cakes – I use it to make the best chocolate cake (frosting with this chocolate buttercream or vanilla frosting). With a 6″ cake, every member of my family of 8 enjoys at least two slices. Here are ways to use different size cake pans:

  • Two 8″ cake pans. Double the recipe and bake in two 8″ cake pans.
  • Two 9″ cake pans. Double the recipe and bake in two 9″ cake pans.
  • One 8 or 9″ cake pan. Use a single recipe, you make need to increase baking time slightly.
  • 9×13″ pan. double the recipe, bake in a 9×13″ pan.
  • Sheet cake. Use my chocolate sheet cake recipe.
  • Cupcakes. Make my chocolate cupcakes recipe.

Bake in the preheated oven for 30-35 minutes, or until a toothpick inserted in the center of the cakes comes out clean or with a few crumbs.

chocolate cake baked in two 6" round cake pans on a wire cooling rack

Cool the Chocolate Cake

Put the cake pans on a wire cooling rack to cool to room temperature (takes about 30 minutes). Once cool, lift cakes out of the pans and remove parchment paper. Let cool completely on the wire cooling rack.

two chocolate cake layers cooling on a wire cooling rack

Frost & Decorate the Chocolate Cake

Once the cakes are completely cooled, frost or decorate them. I suggest using chocolate frosting, vanilla buttercream frosting, peanut butter frosting or this vanilla frosting!  Don’t forget to do a crumb coat first – a thin base layer of frosting to keep crumbs from getting into your final design. 

Freeze before decorating

Even if you plan on frosting the homemade chocolate cake the same day you bake it, I still recommend freezing it before frosting. Frosting a a cake when it’s frozen reduces the number of crumbs that make their way into the frosting.

Chill

If you decorate the cake with a design (like rosettes, etc.) I recommend chilling it in the refrigerator until the frosting hardens and the design sets. 

a whole frosted Chocolate Cake on a cake plate with chocolate chips and sprinkles

How to Serve Chocolate Cake

If you decorated the cake and chilled it in the refrigerator, remove it from the fridge 1-2 hours before serving so it can come to room temperature. This is another reason why I typically bake the chocolate birthday cake in advance. Then I frost it the day before someone’s birthday so it has time to chill/set and then come to room temperature to eat.

We like eating cake with a side of ice cream, like this homemade vanilla ice cream or homemade chocolate ice cream.  A dollop of homemade whipped cream also tastes amazing! 

overhead photo of chocolate cake with chocolate frosting and topped with chocolate chips and chocolate sprinkles. there are 3 slices cut out of the cake.

How to Store Chocolate Cake

Store chocolate cake in an airtight contianer at room temperature for up to 3 days, or in the refrigerator for up to 1 week.

Freeze

I often bake this homemade chocolate cake recipe a few days before I need to frost it and store it in the freezer. Simply wrap each chocolate cake layer tightly with plastic wrap, put them in a ziplock bags and store in the freezer.

Or, you can freeze a decorated cake for up to 1 month. Let it freeze first, then cover with foil and store. Let thaw in the refrigerator overnight, then bring it to room temperature before serving.

a whole frosted Chocolate Cake with chocolate frosting on a white marble cake plate topped with chocolate chips and sprinkles two slices have been cut out, and one is being pulled off the plate with a metal spatula

More Delicious Cake Recipes

If you love making cake from scratch, you need to try these recipes.

a whole frosted Chocolate Cake with chocolate frosting on a white marble cake plate topped with chocolate chips and sprinkles two slices have been cut out, and one is being pulled off the plate with a metal spatula so the moist texture is visible

Chocolate Cake Recipe FAQs

Here are my answers to some commonly asked questions about making this homemade chocolate cake recipe. 

Can you double this recipe? 

Yes! This recipe is easily doubled and baked in two, 9″ round cake pans. This is a great option if you will be making the cake for a large crowd. When I make this recipe as written for my family of 7, everyone usually eats three servings (slices) before the cake is gone. 

What’s the secret to a moist chocolate cake?

The key is using enough fat and moisture in the batter and, just as importantly, not overbaking the cake. This recipe uses oil and full-fat sour cream to create a rich, moist crumb.

How do you decorate a chocolate cake? 

I use either this chocolate buttercream frosting or homemade vanilla frosting to decorate this easy chocolate cake recipe. I use the following tools to decorate (after my kids choose their design): 
Piping bags – I have both reusable and disposable piping bags and use them all the time. 
Piping tips and couplers – I recommend a great starter tip and coupler set. However I always make this rosette style cake with a Wilton 1M tip and large coupler. 
Pastry Scraper. I use this pastry scraper to make a smooth crumb coat. I love it so much!

Can you freeze chocolate cake?

Yes, you can freeze the entire cake or individual slices. I suggest flash-freezing the cake/slices, then wrapping them tightly in plastic wrap and storing them in an airtight contianer. Thaw overnight in the refrigerator.

Can I make chocolate cake without coffee?

Yes! This chocolate cake recipe doesn’t require brewed coffee. It contains a small amount of espresso powder to deepen the chocolate flavor, but you can omit it if desired.

Does espresso powder make chocolate cake taste like cofee?

No, not at all. The small amount of espresso powder in this recipe enhances the flavor of the cocoa and makes the cake taste more chocolatey without giving it a noticeable coffee flavor.

What cocoa powder is best for chocolate cake?

I recommend a high-quality unsweetened cocoa powder for this recipe. You can use dark cocoa powder or even dutch-processed cocoa powder if you prefer an even deeper chocolate flavor.

Can I use butter instead of oil?

Yes, you can substitute melted butter for the canola oil.

Why is my cake dry?

The most common causes of dry chocolate cake are adding too much flour or overbaking it. Measure the flour carefully and remove the cake from the oven when a tester inserted in the center comes out clean or with a few moist crumbs.

Why did my cake sink in the middle?

Chocolate cake can sink if it is underbaked, if you didn’t measure the flour correctly and used too little, or if the leavening agents are expired.

Can I make chocolate cake ahead of time?

Yes! I always bake the cake a few days before I want to decorate and serve it. I freeze the layers in an airtight contianer wrapped in plastic wrap.

a slice of chocolate cake on a white plate, there are two layers of chocolate cake with chocolate buttercream frosting on the outside and in the middle. There are chocolate chips and chocolate sprinkles on top. A for is taking a bite out of the cake so the moist texture and perfect crumb are visible.

If you make and love my recipes, it would mean so much to me if you would leave a comment and rating! And don’t forget to follow along on Instagram, Pinterest, Facebook, TikTok and Youtube – be sure to tag @joyfoodsunshine and use the hashtag #joyfoodsunshine so I can see your creations!

Best Chocolate Cake Recipe From Scratch

Laura Sandford
This is the best chocolate cake recipe ever! It is rich, chocolatey and moist with a perfect crumb! Topped with chocolate buttercream frosting it's the ultimate chocolate birthday cake. Check out the step-by-step photos and watch the video to learn how to make this easy chocolate cake recipe and ditch boxed cake mixes once and for all!
4.99 from 94 votes
Course cake, Dessert
Cuisine American
Servings 16 Servings
Calories 217
Prep Time10 minutes
Cook Time30 minutes
Cooling time1 hour
Total Time1 hour 40 minutes

Video

Ingredients 
 

Instructions 

  • Preheat oven to 350 degrees Fahrenheit (177 degrees Celsius).
  • Line two 6” round cake pans with parchment paper and grease well. Set aside.
  • In a medium bowl, combine flour, sugar, cocoa powder, baking soda, baking powder, sea salt and espresso powder. Set aside
  • In a large bowl, whisk together canola oil, eggs, sour cream, milk and vanilla until the mixture is smooth.
  • Add dry ingredients to the wet ingredients and stir until combined.
  • Add mini chocolate chips and stir until evenly distributed.
  • Divide the batter evenly into the two prepared cake pans.
  • Bake in the preheated oven for 30-35 minutes, or until a toothpick inserted in the center of the cakes comes out clean or with a few crumbs.
  • Place cake pans on a wire cooling rack to cool to room temperature (takes about 30 minutes).
  • Once cool, lift cakes out of the pans and remove parchment paper. Let cool completely on the wire cooling rack.
  • Once cool, with chocolate frosting and serve.

Notes

Cake Pan Sizes
This recipe makes two, 6″ round chocolate cakes. With a 6″ cake, every member of my family of 8 enjoys at least two slices. Here are ways to use different size cake pans:
  • Two 8″ cake pans. Double the recipe and bake in two 8″ cake pans.
  • Two 9″ cake pans. Double the recipe and bake in two 9″ cake pans.
  • One 8 or 9″ cake pan. Use a single recipe, you make need to increase baking time slightly.
  • 9×13″ pan. double the recipe, bake in a 9×13″ pan.
  • Sheet cake. Use my chocolate sheet cake recipe.
  • Cupcakes. Make my chocolate cupcakes recipe.
Ingredient Substitutions
  • All-purpose flour. Cake flour or bread flour can be used in place of all-purpose flour. 
  • Granulated sugar. I suggest regular white sugar or organic cane sugar for the best results. 
  • Unsweetened cocoa powder. For an extra-dark cake use dark cocoa powder. 
  • Espresso powder. It’s totally worth purchasing if you love baking. You can substitute instant coffee if you must. 
  • Canola oil. You can substitute equal amounts of melted butter or another neutral oil if desired, however canola oil will yield the best results. 
  • Sour cream. Full-fat, plain Greek yogurt can be used in place of sour cream. I recommend using full-fat ingredients for the richest, most moist chocolate cake. 
  • Whole milk. Again, I am an advocate for using full-fat whole milk in this chocolate cake recipe. You could substitute 2% milk but nothing with a lower fat content. 
  • Vanilla extract. You can switch up the extract and use almond, peppermint, orange, etc. if you prefer a flavored chocolate cake. 
  • Mini chocolate chips. These are an absolute must. Regular-sized chocolate chips sink to the bottom of the cake while baking. Be sure to use mini chips for the best results. 
How to Store Chocolate Cake
Store chocolate cake in an airtight contianer at room temperature for up to 3 days, or in the refrigerator for up to 1 week.
Freeze
Freeze unfrosted cake layers wrapped in plastic wrap in an airtight container for up to 2 months.
Or, you can freeze a decorated cake for up to 1 month. Let it freeze first, then cover with foil and store. Let thaw in the refrigerator overnight, then bring it to room temperature before serving.
Nutrition information calculated for only the chocolate cake (without frosting), for 1 serving assuming the recipe makes 16 servings. 

Nutrition

Serving: 1slice | Calories: 217kcal | Carbohydrates: 28g | Protein: 3g | Fat: 11g | Saturated Fat: 3g | Cholesterol: 26mg | Sodium: 133mg | Potassium: 74mg | Fiber: 1g | Sugar: 20g | Vitamin A: 99IU | Vitamin C: 1mg | Calcium: 36mg | Iron: 1mg

Nutrition information is automatically calculated, so should only be used as an approximation.

Did you enjoy this recipe? Have a question? Leave a comment below!

Try these recipes


latest recipes

4.99 from 94 votes (37 ratings without comment)

Post a Comment or Ask a Question!

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

Recipe Rating




165 Comments

  1. 5 stars
    😄Your recipes are the greatest ever I 🥰love🥰 them, and are so fun to do too!😄Thank you!😄

  2. I detest coffee. I can taste it in a chocolate cake every time. Can I just sub in more cocoa powder? I have spent years passing up on every chocolate cake recipe that contains any amount of coffee. It would be nice to get a salution.

  3. 5 stars
    My husband loves chocolate. I do not, but we made this cake as part of a “ Force” cake for May the 4th. We layered it with a vanilla cake with your chocolate frosting between layers and your vanilla frosting on the outside- light side dark side. Delicious. I didn’t care for the texture of the chocolate chips, but my husband did. We will make this cake again.

    1. Love that you made the cake *and* some compromises! You can always omit the chocolate chips in the future!

  4. 5 stars
    Oh wow! Absolutely delicious! I did reduce the sugar to just one cup and it was still amazing. Double the recipe too. I had to re do

  5. 5 stars
    Wow, I followed the same procedure as u have specified. It’s delicious. This is the best cake so far I have done. However I don’t like too much sweet, so I didn’t go for chocolate frosting. It’s yummy. N moist too.Thank u for sharing such recipe.

  6. 5 stars
    Wow, I followed the same procedure as u have specified. It’s delicious. This is the best vahe so far I have done. However I doubt like too much sweet, so I didn’t go for chocolate frosting. It’s yummy. Thank u for sharing such recipe.