Preheat the oven to 350°F (175°C). Grease an 9x9 inch baking pan with oil or butter, then line it with parchment paper.
Mix the all-purpose flour, baking soda, and spices in a large bowl.
Add the eggs, sugars, oil, and vanilla in a separate bowl and give them a whisk.
Slowly pour the wet ingredients into the dry ingredients and mix until combined.
Fold in the grated carrots and gently mix just until combined.
Pour the carrot cake batter into the prepared pan and bake for 35-40 minutes.
Let the cake cool in the pan for 10-15 minutes, remove it from the pan, and let it cool completely on a wire rack.
While the cake is cooling, prepare my favorite frosting recipes.
The cake has to be completely cooled before adding this frosting, or it will melt off. If you need, place it in the freezer for 10 minutes to cool. I do this sometimes, and it always works out. Once the cake has cooled, spread the frosting on top and decorate with chopped walnuts, if desired.
Slice and serve the cake at room temperature for best flavor and texture.
Notes
TipsDon't over-mix the batter; it can give your cake a tough texture. Instead, gently fold the ingredients together until combined. Check the expiration dates for freshness; this is especially important for baking soda, baking powder, and eggs.Set the timer for 10 minutes less to check on the cake. Every oven is different, and baking times will vary. Choose whatever you like to bake this cake in, but remember, baking times will vary. I chose a 9x9 square baking pan. You can do a round pan, bundt pan, or sheet pan. This recipe makes enough for a single-layer cake.How to StoreThis cake will stay fresh in an airtight container for up to 2 days. You can make this cake ahead of time and freeze it. If you do this, freeze without the frosting. Let the cake defrost in the refrigerator overnight. When you're ready to serve, top it with freshly made frosting.