Heat oven to 350°F.
Grease a 9x13 pan, or two 8-inch round pans.
If using round pans, line them with parchment circles.
Whisk all dry ingredients in a large bowl.
Whisk all wet ingredients in a second bowl.
Pour the wet mixture into the dry mixture.
Stir with a spatula just until you can’t see dry flour.
Fold in the grated carrots.
Fold in any optional add-ins, if using.
Pour the batter into the prepared pan or pans.
Bake a 9x13 cake for 35 to 45 minutes.
Bake two 8-inch rounds for 28 to 35 minutes.
Remove from the oven when a toothpick inserted in the center comes out with moist crumbs.
Let the cake rest in the pan for 15 minutes.
Cool completely before frosting.
Beat the butter until smooth.
Add the cold cream cheese and mix only until combined.
Add powdered sugar in batches until smooth, starting with 4 cups.
Add the vanilla extract and salt and mix until combined.
Taste and add up to 1 more cup powdered sugar if needed for sweetness or thickness.
Chill the frosting for 15 to 20 minutes if it feels soft.
Frost the completely cooled cake.
Chill the frosted cake briefly for cleaner slices.