Go Back
A stunning, professional-looking two-layer carrot cake sitting on a white pedestal cake stand, with a slice already served on a matching side plate. The cake is generously frosted with creamy icing and topped with crushed walnuts, captured in a bright, modern kitchen setting.

The Best Carrot Cake with Cream Cheese Frosting

A foolproof, ultra-moist carrot cake from scratch with a thick, pipeable cream cheese frosting. Made with finely grated fresh carrots, warm spices, brown sugar, and crushed pineapple for a cake that stays moist and flavorful for days.
Prep Time 25 minutes
Cook Time 35 minutes
Total Time 1 hour
Servings: 14 Servings
Course: Dessert
Cuisine: American
Calories: 580

Ingredients
  

For the Cake Layers
  • 2 cups all-purpose flour
  • 2 tsp baking soda
  • 1 tsp baking powder
  • 1 1/2 tsp ground cinnamon
  • 1/2 tsp ground nutmeg
  • 1/4 tsp 1/4
  • 1/4 tsp ground allspice
  • 1/2 tsp salt
  • 1 cup granulated sugar
  • 1 cup light brown sugar packed
  • 1 cup vegetable oil
  • 4 large eggs room temperature
  • 2 tsp vanilla extract
  • 3 cups finely grated fresh carrots about 4 medium carrots
  • 1/2 cup crushed pineapple well drained, optional
  • 1/2 cup chopped toasted walnuts or pecans optional
For the Cream Cheese Frosting
  • 16 oz cream cheese full-fat brick-style (Philadelphia), softened
  • 1/2 cup unsalted butter softened
  • 4 cups powdered sugar sifted
  • 2 tsp vanilla extract
  • 1 pinch salt
  • 1 tbsp sour cream optional, adds depth

Equipment

  • 1 Box grater (fine side) or food processor for grating carrots
  • 2 9-inch round cake pans
  • 1 KitchenAid stand mixer or hand mixer for frosting
  • 1 Digital kitchen scale for accurate measuring
  • 1 Offset spatula for frosting
  • 1 Cake turntable for smooth sides
  • 1 Bench scraper for clean finish
  • Parchment paper rounds for easy layer removal

Method
 

  1. Preheat oven to 350 degrees F. Grease two 9-inch pans, line with parchment, grease parchment.
    Two 9-inch round cake pans on a wooden counter, fully greased and lined with white parchment paper, with a modern oven showing 350°F in the background.
  2. Whisk together flour, baking soda, baking powder, all spices, and salt in a large bowl.
    A large glass mixing bowl filled with a well-combined mound of light brown flour mixture and various spices on a wooden counter.
  3. In a separate bowl, whisk both sugars with oil until combined. Add eggs one at a time. Add vanilla.
    A glossy, deep golden mixture of oil, sugars, eggs, and vanilla being whisked together in a glass bowl, creating smooth, concentric swirls on a wooden surface.
  4. Add dry ingredients to wet and mix with a spatula until just combined.
    The wet, glossy batter and the dry flour mixture are actively being folded together in a glass bowl with a spatula, creating a marbled texture on a wooden counter.
  5. Fold in finely grated carrots, drained pineapple, and nuts if using.
    A glass mixing bowl filled with a rich, textured Carrot Cake batter packed with visible shreds of orange carrots, chunks of pineapple, and toasted nuts, ready for the oven.
  6. Divide batter between prepared pans. Bake 30 to 35 minutes until a toothpick comes out clean.
    Two round cake pans filled with raw, textured carrot cake batter, sitting on a wooden kitchen counter ready to go into the oven.
  7. Cool in pans 15 minutes, then turn onto a wire rack to cool completely before frosting.
    Two perfectly golden-brown, baked round carrot cake layers resting on a black wire cooling rack on a wooden kitchen counter, cooling before frosting.
  8. For frosting: beat cream cheese and butter until completely smooth, 2 to 3 minutes.
    A glass mixing bowl filled with a smooth, whipped cream cheese and butter base for frosting, sitting on a wooden kitchen counter.
  9. Add powdered sugar one cup at a time on low speed. Add vanilla, salt, and sour cream.
    A glass mixing bowl filled with a creamy, speckled vanilla bean frosting, showing a smooth, whipped texture with visible vanilla bean specks, resting on a wooden counter.
  10. Beat on medium for 1 minute until thick and smooth. Refrigerate 20 minutes if too soft.
    A glass mixing bowl filled with thick, smooth vanilla bean frosting sitting on the middle shelf of an empty refrigerator, with a note attached to the bowl that reads "Chill: 20 mins".
  11. Level layers if needed. Assemble with frosting between layers.
    A two-layer carrot cake being assembled on a white cake stand, with a thick, even layer of cream cheese frosting sandwiched between two perfectly level, golden-brown cake layers.
  12. Apply a thin crumb coat, refrigerate 20 minutes, then apply final frosting layer.
    A beautiful two-layer carrot cake on a white pedestal stand, completely covered in smooth, creamy frosting, with a cake knife resting beside it on a wooden table.

Notes

  • Use the fine side of the box grater for carrots, not the large side. This is the most important tip.
  • Drain pineapple very thoroughly before adding to avoid a wet batter.
  • Use full-fat Philadelphia brick-style cream cheese only. Tub-style makes runny frosting.
  • Cool layers completely before frosting, or the frosting will melt and slide.
  • Flavor improves overnight. Make it a day ahead for best results.
  • Refrigerate frosted cake for up to 5 days. Serve at room temperature.