Step 1: Prepare the Oven and Pans
Preheat your oven to 350°F (175°C). Grease and flour two 9-inch round cake pans. If you want to make it easier to remove the cakes, line the bottom of each pan with parchment paper.
Step 2: Mix Dry Ingredients
In a large mixing bowl, whisk together the flour, baking powder, baking soda, ground cinnamon, ground nutmeg, and salt. Set this mixture aside.
Step 3: Combine Wet Ingredients
In a separate bowl, whisk together the eggs, vegetable oil, granulated sugar, brown sugar, and vanilla extract until well combined.
Step 4: Combine Wet and Dry Ingredients
Gradually add the dry ingredients to the wet ingredients, stirring until just combined. Be careful not to overmix.
Step 5: Add Carrots, Nuts, and Raisins
Fold in the grated carrots, walnuts or pecans (if using), and raisins (if using). Make sure they are evenly distributed throughout the batter.
Step 6: Bake the Cake
Divide the batter evenly between the two prepared cake pans. Smooth the tops with a spatula and place them in the preheated oven. Bake for 25-30 minutes, or until a toothpick inserted into the center of the cakes comes out clean.
Step 7: Cool the Cakes
Allow the cakes to cool in their pans for about 10 minutes before transferring them to a wire rack to cool completely.
Step 8: Prepare the Cream Cheese Frosting
While the cakes are cooling, prepare the cream cheese frosting. In a mixing bowl, beat the softened cream cheese and butter until smooth and creamy. Gradually add the powdered sugar, one cup at a time, and beat until the frosting is smooth and fluffy. Stir in the vanilla extract and a pinch of salt.
Step 9: Frost the Cake
Once the cakes are completely cool, spread a layer of frosting on top of one cake. Place the second cake on top and frost the top and sides of the entire cake. If desired, you can decorate the top with extra chopped nuts, shredded coconut, or even a few whole carrots for a festive look.
Step 10: Serve and Enjoy
Let the cake sit for about 15-20 minutes to set the frosting, then slice and serve. Enjoy the moist, flavorful layers of this homemade carrot cake with cream cheese frosting!