Preheat oven to 350 F and prepare the baking dish by lightly buttering and flouring . This recipe can make either one 9 x 13 cake, a two layered 9 inch round, or 24 cupcakes.
In a large mixing bowl, whisk together flour, baking soda, salt, cinnamon, nutmeg, and allspice until evenly combined.
Add the carrots, then toss to coat.
In a separate bowl, whisk together oil, both sugars, and the vanilla extract. Add the eggs, one at a time, until everything is blended.
Pour the egg mixture into the carrot mixture, then stir until just combined. Transfer to the prepared baking dish then bake until the tops are springy and the cakes pass the toothpick test, about 35-45 minutes. (If making cupcakes, the baking time will be about 20 minutes.)
Let cakes cook in pan for 15 minutes before turning out onto a wire rack to cool completely. Let cool completely before attempting to put on the frosting, otherwise the frosting will melt.
To prepare the frosting, combine the cream cheese and butter in a large bowl and blend with an electric mixer until just combined. With the speed on low, slowly add the powdered sugar, about 1/2 cup at a time, beating until smooth before the next addition. Chill the frosting 5 - 10 minutes in the fridge before using.