Preheat your oven to 350°F (175°C). Grease and flour two 9-inch round cake pans.
Whisk together the flour, sugar, baking powder, baking soda, salt, cinnamon, and nutmeg in a large bowl.
In a separate bowl, beat the oil, eggs, and vanilla extract together.
Add the wet ingredients to the dry ingredients and mix until just combined.
Fold in the grated carrots, crushed pineapple, shredded coconut, and chopped nuts.
Divide the batter evenly between the prepared cake pans.
Bake in the preheated oven for 25-30 minutes or until a toothpick inserted into the center comes out clean.
Allow the cakes to cool in the pans for 10 minutes, then transfer them to a wire rack to cool completely.
For the cream cheese frosting, beat together the cream cheese, butter, powdered sugar, and vanilla extract until smooth and creamy.
Once the cakes are completely cooled, spread a layer of cream cheese frosting on top of one cake layer, then place the second layer on top and frost the entire cake.
Optional: Garnish with additional chopped nuts or shredded coconut.
Slice and enjoy your homemade carrot cake!