Preheat Oven and Prepare Pan:
Preheat your oven to 350°F (175°C).
Grease and flour two 9-inch round cake pans, or line them with parchment paper for easy removal.
Mix Dry Ingredients:
In a large mixing bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, and nutmeg until well combined.
Prepare Wet Ingredients:
In another bowl, beat together the vegetable oil, granulated sugar, brown sugar, eggs, and vanilla extract until smooth and creamy.
Combine Wet and Dry Ingredients:
Gradually add the wet ingredients to the dry ingredients, stirring until just combined.
Fold in the grated carrots, crushed pineapple, and chopped nuts (if using) until evenly distributed.
Bake the Cake:
Divide the batter evenly between the prepared cake pans.
Smooth the tops with a spatula.
Bake in the preheated oven for 25-30 minutes, or until a toothpick inserted into the center comes out clean.
Remove from the oven and allow the cakes to cool in the pans for 10 minutes.
Then, transfer them to a wire rack to cool completely.
Prepare the Frosting:
In a mixing bowl, beat together the softened cream cheese and butter until smooth and creamy.
Gradually add the powdered sugar, one cup at a time, beating well after each addition.
Stir in the vanilla extract until fully incorporated.
Assemble the Cake:
Once the cakes are completely cool, place one layer on a serving plate.
Spread a generous layer of cream cheese frosting over the top.
Place the second layer on top and frost the top and sides of the cake with the remaining frosting.
Optional Garnish:
Optionally, garnish the top of the cake with additional chopped nuts or grated carrots for decoration.
Chill and Serve:
For best results, chill the cake in the refrigerator for at least 30 minutes before slicing and serving.
Enjoy slices of delicious homemade carrot cake with a glass of milk or a cup of coffee!
Storage:
Store any leftover cake in an airtight container in the refrigerator for up to 5 days.