Go Back

Homemade Carrot Cake Recipe | Moist From-Scratch Cake with Cozy Flavor

A moist, from-scratch carrot cake with warm spices and tangy cream cheese frosting that’s easy to assemble and stays tender for days. Perfect for celebrations or make-ahead baking.
Prep Time 30 minutes
Cook Time 32 minutes
Total Time 1 hour 30 minutes
Servings 12 slices

Ingredients
  

Ingredients

  • All-purpose flour
  • Granulated sugar
  • Light brown sugar
  • Baking powder
  • Baking soda
  • Ground cinnamon
  • Ground nutmeg
  • Ground ginger
  • Kosher salt
  • Large eggs
  • Neutral oil (canola or sunflower)
  • Buttermilk (or milk plus a splash of vinegar)
  • Vanilla extract
  • Finely shredded carrots
  • Optional add-ins: chopped walnuts or pecans
  • Optional add-ins: unsweetened shredded coconut
  • Optional add-ins: raisins
  • Optional add-ins: crushed pineapple (well-drained)
  • Cream cheese
  • Unsalted butter
  • Powdered sugar
  • Vanilla extract (for frosting)
  • Pinch of salt
  • Optional: lemon zest
  • Optional garnish: chopped walnuts or coconut

Instructions
 

Instructions

  • Heat the oven to 350°F (175°C), grease and line two 8- or 9-inch round cake pans with parchment, and lightly flour the sides.
  • Finely shred the carrots using the small holes of a box grater; gently pack without squeezing out moisture.
  • In a large bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, ginger, and salt until evenly combined.
  • In a second bowl, whisk the eggs, granulated sugar, brown sugar, oil, buttermilk, and vanilla until smooth and slightly thick.
  • Pour the wet mixture into the dry ingredients and stir with a spatula until mostly combined, leaving a few streaks of flour.
  • Fold in the shredded carrots and any optional add-ins until no dry spots remain, avoiding overmixing.
  • Divide the batter evenly between the prepared pans, tap to release air bubbles, and bake for 25 to 32 minutes, swapping pans halfway.
  • Check doneness when centers spring back and a toothpick comes out with a few moist crumbs.
  • Cool the cakes in the pans for 10 minutes, then turn out onto a rack, remove parchment, and cool completely.
  • Beat cream cheese and butter on medium speed until smooth and fluffy, about 2 minutes.
  • Gradually add powdered sugar, then beat in vanilla and a pinch of salt until creamy and spreadable; adjust with a teaspoon of milk or more sugar as needed.
  • Place the first cake layer on a stand, spread a generous layer of frosting, set the second layer on top, and frost the top and sides.
  • Garnish with chopped walnuts or coconut if desired and chill 20 to 30 minutes for cleaner slices.

Notes

For buttermilk, stir 1 teaspoon vinegar or lemon juice into 1/2 cup milk and rest 5 minutes. Finely shred carrots for even texture. Drain pineapple and other wet add-ins very well. Avoid overmixing and overbaking; pull cakes when a toothpick shows moist crumbs. For cupcakes, bake at 350°F for 18–22 minutes. Store frosted cake covered in the fridge up to 5 days; bring to cool room temperature before serving. Unfrosted layers can be wrapped and refrigerated up to 2 days or frozen up to 2 months.