Gather all ingredients.
Combine grated carrots and brown sugar in a medium bowl. Let sit for 1 hour, then stir in raisins.
Preheat the oven to 350 degrees F (175 degrees C). Grease and flour two 10-inch round cake pans.
Beat eggs in a large bowl until lighter in color.
Gradually beat in white sugar, oil, and vanilla. Stir in pineapple.
Combine flour, cinnamon, baking soda, and salt in a separate bowl, then stir into egg mixture until absorbed.
Stir in carrot mixture and walnuts. Pour evenly into the prepared cake pans.
Bake in the preheated oven until a toothpick inserted into the center of the cake comes out clean, 45 to 50 minutes.
Cool for 10 minutes before removing cake from the pans; let cool completely.
