Preheat your oven to 350°F (180°C) and grease a 9×13 inch baking dish.
In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, and salt.
In a separate large bowl, mix together the grated carrots, vegetable oil, eggs, sugar, and vanilla extract until well combined.
Add the dry ingredients to the wet ingredients and mix until just combined. Fold in the chopped nuts (if using).
Pour the batter into the prepared baking dish and bake for 35-40 minutes, or until a toothpick inserted in the center comes out clean.
While the cake is baking, make the cream cheese frosting. In a large bowl, beat together the cream cheese and butter until smooth. Gradually add in the powdered sugar and vanilla extract, beating until the frosting is smooth and creamy.
Once the cake has cooled completely, spread the frosting evenly over the top of the cake.
Slice and serve, and enjoy your delicious homemade carrot cake!
![](https://akimee.com/wp-content/uploads/2024/01/14-13.jpg)