The Feast

Home cooking recipes for everyday dinners and easy entertaining

Yellow Cake with Chocolate Frosting from Scratch

· 5 min read · Baking and Desserts

The classic ratio for a from-scratch yellow cake is 2 cups (250g) all-purpose flour, 1½ cups (300g) sugar, ½ cup (113g) unsalted butter, ½ cup (120ml) vegetable oil, 1 cup (240ml) buttermilk, 3 large eggs, and 2 teaspoons vanilla extract, baked at 350°F (177°C) for 30–35 minutes. This yields a moist, tender crumb with a deep golden color and a rich chocolate frosting that sets without being too hard. The total time from start to frosted cake is about 1 hour 45 minutes, including cooling.

What Makes a Yellow Cake “Yellow” (and Not White or Vanilla)

Yellow cake gets its color and flavor from whole eggs (yolks included) and butter, whereas white cake uses only egg whites and often shortening. The yolks add fat, richness, and a natural yellow tint, while the butter contributes both flavor and a slightly denser texture. For a deeper yellow, use farm-fresh eggs with deeply colored yolks or add a pinch of turmeric (about ⅛ teaspoon) without changing the taste.

Ingredients You Need and Why Each One Matters

Use cake flour if you have it—it has lower protein (about 8–9%) than all-purpose (10–12%), giving a softer crumb. If using all-purpose, swap 2 tablespoons per cup with cornstarch to approximate cake flour. Buttermilk (or whole milk with 1 tablespoon lemon juice) provides acidity that tenderizes gluten and helps the baking soda leaven. Use unsalted butter so you control the salt; if you only have salted, reduce added salt to ¼ teaspoon. The oil (vegetable or canola) keeps the cake moist for days, while butter gives flavor—using both yields the best texture.

Step-by-Step Mixing Method (Creaming vs. Reverse Creaming)

The standard creaming method: beat softened butter and sugar on medium-high for 3–4 minutes until light and fluffy, then add oil, then eggs one at a time, then vanilla. Alternate adding dry ingredients (flour, baking powder, baking soda, salt) and buttermilk, starting and ending with dry, mixing just until combined after each addition. The reverse creaming method—mixing flour, sugar, and dry ingredients first, then beating in butter, then liquids—produces a finer, more even crumb and is more forgiving of overmixing. Both work; choose reverse creaming if you want a bakery-style texture.

Baking Times and Pan Sizes (With a Handy Table)

Bake at 350°F (177°C) for all pan sizes. Check for doneness with a toothpick inserted in the center—it should come out clean or with a few moist crumbs, not wet batter. The cake should pull away slightly from the pan edges and spring back when pressed gently. Here are the standard times:

Pan SizeBatter AmountBake Time
Two 8-inch round pans~3 cups each28–32 minutes
Two 9-inch round pans~2¾ cups each25–30 minutes
9×13-inch sheet panAll batter35–40 minutes
24 cupcakes~¼ cup each18–22 minutes

If your oven runs hot, start checking at the lower end of the time range. Rotate the pans halfway through baking for even browning.

How to Make a Silky Chocolate Frosting (Not Too Sweet, Not Too Stiff)

The best from-scratch chocolate frosting is a cooked fudge frosting: melt 1 cup (226g) unsalted butter, ½ cup (120ml) heavy cream, and ⅓ cup (40g) cocoa powder in a saucepan over medium heat, whisking until smooth. Remove from heat and beat in 3 cups (360g) powdered sugar and 1 teaspoon vanilla until thick and glossy. This frosting sets to a fudge-like consistency that spreads easily and doesn’t crust over. For a lighter, fluffier frosting, use a chocolate buttercream: beat 1 cup (226g) softened butter, then add 3 cups (360g) powdered sugar, ½ cup (40g) cocoa powder, ¼ cup (60ml) milk, and 1 teaspoon vanilla, beating for 3–4 minutes until airy. The cooked version is richer and less sweet, while buttercream is more stable for piping.

How to Frost a Layer Cake Without a Turntable

Cool the cakes completely—at least 1 hour—then level the tops with a serrated knife if they domed. Place one layer on a cake board or plate, spread about ¾ cup of frosting on top, and smooth to the edges. Add the second layer upside down (flat side up) for a level top. Apply a thin “crumb coat” of frosting all over the cake, then chill for 15 minutes. Finish with the remaining frosting, using an offset spatula for smooth sides. For a rustic look, leave the sides bare and just frost the top.

Storage, Freezing, and Shelf Life

Frosted cake keeps at room temperature in an airtight container for up to 3 days. Refrigerate only if your kitchen is very warm (above 75°F/24°C) or if you used a cream-based frosting—bring to room temperature before serving for best flavor. Unfrosted cake layers can be wrapped tightly in plastic wrap and frozen for up to 3 months; thaw in the refrigerator overnight. Frosting can be made ahead and refrigerated for up to 1 week—reheat gently in the microwave for 10 seconds and stir before using.

Troubleshooting Common Problems

If your cake is dry, you likely overbaked it or used too much flour—measure by spooning flour into the cup and leveling, not scooping. If it’s dense, you may have overmixed after adding flour, which develops gluten. If it sinks in the middle, your oven was too cool or you opened the door too early. If the frosting is too runny, add more powdered sugar (2 tablespoons at a time) or chill it for 10 minutes. If it’s too stiff, add milk 1 teaspoon at a time. A cracked top is normal for yellow cake—just level it off.

Recipe Variations and Add-Ins

For a citrus twist, add 1 tablespoon lemon zest to the sugar and rub with your fingers before creaming. For a marble effect, swirl ¼ cup of chocolate frosting into the batter before baking. For a nutty crunch, fold ½ cup toasted pecans or walnuts into the batter. To make it a chocolate-yellow marble, divide batter into two bowls, mix 2 tablespoons cocoa powder into one, and layer in the pan. For a dairy-free version, use plant-based butter, oil, and a non-dairy yogurt or milk with 1 teaspoon vinegar—baking time stays the same.

In this article
  1. What Makes a Yellow Cake “Yellow” (and Not White or Vanilla)
  2. Ingredients You Need and Why Each One Matters
  3. Step-by-Step Mixing Method (Creaming vs. Reverse Creaming)
  4. Baking Times and Pan Sizes (With a Handy Table)
  5. How to Make a Silky Chocolate Frosting (Not Too Sweet, Not Too Stiff)
  6. How to Frost a Layer Cake Without a Turntable
  7. Storage, Freezing, and Shelf Life
  8. Troubleshooting Common Problems
  9. Recipe Variations and Add-Ins