This classic carrot cake recipe is my absolute favorite. The combination of warm spices, toasted pecans, and a hint of pineapple pack in so much added flavor. The moisture from the freshly grated carrots, vegetable oil, and brown sugar keeps the cake moist and delicious for days after baking. Slather on my perfectly sweet and tangy cream cheese frosting (click for recipe), and this cake will totally steal the show!
BEST SIZE TO GRATE CARROTS FOR CARROT CAKE
For the best texture, I use the small shredding side of my box grater (click for the one I use) to grate carrots for carrot cake. The smaller shred ensures they will bake properly and be evenly distributed throughout the cake.
BEST ADD-INS FOR CARROT CAKE
One of my favorite things about carrot cake is how customizable it is. In this recipe, I use all of my favorite add-ins: raisins, toasted pecans, and diced pineapple. However, you can add in just about anything to make the perfect carrot cake for your family. You can substitute the pecans for walnuts, or even add in some shredded coconut or candied ginger for added spice. Be as creative as you want!
HOW TO STORE CARROT CAKE
Once your cake is frosted, I recommend keeping it in the fridge. You can store it in an airtight cake dome or carrier, or just place it on a large plate and cover the entire thing with plastic wrap (just be sure the frosting has had at least 30 minutes to set before covering with plastic wrap).

Preheat the oven to 350℉.
Place the chopped pecans (or walnuts) in a single layer on a baking sheet in the center of the oven for 10 minutes, until toasted. Be careful not to burn them! Allow the nuts to cool completely.
Meanwhile, grease two 8” cake pans with softened butter. Line the bottom of each pan with a piece of parchment paper cut into a circle. Grease the top of each piece of parchment paper with additional softened butter.
Sprinkle 1 Tablespoon of flour in each pan and rotate the pan so that all of the inner sides are evenly coated with flour. Tap out any excess flour.

In a large bowl, whisk together the flour, kosher salt, cinnamon, ginger, nutmeg, cloves, baking powder, and baking soda. Set aside.

In the bowl of a stand mixer fitted with the paddle attachment, mix the granulated sugar, brown sugar, and eggs — at a medium-high speed — until the mixture thickens and becomes light brown in color (about 5 minutes; it’s longer than you think!).

Turn the mixer back down to a low speed and slowly drizzle in the oil and vanilla. Mix until well combined.
With the mixer still on a low speed, slowly add in the dry ingredients until just combined.
In a third large bowl, add the grated carrots, raisins, and diced pineapple with an additional 1/4 cup of flour. This will ensure they are evenly suspended throughout the cake and won’t all sink to the bottom.

With a spatula or spoon, fold in both the carrot/raisin/pineapple mixture and the nuts into the batter.

Divide the batter evenly between the two cake pans and bake in the center of the oven for about 45 minutes, or until a toothpick inserted into the cakes comes out clean. Keep in mind baking time will fluctuate depending on the size of your cake pans.
When the cakes are done, allow them to cool in the pan for 20 minutes before removing them from the pans to cool completely.
In the meantime, prepare the cream cheese frosting. I use my perfectly sweet and tangy cream cheese frosting (click for recipe)…. It’s just heavenly!
When the cakes have cooled completely, frost and stack the cakes as desired. You can also sprinkle any extra toasted nuts on the sides or top of the cake. Allow the cake to set in the fridge for at least 30 minutes before serving.
Carrot Cake with Pineapple and Pecans

Ingredients
For Preparing the Cake Pans
- 1 Tbsp unsalted butter, softened
- 2–3 Tbsp all-purpose flour
Dry Ingredients
- 2 cups all-purpose flour (spooned and leveled)
- 1 ½ tsp kosher salt (I use Diamond Crystal)
- 2 tsp ground cinnamon
- 1 tsp ground ginger
- ¼ tsp ground nutmeg
- ¼ tsp ground cloves
- 2 tsp baking powder
- 1 tsp baking soda
Wet Ingredients
- ¾ cup granulated sugar
- 1 cup dark brown sugar, lightly packed
- 4 large eggs, at room temperature
- 1 ¼ cup vegetable oil
- 1 tsp pure vanilla extract
Add-Ins
- 3 cups carrots, peeled and grated (I use the small shredding side of my favorite box grater)
- ¾ cup raisins (I use Thompson seedless raisins)
- ¾ cup pecans (or walnuts), chopped (plus extra for decoration, as desired)
- ½ cup pineapple, ¼" diced
- ¼ cup all-purpose flour (spooned and leveled)
For the Cream Cheese Frosting (recipe also here)
- 3 cups powdered (icing) sugar (spooned, leveled, and sifted)
- ½ cup (1 stick) unsalted butter, at room temperature
- 1 cup (8oz) full-fat cream cheese (1 standard block)
- 1 tsp pure vanilla extract
- ¼ tsp kosher salt
Instructions
Toasting the Nuts
- Preheat oven to 350℉.
- Place chopped pecans (or walnuts) in a single layer on a baking sheet and bake in the center of the oven until toasted, but not burnt (about 10 minutes). Allow to cool completely.¾ cup pecans (or walnuts), chopped
Preparing the Cake Pans
- With a pastry brush (or your fingers), brush two 8" cake pans with softened butter.1 Tbsp unsalted butter, softened
- Cut and lay two circles of parchment paper wide enough to fit into the bottom of both cake pans.
- Brush the top of the parchment paper with softened butter.
- Sprinkle flour into pans to evenly coat the bottom and inner sides. Tap out and discard excess flour.2–3 Tbsp all-purpose flour
Making the Cake Layers
- In a large bowl, whisk together flour, salt, cinnamon, ginger, nutmeg, cloves, baking powder, and baking soda. Set aside.1 ½ tsp kosher salt2 tsp ground cinnamon1 tsp ground ginger¼ tsp ground nutmeg¼ tsp ground cloves2 tsp baking powder1 tsp baking soda2 cups all-purpose flour
- In the bowl of a stand mixer fitted with the paddle attachment, on medium-high speed, mix the granulated sugar, brown sugar, and eggs until the mixture thickens and becomes light brown in color (about 5 minutes; longer than you think!).¾ cup granulated sugar1 cup dark brown sugar, lightly packed4 large eggs, at room temperature
- Reduce mixing speed to low and slowly drizzle in vegetable oil and vanilla. Mix until well combined.1 ¼ cup vegetable oil1 tsp pure vanilla extract
- With the mixer still on low, slowly add in the dry ingredients until just combined.
- In a third large bowl, add shredded carrots, raisins, and diced pineapple, along with additional flour (which ensures that add-ins won't stick together or sink to the bottom).3 cups carrots, peeled and grated¾ cup raisins½ cup pineapple, ¼" diced¼ cup all-purpose flour
- With a spatula (or spoon), fold the carrot/raisin/pineapple mixture and toasted nuts into the batter.
- Divide batter evenly between prepared cake pans and set into centre of preheated oven.
- Bake until cakes have risen and a wooden skewer can be poked into them and come out clean (about 45 minutes).Note: Baking time will fluctuate depending on size and shape of cake pans (see Note 1, below).
- Allow to cool for 20 minutes in the pans before transferring them to a wire rack to cool completely.
Preparing the Cream Cheese Frosting
- Measure out powdered sugar (by spooning it into a measuring cup and leveling it off with the back of a knife) and sift it into a large bowl (to remove any lumps). Set aside.3 cups powdered (icing) sugar
- In the bowl of a stand mixer fitted with the wire whip attachment, whip butter on medium speed until smooth (about 1 to 2 minutes).½ cup (1 stick) unsalted butter, at room temperature
- Add in cream cheese and continue to mix until smooth and well combined (about 1 to 2 minutes more), scraping down the sides of the bowl with a rubber spatula, as necessary.1 cup (8oz) full-fat cream cheese
- Add in vanilla and salt. Mix until well combined (about 30 seconds).1 tsp pure vanilla extract¼ tsp kosher salt
- Reduce mixer to low speed and slowly add in sifted powdered sugar.
- Increase the mixer to medium speed and mix until powdered sugar is fully incorporated and frosting is smooth (about 30 seconds).Note: Consider doubling the above recipe, as desired, to have enough frosting for the top and sides of the cake (see Note 2, below).
Frosting the Cake
- Place first cake layer on a plate or serving platter. With a spoon, knife, or spatula, spread frosting on top.
- Place second cake layer on top. Spread remaining frosting over top and sides of cake, as desired. Decorate cake with any extra toasted nuts, as desired.
- Allow the cake to set in the fridge for at least 30 minutes before serving.
Notes
- Size and Shape of Cake Pans: I use two 8″ round cake pans for this recipe. You can easily swap for two 9″ round cake pans (or any other shape). Just be sure to keep an eye on your cakes in the oven, as this will affect baking time.
- How Much Cream Cheese Frosting? When making a layered cake, I always make 1.5x – 2x more frosting to be absolutely sure that I will have enough. Remember, you can always put any extra frosting in an airtight container and refrigerate/freeze it!