Chocolate Cake Recipe
This post may contain affiliate links. Please see my disclosure policy for more information.
This is the best chocolate cake recipe, so moist and filled with the perfect amount of chocolate! We make our chocolate cake recipe from scratch along with a homemade chocolate buttercream.

If you’re looking for a simple chocolate cake recipe, this is it! A truly delicious Chocolate Cake Recipe from Scratch, perfect to use as a birthday cake! Want more cake options? Try our Confetti Cake (Sprinkle Cake) or Chocolate Chip Cake!

Our best chocolate cake recipe does best with regular sugar for a good crumb, but if you don’t mind a little more nooks you can go ahead and use organic raw cane sugar.
Chocolate Cake Ingredients
- Milk: Oatly Full Fat (for dairy-free) or regular whole milk.
- Vinegar: Adds tang and reacts with the baking soda for a light texture.
- Granulated Sugar: Sweetens the cake and helps create a soft texture.
- All-Purpose Flour: We use Kirkland or King Arthur Flour.
- Unsweetened Cocoa Powder: Adds a deep chocolate flavor, we like the Hershey brand for our allergens.
- Baking Soda: Helps the cake rise.
- Baking Powder: Works alongside the baking soda for optimal rising of the cake.
- Salt: A little bit goes a long way on balancing the flavors.
- Eggs: Make sure to use large eggs, not medium or extra large.
- Vegetable Oil: Keeps the cake moist, you could use your preferred neutral flavored oil.
- Vanilla Extract: Adds a warm, aromatic flavor, use a good quality brand.
- Hot Coffee: Enhances the chocolate flavor (or use 1 cup hot water with 1 teaspoon coffee extract for a caffeine-free option).
Chocolate Buttercream Ingredients
- Butter: Country Crock for dairy-free, or regular butter, softened. We do use salted, if you’re using unsalted add a pinch or two of salt.
- Powdered Sugar: Adds sweetness and gives the frosting a smooth texture.
- Unsweetened Cocoa Powder: Provides a rich chocolate flavor!
- Milk: Oatly Full Fat (for dairy-free) or regular whole milk to adjust the frosting’s consistency.
- Vanilla Extract: Complements the chocolate in the frosting.

How to Make Chocolate Cake
Preheat your oven to 350°F (177°C). Grease two 8-inch round cake pans or line them with parchment paper if they are not nonstick. If making cupcakes, line a cupcake tin with paper liners.
Prepare the buttermilk substitute by combining 1 cup of milk with 1 tablespoon of vinegar. Set it aside for a few minutes while you prepare the other ingredients.
Sift together the granulated sugar, flour, cocoa powder, baking soda, baking powder, and salt into a large mixing bowl or the bowl of a stand mixer.
In a separate bowl, whisk together the eggs, milk mixture, oil, and vanilla extract until well combined.
Gradually add the dry ingredients to the wet ingredients, mixing until just combined. Avoid overmixing.
Stir in the hot coffee (or hot water with coffee extract) and mix until the batter is smooth and runny.
Pour the batter evenly into the prepared cake pans or cupcake tins. Bake the cakes for 30-35 minutes, or until a toothpick inserted in the center comes out with minimal crumbs. For cupcakes, bake for 12-15 minutes.
Cool the cakes in the pans on a wire rack for at least 20 minutes before removing them from the pans to cool completely.
How to Make Chocolate Buttercream Frosting
Start by beating the softened butter in a large mixing bowl until it’s light and creamy. This gives your frosting that fluffy base.
Next, sift together the powdered sugar and cocoa powder to remove any lumps. Slowly add this dry mixture into the butter, a little at a time, mixing on low so it doesn’t dust out and go everywhere.
Pour in 5 tablespoons of milk and the vanilla extract, then beat on medium-high until the frosting is smooth and spreadable. If it feels too thick, add the last tablespoon of milk. If it’s too thin, mix in a bit more powdered sugar until it reaches your perfect texture.
Keep whipping until the frosting is fluffy and holds its shape, about 3 minutes. Now it’s ready to spread or pipe onto cakes, cupcakes, or cookies!

WHY DO YOU PUT COFFEE IN YOUR CHOCOLATE CAKE RECIPE?
You won’t really taste the coffee in this chocolate cake, but you will taste a rich chocolate flavor!
The coffee actually enhances the chocolate flavor and makes it really stand out. If you don’t want to add coffee you can use coffee extract instead. I always keep instant coffee around the house so I can quickly use it to make this chocolate cake recipe!

HOW TO MAKE A MOIST CHOCOLATE CAKE RECIPE:
The reason we use the “buttermilk” in this recipe is to really make the chocolate cake moist. Vinegar and Milk mixed together to create a buttermilk substitute. Buttermilk breaks down the tough gluten in the flour and results in a moist and tender crumb.

Recipe Tips and Notes:
- For a more intense chocolate flavor, use Dutch-processed cocoa powder in place of regular unsweetened cocoa.
- If you’re using cake pans that tend to stick, lining them with parchment paper helps ensure easy removal. I like using round air fryer parchment paper.
- This recipe can easily be adapted to cupcakes or layered cakes. Adjust the baking time to about 25 minutes for cupcakes.
- If you don’t have coffee on hand, hot water mixed with coffee extract works as a great substitute to deepen the chocolate flavor.


Chocolate Cake Recipe
Ingredients
Chocolate Cake Recipe
- 1 cup (236.59 ml) milk we use oatly full fat for dairy free
- 1 tablespoon (1 tablespoon) vinegar
- 2 cups (400 g) granulated sugar
- 1 3/4 cup (218.75 g) all-purpose flour
- 3/4 cup (64.5 g) unsweetened cocoa powder
- 2 teaspoons (2 teaspoons) baking soda
- 1 1/2 teaspoons (1.5 teaspoons) baking powder
- 1/2 teaspoon (0.5 teaspoon) salt
- 2 large (2 large) eggs
- 1/2 Cup (118.29 ml) vegetable oil
- 2 teaspoons (2 teaspoons) vanilla extract
- 1 cup (237 g) hot coffee you can also use 1 cup of hot water with 1 teaspoon of coffee extract
Chocolate Buttercream Recipe
- 1 1/2 cups (340.5 g) butter softened, we use country crock for dairy free
- 5 cups (600 g) powdered sugar
- 3/4 cup (64.5 g) unsweetened cocoa powder
- 5-6 tablespoons (5 tablespoons) milk we use oatly full fat for dairy free
- 2 teaspoons (2 teaspoons) vanilla extract
Instructions
Chocolate Cake Recipe
- Preheat oven to 350 degrees F and grease two 8-inch round cake pans. (you can also use for cupcakes) If your cake pans aren't nonstick, you may want to add parchment paper as well.
- In a small bowl, combine the milk and vinegar and set it aside.
- Sift together the granulated sugar, all-purpose flour, cocoa powder, baking powder, baking soda, and salt into a stand mixer bowl.
- In a mixing bowl, add in the eggs, prepared milk mixture, oil, and vanilla. Mix until the wet ingredients are combined, scrape the bowl if using a mixer.
- Add the dry ingredients to the wet ingredients until just combined. Next, add in the hot coffee and then mix again until just combined. The batter will have a runny consistency.
- Bake cakes for 30-35 minutes, or until toothpick inserted shows minimal crumbs. If making cupcakes, bake for 12-15 minutes or until a toothpick inserted shows minimal crumbs.
- Place the pans onto a wire rack and cool for at least 20 minutes before removing the cakes.
Chocolate Buttercream
- Add the butter to a large mixing bowl or the bowl of a stand mixer. Beat on medium speed until it’s smooth, creamy, it should be pale in color, about 2 minutes.
- In a separate bowl, sift together the powdered sugar and cocoa powder to remove any clumps.
- With the mixer on low speed, slowly add the sifted sugar and cocoa into the butter a little at a time. Mix just until combined, scraping down the sides of the bowl as needed.
- Pour in the milk and vanilla extract, then increase the mixer speed to medium-high. Beat until the frosting is light, fluffy, and spreadable, about 2 to 3 minutes.
- Check the consistency: if the frosting is too thick, mix in another splash of milk. If it’s too thin, add a little more powdered sugar until it holds its shape.
- Frost cake once cooled.




Oh my goodness! Those look yummy!
Sounds delicious!
I wish it wasn’t going to be hot today or I would be baking.
I love cupcakes and these look so good!
Hi, this weekend is fastidious in support of me, because this time i am reading this impressive informative article here at my house.
this is my go to chocolate cake recipe anymore. I love it so much
Aw, Thank you so much for trying it and loving it T! Your comment just made my day 😀
Best chocolate cake I have ever made. I did vanilla icing. But I have made this chocolate icing and it is also the best I have ever had.
That makes me so happy to hear! I’m glad you enjoyed both the cake and the chocolate icing. Vanilla icing is delicious too!
Question. Can I use butttrmilk?
I haven’t personally tried, but I’d imagine it be a bit more moist and possibly more dense. Now I’m curious!! If you try, let us know! 🙂
This tastes like my childhood in a cake. I’ve been looking for a recipe for chocolate cake that I actually like for a while and this was it! Not too dense, beautifully moist, with just the right notes of coffee and buttermilk. Made cupcakes with it and they were so satisfying!
Hi Robyn, That’s the best compliment ever, thank you! I’m so glad you loved the texture, flavor, and that the cupcakes turned out perfect for you!
Best chocolate chiffon ever! I’ve added 2 tablespoons of sugar. Thanks for sharing!
.
You’re so welcome!! I’m so glad you enjoyed!!