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.
Combine Dry Ingredients:
In a medium bowl, whisk together the flour, sugar, baking powder, baking soda, salt, cinnamon, and nutmeg.
Mix Wet Ingredients:
In a separate large bowl, whisk the eggs, vegetable oil, and vanilla extract until smooth and well combined.
Add Carrots and Optional Add-ins:
Stir in the grated carrots, and if you’re using them, fold in the chopped walnuts and raisins.
Combine Wet and Dry Ingredients:
Gradually add the dry ingredients to the wet ingredients, stirring until just combined. Be careful not to overmix.
Bake the Cake:
Divide the batter evenly between the two prepared cake pans. Smooth the tops with a spatula.
Bake for 30-35 minutes, or until a toothpick inserted into the center comes out clean. Let the cakes cool in the pans for 10 minutes, then turn them out onto wire racks to cool completely.