Basic Carrot Cake Recipe from Scratch

Indulge in the comforting, sweet, and slightly spiced delight of a homemade carrot cake. This classic dessert is a beloved favorite for its tender crumb, moist texture, and creamy frosting. Our basic carrot cake recipe from scratch is easy to follow and yields a perfect treat for any occasion. Let's dive into the recipe and explore some tips and variations to make this cake your own.

Ingredients
Before you start, gather your ingredients:

- 2 cups (250g) all-purpose flour
- 2 teaspoons baking powder
- 2 teaspoons baking soda
- 1 teaspoon ground cinnamon
- 1 teaspoon ground nutmeg
- 1 teaspoon salt
- 1 1/2 cups (300g) granulated sugar
- 1 cup (240ml) vegetable oil
- 4 large eggs
- 1 teaspoon vanilla extract
- 3 cups (300g) grated carrots
- 1 cup (110g) chopped walnuts (optional)
Cream Cheese Frosting

For the frosting, you'll need:
- 8 oz (225g) cream cheese, softened
- 1/2 cup (113g) unsalted butter, softened
- 3 cups (360g) powdered sugar
- 1 teaspoon vanilla extract
Instructions

Now that you have all your ingredients ready, let's start baking!
Prepare the cake batter
Preheat your oven to 350°F (175°C) and grease two 9-inch (23cm) round cake pans.

In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
In a large bowl, combine the sugar, vegetable oil, eggs, and vanilla extract. Mix well until smooth.




















Gradually add the dry ingredients to the wet ingredients, mixing just until combined. Fold in the grated carrots and chopped walnuts (if using).
Bake the cake
Divide the batter evenly between the prepared cake pans.
Bake for 25-30 minutes, or until a toothpick inserted into the center of the cakes comes out clean. Allow the cakes to cool in the pans for 10 minutes, then transfer them to a wire rack to cool completely.
Prepare the cream cheese frosting
While the cakes are cooling, make the frosting. In a large bowl, beat the cream cheese and butter together until smooth and creamy.
Gradually add the powdered sugar, mixing well after each addition. Stir in the vanilla extract. If the frosting is too thick, add a tablespoon or two of milk to reach your desired consistency.
Assemble the cake
Once the cakes have cooled completely, place one layer on a serving plate or cake stand. Spread a layer of frosting on top, then place the second layer on top of the frosting.
Spread the remaining frosting over the top and sides of the cake. If desired, garnish with additional chopped walnuts or a sprinkle of cinnamon.
Tips and Variations
For a denser, more moist cake, try adding one of the following:
- 1 cup (120g) raisins or dried cranberries
- 1/2 cup (120g) sour cream or full-fat Greek yogurt
- 1/2 cup (120ml) orange juice
To make a sheet cake, pour the batter into a greased 9x13-inch (23x33cm) pan and bake for 30-35 minutes.
For a fun twist, add a teaspoon of ground ginger or a pinch of cardamom to the dry ingredients, or swap the cream cheese frosting for a classic buttercream frosting.
Store leftover carrot cake in an airtight container at room temperature for up to 5 days, or in the refrigerator for up to 1 week.