Preheat oven to 350F (175C) and line a 12-count muffin pans with paper liners.
In the bowl of a stand mixer (or in a large bowl using an electric mixer), whisk together flour, sugars, baking powder, baking soda, salt, cinnamon and nutmeg.
1 ¼ cups all-purpose flour, ½ cup granulated sugar, ½ cup light brown sugar packed, ¾ teaspoon baking soda, ½ teaspoon baking powder, ½ teaspoon salt, 1 teaspoon cinnamon, ¼ teaspoon nutmeg
Stir in canola oil. Add eggs, one at a time, pausing to scrape down sides of the bowl after each addition. Beat until well-combined.
¾ cups canola oil, 2 large eggs
Stir in vanilla extract and milk.
1 ½ teaspoons vanilla extract, 2 Tablespoons milk
Add carrots and nuts (if using). and stir until combined.
1 ½ cups grated carrots, ½ cup chopped walnuts or pecans, optional
Evenly divide batter into cupcake liners, filling each ⅔-¾ of the way full. Transfer to oven and bake on 350F (175C) for 20 minutes or until a toothpick inserted in the center comes out clean or with moist crumbs.
Allow to cool completely before decorating with cream cheese frosting*.
1 batch Cream Cheese Frosting
Notes
*Cream cheese frosting recipe will decorate 12 cupcakes if you use as much frosting as seen in the photos. If you plan to just spread the frosting on the cupcakes, you can probably get away with cutting the frosting recipe in half.