Preheat oven to 425°F.
Peel and finely shred carrots using a box grater or food processor.
Line a muffin tin with parchment liners.
In a bowl, combine flour, baking powder, baking soda, salt, and cinnamon.
Using an electric hand mixer or a stand mixer, add the butter and sugar to a large bowl and cream together for 2–3 minutes. Add the vanilla and mix.
Beat in one egg at a time until all are added.
Add half of the dry mixture to the butter and sugar mixture and mix well. Then add the other half and mix until combined.
Add the shredded carrots to the batter and mix until well blended.
Fold in the optional pecans.
Fill the cupcake liners ¾ full with the batter
Bake for 5 minutes on 425 degrees, then turn the oven temperature to 350 degrees and bake: Standard muffins: 12–15 more minutes. Larger bakery-style muffins: 15–18 more minutes. Tips to check for doneness: Tops are golden and domed. Centers spring back when lightly pressed. Toothpick comes out clean or with a few moist crumbs. Edges just start to pull slightly from the liner
Let cool 5–10 minutes in the pan. Remove muffins from the tin and let them cool on a cooling rack. These muffins are delicious with or without icing! Cool muffins completely before icing.