Chocolate Cake Recipe From Scratch
In this article
Time: About 1 hour 15 minutes (plus cooling) Serves: 12 The key step: Cream the butter and sugar until light and fluffy, then alternate the dry and wet ingredients. This is a classic American chocolate layer cake: moist, tender, and deeply chocolatey, with a soft crumb and a shiny fudge frosting.
The Cake Itself
This recipe makes a dependable, everyday chocolate cake. The method is the same one used for most American layer cakes: cream butter and sugar, add eggs, then alternate dry ingredients with buttermilk. Buttermilk gives a slight tang and helps the baking soda react, which makes the cake tender. If you don't have buttermilk, you can use plain yogurt thinned with a little milk, or just use whole milk with a teaspoon of lemon juice or vinegar.
Ingredients
For the cake
- 2 cups (240 g) all-purpose flour
- 1 ¾ cups (350 g) granulated sugar
- ¾ cup (75 g) unsweetened cocoa powder (natural or Dutch-processed)
- 1 ½ teaspoons baking powder
- 1 ½ teaspoons baking soda
- 1 teaspoon salt
- 2 large eggs, at room temperature
- 1 cup (240 ml) buttermilk, at room temperature
- ½ cup (120 ml) vegetable oil
- 2 teaspoons vanilla extract
- 1 cup (240 ml) hot coffee or hot water
For the fudge frosting
- 1 ½ cups (340 g) unsalted butter, softened
- 3 cups (360 g) powdered sugar, sifted
- ¾ cup (75 g) unsweetened cocoa powder, sifted
- ½ cup (120 ml) heavy cream
- 2 teaspoons vanilla extract
- ¼ teaspoon salt
Baking the Layers
- Heat the oven to 350°F (180°C). Grease two 9-inch round cake pans and line the bottoms with parchment paper.
- In a large bowl, whisk together the flour, sugar, cocoa, baking powder, baking soda, and salt.
- In another bowl, whisk the eggs, buttermilk, oil, and vanilla until combined.
- Pour the wet ingredients into the dry and mix with a spatula or electric mixer on low until just combined. The batter will be thick.
- Slowly pour in the hot coffee or water, mixing until smooth. The batter will be thin—that’s correct.
- Divide the batter evenly between the pans. Bake for 30–35 minutes, until a toothpick inserted in the center comes out clean or with just a few moist crumbs. The cakes should pull away from the pan edges slightly.
- Cool in the pans on a rack for 15 minutes, then turn out onto the rack to cool completely before frosting.
Making the Frosting
- In a large bowl, beat the softened butter with an electric mixer until creamy, about 2 minutes.
- Add the sifted powdered sugar and cocoa, then the cream, vanilla, and salt. Beat on low until combined, then increase to medium-high and beat for 2–3 minutes until light and fluffy. If the frosting is too stiff, add more cream a tablespoon at a time; if too soft, add more powdered sugar.
Assembling and Storing
Place one cake layer on a serving plate. Spread about 1 cup of frosting on top. Place the second layer over it. Frost the top and sides with the remaining frosting. If you like, press chocolate shavings or chopped nuts onto the sides.
Store the frosted cake in an airtight container at room temperature for up to 3 days, or in the fridge for up to 5 days. Bring to room temperature before serving. The unfrosted layers can be wrapped tightly in plastic and frozen for up to 3 months; thaw overnight in the fridge before frosting.
Doneness and Troubleshooting
The cake is done when a toothpick inserted into the center comes out clean or with a few moist crumbs, and the top springs back when lightly pressed. If you use an instant-read thermometer, the center should read about 200–205°F (93–96°C).
Overmixing the batter after adding the flour will develop gluten and make the cake tough and dense. Mix only until the flour disappears.
Opening the oven door too early (before 25 minutes of baking) can make the cakes sink in the middle. Wait until the minimum time before checking.
Using cold buttermilk or eggs can make the batter curdle and the cake less tender. Let them sit at room temperature for 30 minutes before starting.
Substitutions and Variations
If you don’t have buttermilk, use 1 cup whole milk plus 1 tablespoon lemon juice or white vinegar; let it sit for 5 minutes. For a gluten-free version, substitute the all-purpose flour with a 1:1 gluten-free baking flour blend. For a peppermint chocolate cake, add ½ teaspoon peppermint extract to the frosting and crush candy canes on top.
This cake is a reliable go-to for birthdays, potlucks, or a simple weekend bake. The coffee in the batter doesn’t make it taste like coffee—it deepens the chocolate flavor. If you prefer no coffee, use hot water instead.