First, get your oven ready by heating it to 350°F (175°C). Grease your baking pan really well and dust it lightly with flour, or use parchment paper to line it so the cake doesn’t stick.
Next, in a big bowl, sift together the flour, baking powder, baking soda, salt, cinnamon, and nutmeg. Set this dry mix aside for now.
In another large bowl, mix the granulated sugar, brown sugar, and vegetable oil. Whisk them together until they’re nicely combined.
Now, add the eggs one at a time to the sugar and oil mixture, beating well after each one. Once all the eggs are mixed in, stir in the vanilla extract.
Slowly add the dry ingredients to the wet ingredients, stirring gently until everything is just combined. Don’t overdo it mixing too much can make the cake tough.
Then, fold in the grated carrots and chopped pecans, making sure they’re spread evenly throughout the batter.
Pour the batter into your prepared pan and pop it into the oven. Bake for about 40 to 45 minutes. To check if it’s done, stick a toothpick or skewer in the center if it comes out clean, it’s ready. Let the cake cool completely on a wire rack before you move on.
While the cake cools, it’s time to make the frosting. Beat the softened butter and cream cheese together until smooth and creamy. Gradually add the powdered sugar, a pinch of salt, and the vanilla extract. Keep beating until the frosting is fluffy and silky.
Finally, when your cake is fully cooled, spread the frosting evenly on top. Slice it up, serve, and enjoy your delicious homemade carrot cake!