For the Carrot Cake:
2 cups (280 grams) all-purpose flour
2 teaspoons baking soda
1 teaspoon kosher salt
1 1/2 teaspoons ground cinnamon
1 1/4 cups (295 ml) canola or other vegetable oil
1 cup (200 grams) granulated sugar
1 cup (200 grams) lightly packed brown sugar
1 teaspoon vanilla extract
4 large eggs
3 cups (300 grams) grated peeled carrots (5 to 6 medium carrots)
1 cup (100 grams) coarsely chopped pecans
1/2 cup (65 grams) raisins, optional
For the Cream Cheese Frosting:
8 ounces (225 grams) cream cheese, at room temperature
1 1/4 cups (140 grams) powdered sugar
1/3 cup (80 ml) heavy cream
1/2 cup (50 grams) coarsely chopped pecans, for topping cake
Heat the oven to 350º F. Grease two 9-inch by 2-inch cake pans and line the bottom with parchment paper then grease the top of the paper. Or, grease and flour the bottom and sides of both pans.
Prepare Cake Batter: In a medium bowl, whisk flour, baking soda, salt and the cinnamon until well blended. In a separate bowl, whisk the oil, sugars and vanilla. Whisk in eggs, one at a time.
Switch to a large rubber spatula. Scrape the sides and bottom of the bowl then add the dry ingredients in 3 parts, stirring gently until they disappear and the batter is smooth. Stir in the carrots, nuts and raisins, if using them.
Bake Cake Layers: Divide the batter between the prepared cake pans. Bake until the tops of the cake layers are springy when touched and when a toothpick inserted into the center of the cake comes out clean; 35 to 45 minutes.
Cool cakes in pans for 15 minutes then turn out onto cooling racks, peel off parchment paper and cool completely.
Make Cream Cheese Frosting: In a large bowl, beat cream cheese with a handheld mixer on medium speed until creamy, about 1 minute. Beat in the powdered sugar, a 1/4 cup at a time until fluffy. Pour in cream and beat on medium speed for 1 minute. Chill covered until ready to frost cake.
Frost Cake: When the cake layers are completely cool, frost the top of one cake layer, place the other cake layer on top. Decoratively swirl the top of the cake with remaining frosting, leaving the sides unfrosted. Scatter nuts on top.
Preparing the Cake Pans: Even though it is a bit time consuming, don't skimp on prepping the pans. It's never fun to find your cake layer is stuck to the bottom of your pan. (If this does happen to you, leave the cake pan upside down and allow gravity to do its thing).
How to Make Carrot Cake Cupcakes: For cupcakes, we'd recommend baking for 14 to 18 minutes (or until a tester inserted into the center of one comes out clean). Then let them cool for a few minutes in the cupcake pan before transferring them to a cooling rack.
We use kosher salt. If you don’t have it on hand, keep this in mind: 1 teaspoon fine sea or table salt = about 1 1/4 teaspoons kosher salt.