By Emily Carter Category Dessert Recipes Published Oct 21, 2026

Carrot Cake Recipe: Moist, Spiced & Topped with Cream Cheese Frosting

Moist two-layer carrot cake with cream cheese frosting and chopped pecans

This carrot cake recipe is the one I reach for whenever I need a cake that never fails: incredibly moist, warmly spiced with cinnamon, and layered with a tangy cream cheese frosting that is just sweet enough. It is a classic two-layer cake made with oil instead of butter, which is exactly why it stays soft and tender for days.

You do not need a mixer for the batter, and you do not need any fancy ingredients. Fresh grated carrots, a little crushed pineapple, and a few pantry spices do all the work. Below are the exact steps, the small details that keep the crumb moist (never dense or dry), and the mistakes to avoid.

On this pageTable of contentsH1 · H2 · H3 heading structure31 headingsOpenClose

Why This Carrot Cake Recipe Works

  • Oil instead of butter. Oil keeps the crumb moist for days, while butter-based cakes firm up in the fridge.
  • Two sugars. Granulated sugar gives structure, brown sugar adds moisture and a gentle caramel note.
  • A little crushed pineapple. Half a cup of well-drained pineapple melts into the batter and keeps every bite extra moist without making the cake taste like pineapple.
  • Freshly grated carrots. Hand-grated carrots are juicier than the dry pre-shredded kind, and juicy carrots mean a moist cake.
Carrot cake ingredients with grated carrots, eggs, flour, spices and cream cheese

Ingredients You’ll Need

For the Carrot Cake

  • 2 cups (250 g) all-purpose flour
  • 2 teaspoons baking soda
  • 2 teaspoons ground cinnamon
  • 1/2 teaspoon ground ginger
  • 1/4 teaspoon ground nutmeg
  • 1/2 teaspoon fine salt
  • 1 cup (200 g) granulated sugar
  • 3/4 cup (165 g) packed brown sugar
  • 1 1/4 cups (300 ml) vegetable oil (or any neutral oil)
  • 4 large eggs, at room temperature
  • 2 teaspoons vanilla extract
  • 3 cups (about 330 g) finely grated carrots, about 5 to 6 medium carrots
  • 1/2 cup (about 120 g) crushed pineapple, very well drained (optional but recommended)
  • 1 cup (100 g) chopped pecans or walnuts (optional)
  • 1/2 cup (75 g) raisins (optional)

For the Cream Cheese Frosting

  • 16 ounces (450 g) full-fat block cream cheese, softened
  • 1/2 cup (113 g) unsalted butter, softened
  • 4 cups (480 g) powdered sugar, sifted
  • 2 teaspoons vanilla extract
  • Pinch of fine salt

A Note on the Carrots

Grate the carrots yourself on the fine or medium holes of a box grater. Bagged pre-shredded carrots are dry and thick, and they bake into visible, chewy strands instead of melting into the crumb. Squeeze the grated carrots lightly if they seem very wet, but do not dry them out – their moisture is part of the recipe.

Equipment You’ll Need

  • Two 9-inch round cake pans
  • Parchment paper
  • Box grater
  • Large mixing bowls
  • Whisk and spatula
  • Electric mixer (for the frosting)
  • Wire cooling rack

How to Make Carrot Cake, Step by Step

Step 1: Prep the Pans and Oven

Heat the oven to 350°F (175°C). Grease two 9-inch round cake pans, line the bottoms with parchment circles, and grease the parchment. This guarantees the layers release cleanly.

Step 2: Mix the Dry Ingredients

Whisk the flour, baking soda, cinnamon, ginger, nutmeg, and salt together in a medium bowl until evenly combined.

Step 3: Whisk the Wet Ingredients

In a large bowl, whisk both sugars, the oil, eggs, and vanilla until smooth and glossy, about 1 minute.

Step 4: Combine and Fold in the Carrots

Add the dry ingredients to the wet and stir with a spatula just until no dry flour remains. Fold in the grated carrots, drained pineapple, and the nuts and raisins if using. Do not overmix; a few small streaks are fine.

Step 5: Bake the Layers

Divide the batter evenly between the pans and smooth the tops. Bake for 30 to 35 minutes, until the tops spring back when touched and a toothpick in the center comes out clean or with a few moist crumbs.

Step 6: Cool Completely

Cool the layers in the pans for 10 minutes, then turn them out onto a wire rack, peel off the parchment, and cool completely, at least 1 hour. Frosting a warm cake is the fastest way to a melted, sliding mess.

Step 7: Make the Frosting

Beat the softened cream cheese and butter together until smooth and creamy, about 2 minutes. Add the powdered sugar, vanilla, and salt, and beat on low until combined, then on medium for 1 minute until fluffy. If the frosting is soft, chill it for 15 minutes before using.

Step 8: Frost and Serve

Place the first layer on a serving plate and spread about 1 cup of frosting over the top. Add the second layer and frost the top and sides. Swirl the frosting with the back of a spoon and scatter a few chopped pecans around the edge if you like. Slice with a warm, dry knife for clean cuts.

Carrot Cake Recipe

Recipe by Emily Carter
0.0 from 0 votes

A moist, warmly spiced carrot cake layered with tangy cream cheese frosting. Made with fresh grated carrots, a little crushed pineapple, and simple pantry staples – no mixer needed for the batter.

Cuisine: AmericanDifficulty: Medium
Servings

12

servings
Prep time

25

minutes
Cooking time

35

minutes
Calorieskcal
Total time

1

hour 

Ingredients

  • For the Cake
  • 2 cups (250 g) all-purpose flour

  • 2 teaspoons baking soda

  • 2 teaspoons ground cinnamon

  • 1/2 teaspoon ground ginger

  • 1/4 teaspoon ground nutmeg

  • 1/2 teaspoon fine salt

  • 1 cup (200 g) granulated sugar

  • 3/4 cup (165 g) packed brown sugar

  • 1 1/4 cups (300 ml) vegetable oil

  • 4 large eggs, at room temperature

  • 2 teaspoons vanilla extract

  • 3 cups (330 g) finely grated carrots

  • 1/2 cup crushed pineapple, well drained (optional)

  • 1 cup chopped pecans or walnuts (optional)

  • 1/2 cup raisins (optional)

  • For the Cream Cheese Frosting
  • 16 ounces (450 g) cream cheese, softened

  • 1/2 cup (113 g) unsalted butter, softened

  • 4 cups (480 g) powdered sugar, sifted

  • 2 teaspoons vanilla extract

  • Pinch of fine salt

Directions

  • Heat oven to 350°F (175°C). Grease two 9-inch round pans, line the bottoms with parchment, and grease the parchment.Carrot cake ingredients with grated carrots, eggs, flour, spices and cream cheese
  • Whisk flour, baking soda, cinnamon, ginger, nutmeg and salt in a medium bowl.
  • In a large bowl, whisk both sugars, oil, eggs and vanilla until smooth and glossy.
  • Stir the dry ingredients into the wet just until combined. Fold in carrots, drained pineapple, and nuts and raisins if using.
  • Divide batter between the pans and bake 30 to 35 minutes, until a toothpick in the center comes out clean or with moist crumbs.
  • Cool in the pans 10 minutes, then turn out onto a rack and cool completely, at least 1 hour.
  • Make the frosting: beat cream cheese and butter until smooth; add powdered sugar, vanilla and salt; beat until fluffy.
  • Fill and frost the cooled layers. Slice with a warm, dry knife and serve.A slice of moist carrot cake with cream cheese frosting on a dessert plate

Notes

  • Frosted cake keeps covered in the refrigerator for up to 5 days. Unfrosted layers freeze well for up to 3 months.
A slice of moist carrot cake with cream cheese frosting on a dessert plate

Expert Tips for the Best Carrot Cake

  • Weigh the carrots if you can. Three cups loosely packed grated carrot is about 330 g. Too many carrots can make the cake heavy and gummy.
  • Room-temperature eggs mix better. Cold eggs can curdle the batter. Set them out 30 minutes ahead, or warm them in a bowl of lukewarm water for 5 minutes.
  • Drain the pineapple well. Press it in a sieve with the back of a spoon. Extra pineapple juice is the most common reason this cake turns out soggy in the middle.
  • Do not overbake. Pull the layers as soon as the toothpick shows moist crumbs. Even 5 extra minutes dries out the edges.
  • Frost cold layers. If you have time, chill the cooled layers for 30 minutes before frosting. Cold layers crumb less and stack straighter.

Easy Variations

  • Carrot cupcakes: Divide the batter between 24 lined muffin cups and bake 18 to 22 minutes. Frost once cool.
  • Sheet cake: Bake in a greased 9×13-inch pan for 40 to 45 minutes and frost right in the pan – perfect for potlucks.
  • Add coconut: Fold in 1/2 cup sweetened shredded coconut with the carrots for extra chew and sweetness.
  • Nut-free: Simply leave out the nuts and raisins; the cake stays moist and full of flavor.
  • Spiced up: Add 1/4 teaspoon ground cloves or allspice for a warmer, more old-fashioned spice profile.

Storage, Make-Ahead, and Freezing

  • Refrigerator: Because of the cream cheese frosting, store the frosted cake covered in the refrigerator for up to 5 days. Let slices sit at room temperature for 20 to 30 minutes before serving so the crumb softens.
  • Make ahead: The unfrosted layers keep well wrapped at room temperature for 1 day, in the fridge for 3 days, or frozen for up to 3 months. The frosting can be made 3 days ahead and re-whipped before use.
  • Freezing slices: Wrap individual frosted slices tightly and freeze for up to 3 months. Thaw overnight in the refrigerator.

Frequently Asked Questions

Why is my carrot cake dry?

Usually it was overbaked, or the carrots were the dry pre-shredded kind. Bake just until a toothpick shows moist crumbs, and grate fresh carrots so their moisture goes into the crumb.

Can I make carrot cake without pineapple?

Yes. The pineapple adds moisture, not much flavor. Leave it out and add 2 extra tablespoons of oil, or replace it with the same amount of unsweetened applesauce.

Do I have to peel the carrots?

Peeling is recommended. The skins can taste slightly bitter and leave dark flecks. A quick peel takes a minute and gives a cleaner flavor and color.

Can I make carrot cake ahead of time?

Yes, and it actually tastes better the next day as the spices settle in. Bake the layers a day ahead, wrap well, and frost the day you serve it – or frost it fully and refrigerate overnight.

Why did my carrot cake sink in the middle?

Common causes are opening the oven door early, old baking soda, or too much liquid from undrained pineapple. Check your baking soda is fresh and always drain the pineapple well.

Should carrot cake be refrigerated?

Once frosted with cream cheese frosting, yes. Keep it covered in the refrigerator and bring slices to room temperature before serving for the best texture.

Final Thoughts

A great carrot cake is all about moisture and balance: sweet carrots, warm spice, and tangy frosting in every bite. Once you bake this one, it becomes the birthday and Easter cake everyone asks for. If you love classic layer cakes and frosted desserts, try our cheesecake recipe next, or bake our apple pie recipe when you want a cozy fruit dessert instead. For more on the science of moist cakes, the bakers at King Arthur Baking share excellent guides to mixing and measuring.

Emily Carter
Meet the author

Emily Carter

Author Bio:
Emily Carter is a food and recipe writer focused on approachable, everyday home cooking. She researches trusted recipe sources, tests practical cooking methods, and explains ingredients and techniques in clear, simple language. Her work helps readers understand why a recipe works, how to avoid common mistakes, and how to cook confidently at home.