Desserts

Carrot Cake Recipe

This carrot cake has a tender, moist crumb, warm cinnamon spice, toasted pecans, and a smooth cream cheese frosting. Bake it as two layers for an impressive but practical dessert.

Carrot Cake Recipe

Overview

This carrot cake recipe makes two tender 9-inch layers with plenty of freshly grated carrot, cinnamon, ginger, and toasted pecans. The cake is moist without being wet, and the carrots soften as they bake without disappearing completely into the crumb.

A tangy cream cheese frosting balances the sweetness. For the cleanest slices, cool the layers completely before frosting, then chill the assembled cake briefly before serving.

Ingredients

  • 2 cups (250 g) all-purpose flour
  • 2 teaspoons ground cinnamon
  • 1 teaspoon baking powder
  • 1 teaspoon baking soda
  • 1/2 teaspoon fine salt
  • 1/2 teaspoon ground ginger
  • 1/4 teaspoon ground nutmeg
  • 1 cup (200 g) light brown sugar, packed
  • 1/2 cup (100 g) granulated sugar
  • 1 cup (240 ml) neutral oil, such as canola or sunflower oil
  • 4 large eggs, at room temperature
  • 2 teaspoons vanilla extract
  • 3 cups (about 300 g) finely grated carrots, from approximately 5 to 6 medium carrots
  • 3/4 cup (85 g) toasted pecans, finely chopped

For the cream cheese frosting

  • 8 ounces (225 g) full-fat cream cheese, softened but still cool
  • 1/2 cup (113 g) unsalted butter, softened
  • 3 cups (360 g) powdered sugar, sifted
  • 1 teaspoon vanilla extract
  • 1/4 teaspoon fine salt
  • 1 to 2 tablespoons heavy cream or milk, only if needed

How to make it

  1. Prepare the pans and oven. Heat the oven to 350°F (175°C). Grease two 9-inch round cake pans, line the bottoms with parchment, and lightly flour the sides. If your pans are dark or nonstick, check the cake a few minutes early because they can brown faster.

  2. Toast the pecans. Spread the chopped pecans on a small baking sheet and toast them in the heating oven for 6 to 8 minutes, stirring once, until fragrant and lightly browned. Let them cool. Do not skip the cooling step; hot nuts can make the batter looser.

  3. Mix the dry ingredients. Whisk the flour, cinnamon, baking powder, baking soda, salt, ginger, and nutmeg in a medium bowl until evenly combined. Breaking up any baking soda or brown sugar clumps now helps the cake rise evenly.

  4. Mix the wet ingredients. In a large bowl, whisk the brown sugar, granulated sugar, and oil until smooth. Add the eggs one at a time, whisking well after each addition, then whisk in the vanilla. The mixture should look glossy and slightly thick.

  5. Combine the batter. Add the dry ingredients to the wet ingredients and fold with a spatula just until no dry streaks remain. Fold in the grated carrots and cooled pecans. The batter will be thick and textured; avoid vigorous mixing, which can make the cake dense.

  6. Fill and bake. Divide the batter evenly between the prepared pans and smooth the tops. Bake for 28 to 34 minutes, rotating the pans halfway through if your oven has hot spots. The cakes are done when the tops spring back lightly, the edges have pulled away slightly from the pans, and a toothpick inserted in the center comes out with a few moist crumbs rather than wet batter.

  7. Cool the layers. Leave the cakes in their pans for 10 minutes. Run a thin knife around the edges, turn the layers onto wire racks, peel away the parchment, and let them cool completely. Warm layers will melt the frosting and can cause the cake to slide.

  8. Make the frosting. Beat the cream cheese and butter together on medium speed for 2 to 3 minutes, until smooth and creamy. Add the sifted powdered sugar in three additions, mixing on low until incorporated. Beat in the vanilla and salt, then increase the speed briefly until fluffy. Add cream or milk only if the frosting is too stiff to spread; use it one teaspoon at a time.

  9. Assemble the cake. If the layers have domed, trim a thin amount from the tops with a serrated knife. Place one layer on a serving plate and spread with about 1 cup of frosting. Set the second layer on top, bottom-side up for a flatter surface. Cover the top and sides with the remaining frosting. For a simple finish, leave a few loose swirls and sprinkle with extra chopped pecans if desired.

  10. Chill and serve. Refrigerate the assembled cake for 30 to 60 minutes so the frosting firms and the layers slice neatly. Let it sit at room temperature for about 15 minutes before serving for the best texture.

Expert tips

  • Grate the carrots on the fine or medium side of a box grater. Very thick shreds may remain crunchy, while carrot purée can add too much moisture.
  • Do not squeeze the grated carrots dry. Their moisture is important to the cake, but avoid adding liquid that collects in the bowl.
  • Measure flour by weight when possible. If using cups, spoon it into the measuring cup and level it rather than scooping directly from the bag.
  • Use full-fat block cream cheese for frosting. Tub-style cream cheese contains more moisture and can produce a loose frosting.
  • For a nut-free cake, replace the pecans with 3/4 cup (65 g) unsweetened shredded coconut or leave them out. The batter does not need another adjustment.
  • If you prefer raisins, fold in up to 3/4 cup (110 g) alongside the pecans. Do not add extra, as too much dried fruit can weigh down the layers.

Serving and storage

Serve the cake slightly cool or at cool room temperature. It is especially good with coffee, tea, or a glass of milk.

Because the frosting contains cream cheese, cover the cake and refrigerate it. It keeps well for up to 4 days. For the best texture, let individual slices stand at room temperature for 15 to 20 minutes before eating. Unfrosted, fully cooled layers can be wrapped tightly and refrigerated for up to 3 days or frozen for up to 2 months; thaw them while still wrapped, then frost once completely at room temperature.

Frequently asked questions

Can I make this carrot cake in a 9-by-13-inch pan?

Yes. Spread the batter in a greased and parchment-lined 9-by-13-inch pan and begin checking after 32 minutes. The cake is ready when the center springs back lightly and a toothpick comes out with a few moist crumbs. Cool it completely in the pan before frosting.

Why did my carrot cake turn out dense?

The most common causes are overmixing after the flour is added, too much flour, or baking powder or baking soda that is no longer active. Fold only until the dry ingredients disappear, measure the flour carefully, and check that the cake rises evenly during baking.

Can I use pre-shredded carrots?

Freshly grated carrots are preferable because they are finer and more moist. Pre-shredded carrots can be used if they are very fine; chop them smaller if the pieces are long or coarse.

How can I keep cream cheese frosting from becoming runny?

Use block-style full-fat cream cheese, keep it cool, sift the powdered sugar, and avoid overbeating after it becomes smooth. If it is loose, refrigerate it for 20 to 30 minutes before spreading. Add no milk unless the frosting is genuinely too stiff.