Ingredients:
For the cake:
– 2 cups all-purpose flour
– 2 teaspoons baking powder
– 1 teaspoon baking soda
– 1 teaspoon salt
– 1 cup unsalted butter, softened
– 1 3/4 cups granulated sugar
– 4 large eggs, at room temperature
– 2 cups grated carrots
– 1 cup chopped walnuts (optional)
– 1 teaspoon vanilla extract
– Confectioners’ sugar, for dusting
For the frosting:
– 8 ounces cream cheese, softened
– 1/2 cup unsalted butter, softened
– 1 teaspoon vanilla extract
– 2 cups confectioners’ sugar
Instructions:
For the cake:
1. Preheat the oven to 350°F (180°C). Grease two 9-inch (23cm) round cake pans and line the bottoms with parchment paper.
2. In a medium bowl, whisk together the flour, baking powder, baking soda, and salt. Set aside.
3. In a large bowl, use an electric mixer to beat the butter and sugar until light and fluffy, about 2 minutes.
4. Beat in the eggs one at a time, then beat in the vanilla extract.
5. With the mixer on low speed, gradually add the flour mixture and mix until just combined.
6. Stir in the grated carrots and chopped walnuts (if using).
7. Divide the batter evenly between the prepared pans and smooth the tops.
8. Bake for 35-40 minutes, or until a toothpick inserted into the center of each cake comes out clean.
9. Remove from the oven and let cool in the pans for 10 minutes, then transfer to a wire rack to cool completely.
For the frosting:
1. In a large bowl, use an electric mixer to beat the cream cheese and butter until smooth and creamy.
2. Beat in the vanilla extract.
3. Gradually add the confectioners’ sugar and mix until smooth and creamy.
Assembly:
1. Once the cakes are completely cool, place one layer on a serving plate or cake stand.
2. Spread a thick layer of cream cheese frosting on top of the first layer.
3. Place the second layer on top and frost the entire cake with the remaining frosting.
4. Dust with confectioners’ sugar, if desired.