Preheat your oven to 350°F (175°C). Grease and flour three 8-inch round cake pans.
Mix Dry Ingredients
In a medium bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
Combine Wet Ingredients
In a large bowl, mix vegetable oil, brown sugar, and granulated sugar until smooth. Add eggs one at a time, then stir in vanilla extract.
Add Carrots and Pineapple
Fold in the grated carrots and crushed pineapple. If using walnuts, add them at this stage.
Mix Everything Together
Gradually add the dry ingredients to the wet ingredients, stirring until just combined. Be careful not to overmix.
Bake
Divide the batter evenly between the three cake pans. Bake for 25-30 minutes, or until a toothpick inserted in the center comes out clean. Let cakes cool in the pans for 10 minutes, then transfer to a wire rack to cool completely.
Make the Frosting
In a mixing bowl, beat the cream cheese and butter until smooth. Add powdered sugar and vanilla extract, beating until fluffy.
Frost and Assemble
Once the cakes are completely cool, spread a layer of frosting on top of one cake layer. Place the second layer on top and frost the top. Repeat with the third layer and frost the top and sides evenly.
Serve and Enjoy!
Slice and serve your homemade carrot cake. For extra flair, garnish with chopped walnuts or a sprinkle of cinnamon.