Ingredients

Cooking spray

3 c. all-purpose flour

1 1/2 tsp. kosher salt

2 tsp. baking soda

2 tsp. cinnamon

2 c. granulated sugar

1 1/2 c. vegetable oil

4 large eggs

1 tsp. pure vanilla extract

3 c. grated carrots

1 c. pecans, roughly chopped, plus more for garnish

1 c. rasisins

1 (8-oz.) block cream cheese, softened

1/2 c. (1 stick) butter, softened

1 tsp. pure vanilla extract

4 c. powdered sugar

Preparation

Step 1Preheat oven to 350° and grease 2 - 8" round cake pans with cooking spray. In a large bowl, whisk together flour, salt, baking soda, and cinnamon. Step 2 In another large bowl with a hand mixer (or in the bowl of a stand mixer), beat together sugar and oil until well combined. Add eggs one at a time beating well after each addition, then add vanilla. Mix in dry ingredients until just combined. Stir in carrots, pecans, and raisins. Step 3Divide batter evenly between prepared pans. Bake until a toothpick inserted into the middle comes out clean, 45 minutes. Let cool 15 minutes then invert cakes onto a cooling rack and let cool completely.Step 4Make frosting: In a large bowl with a hand mixer, beat together cream cheese and butter until smooth. Add vanilla and powdered sugar and beat again until smooth and a spreadable consistency. Step 5Frost cake as desired and garnish with pecans.

Read on for tips on how to make this delectable classic cake. And if you’re looking for more dessert inspiration, check out some more of our favorite layer cakes recipes. How do I keep my carrot cake tender and moist? Bakers are often concerned about getting dry, tough cakes, but here you don’t have to worry, thanks to the use of vegetable oil in the cake batter. Cakes made with vegetable oil are noticeably moister than the average cake baked with butter. Why? Consider the ingredient on its own: vegetable oil is liquid at room temperature, while butter is solid. Vegetable oil also leads to a more tender cake, since it is 100% fat, unlike butter, which contains about 15-20% water, which in turn aids in the formation of gluten and contributes to toughness. Long story short: this cake uses vegetable oil, so you’re set up for success.  Can I leave the nuts and raisins out? Absolutely. This is your cake, so feel free to customize it to your liking. Not a fan of pecans? Sub in walnuts or pistachios, or leave the nuts out entirely. Want to skip the raisins? Feel free to, or switch them out for dried cranberries, cherries, or any other dried fruit you want. Just keep in mind that large chunks of dried fruit tend to sink to the bottom of cakes, so if you want to try larger fruits like dried apricots or figs, you should chop them up before adding to the cake batter.   Can I add pineapple? Many classic carrot cake recipes include pineapple. Our recipe does not—and we think it’s delicious as it is.But it will work if you’d like to add it in. For best results, use ½ cup canned pineapple and drain it well before you add it to the batter with the carrots, raisins, and pecans. I don’t want a layer cake. Can I bake this in a 9”x 13” pan? You sure can. Just keep in mind that, since the area of the 9”x 13” pan (117 inches) is greater than the sum of the area of the 8-inch rounds (50 + 50 = 100 inches), the cake will be slightly thinner than it would be in the 8” pans. And so it will bake more quickly. We recommend checking after 35 minutes to see if it’s done: If a toothpick comes out clean, it’s good to go. What’s the best frosting for a carrot cake? Cream cheese frosting all the way. Our recipe is just a simple mix of cream cheese, softened butter, and powdered sugar, with a little vanilla thrown in for flavoring. Super easy and super delicious. Can I make this cake ahead of time? Absolutely. While we’d recommend waiting to frost your cake until the day you want to eat it, you can bake the cake layers as far as 2-3 months in advance. After baking, let the cakes cool completely before wrapping each layer separately in plastic wrap. If you’re going to use them within 5 days, you can just refrigerate them. If you’d like to save them longer, wrap them in a double layer of plastic wrap and freeze for up to 3 months. The night before you want to frost, thaw them in the refrigerator and then stack and frost them while they’re still cold. We don’t typically recommend making the frosting too far in advance. It’s so simple to whip up that it’s easier to make it and then use it right away than it is to make it, store it, and then rewhip it before using. If you do need to make it in advance, we recommend storing in the refrigerator and then letting it come to room temperature before frosting. You’ll probably want to rewhip it too, to help it warm up and make sure it’s light and fluffy before it goes on the cake. If you love this cake as much as we do, don’t forget to leave a comment and rate it below! Editor’s Note: The introduction to this recipe was updated on February 26, 2022, to include more information about the dish.