Classic Carrot Cake Recipe with Cream Cheese Frosting

This classic carrot cake is a crowd-pleasing favorite: three layers of tender, spiced carrot cake finished with tangy cream cheese frosting for a dessert that’s as beautiful as it is delicious.

Close up of a slice of 3-layered carrot cake on a white plate.

While many people associate carrot cake with Easter, I enjoy it year-round. It’s often my birthday cake request — that’s how much I love it. Moist cake, warm spices, and a generous cream cheese frosting make this a dessert that works for holidays, brunches, or simply a casual weeknight treat.

This recipe yields a classic layered carrot cake with the right balance of spice and texture: plenty of grated carrot, chopped nuts, shredded coconut, and plump raisins. The cake is finished with a classic cream cheese frosting and can include a coconut-filled layer if you like extra flavor and texture.

Carrot cake covered in coconut and decorated with icing carrots with one slice removed.

The best layered carrot cake

Carrot cake comes in many forms — sheet cakes, cupcakes, bundts — but sometimes you want the simple indulgence of a three-layer cake slathered in cream cheese frosting. This version skips pineapple so it’s friendly to those who don’t care for it or who have sensitivities, and you can easily omit nuts or coconut for allergies. Raisins add a lovely chew and flavor here; if you like them, I recommend keeping them in.

Dry ingredients for carrot cake whisked together in a bowl.

How to make this classic carrot cake

Layered cakes require a bit more time because of assembly, but they’re straightforward to make. Read through the steps before you begin so everything goes smoothly.

Why use oil instead of butter?

Most carrot cakes use a neutral oil (like canola) rather than butter. Because oil stays liquid at room temperature, it helps the cake stay moist and yields the slightly denser texture many people associate with carrot cake. Butter-based cakes can dry out faster. If you prefer another option, a neutral-tasting oil such as avocado oil works well too.

Wet ingredients for carrot cake mixed in a white mixing bowl.

Making the cake

Preheat the oven to 325°F. Butter and flour three 9-inch round cake pans and set them aside. In a medium bowl whisk together the dry ingredients: all-purpose flour, baking powder, baking soda, ground cinnamon, and salt.

In another bowl combine the grated carrots, chopped nuts, shredded coconut (unsweetened preferred in the batter), and raisins. Using a mixer, beat the granulated sugar and oil until smooth, then add the eggs one at a time, beating after each addition. Reduce the mixer speed to low and add the flour mixture, mixing only until just combined. Fold in the carrot mixture by hand.

Divide the batter evenly among the three prepared pans and bake for 40–50 minutes, rotating the pans partway through for even baking. Cakes are done when a toothpick inserted into the center comes out clean. Let the cakes cool in the pans for about 10 minutes, then invert them onto wire racks to cool completely.

Carrots, nuts, coconut, and raisins mixed in a white mixing bowl.

Assembling the cake

Pair this cake with a classic cream cheese frosting. If you enjoy coconut, divide the frosting in half and stir ½ cup shredded coconut into one half to use as the filling (sweetened coconut works well for the filling). Place one cake layer on a cake plate or cardboard round. To keep the plate clean while frosting, tuck parchment strips under the cake edges and remove them after frosting.

Carrot cake batter in 3 cake pans, ready to go in the oven.

Spread half of the coconut-flecked frosting (or about 1/4 of the plain frosting) across the first layer. Top with the second layer, repeat the filling step, then add the final layer and frost the top and sides with the remaining frosting. For a finishing touch, press toasted chopped nuts or toasted shredded coconut onto the sides or top if desired.

Set of four photos showing a layered carrot cake being assembled and covered in cream cheese frosting.

Storage and freezing

You can store cake components or the finished cake in several ways.

Storing cake layers and frosting

Once cooled, wrap cake layers tightly in plastic wrap and store at room temperature overnight before frosting, or wrap in plastic and foil and freeze for up to 2 months. Cream cheese frosting freezes well for up to 3 months in an airtight container; thaw in the refrigerator for 24 hours, bring to room temperature, then whip briefly to restore texture before using.

Carrot cake batter in 3 cake pans, ready to go in the oven.

Storing the assembled cake

Keep the finished cake covered in the refrigerator for up to 3 days; bring it to room temperature before serving for the best texture and flavor. For longer storage, place the assembled cake uncovered in the freezer for 1–2 hours; once the frosting is firm, wrap the cake tightly and freeze for up to 2 months. Thaw, still wrapped, overnight in the refrigerator.

Assembled carrot cake, coated with toasted coconut and decorated with icing carrots on the top.

More springtime desserts

If you’d like other dessert ideas to serve alongside this carrot cake, consider moist banana cake, zucchini cake, hummingbird cupcakes, coconut cream bars, carrot cake cookies, or a strawberry coconut layer cake — all of which offer bright, seasonal flavors and pair well with cream cheese frosting.

Classic Carrot Cake

This three-layer classic carrot cake is topped with tangy cream cheese frosting for a perfect dessert.
Cake server holding up a slice of 3-layered carrot cake.

Ingredients

  • 2 cups all-purpose flour
  • 2 teaspoons baking powder
  • 2 teaspoons baking soda
  • 2 teaspoons ground cinnamon
  • ¾ teaspoon fine sea salt
  • 3 cups grated carrots (about 8–9 carrots)
  • 1 cup coarsely chopped walnuts or pecans
  • 1 cup shredded coconut (sweetened or unsweetened)
  • ½ cup moist, plump raisins or dried cranberries
  • 2 cups granulated sugar
  • 1 cup canola oil (or neutral oil)
  • 4 large eggs

For the Frosting

  • 1 batch cream cheese frosting
  • ½ cup shredded coconut (optional, for filling)

For finishing

  • Finely chopped toasted nuts and/or toasted shredded coconut (optional)

Instructions

For the Cake

  1. Preheat oven to 325°F. Butter and flour three 9×2-inch round cake pans and set aside.
  2. Whisk the flour, baking powder, baking soda, cinnamon, and salt in a medium bowl. In another bowl, stir together the carrots, nuts, coconut, and raisins.
  3. Using a stand mixer with the paddle attachment or a hand mixer, beat the sugar and oil on medium until smooth. Add eggs one at a time, beating after each. Reduce speed to low and add the flour mixture, mixing until just combined. Fold in the carrot mixture. Divide batter among prepared pans.
  4. Bake 40–50 minutes, rotating the pans partway through, until a toothpick inserted into the center comes out clean. Cool in the pans for 10 minutes, then remove to wire racks to cool completely.
  5. Wrap cooled layers airtight for overnight storage at room temperature or freeze for up to 2 months.

For the Frosting

  1. Divide the cream cheese frosting in half. Stir ½ cup shredded coconut into one half if using for the filling.

To Assemble the Cake

  1. Place one cake layer right-side up on a cake plate or cardboard round and tuck parchment strips under the edges to protect the plate while frosting.
  2. Spread half of the coconut-flecked frosting (or about ¼ of the plain frosting) across the first layer. Smooth to the edges.
  3. Place the second layer on top (upside down if desired for a flat surface). Spread the remaining filling or another portion of plain frosting.
  4. Add the final layer right-side up. Frost the top and sides with the remaining frosting. Decorate with toasted nuts or toasted coconut if desired.
  5. Chill the cake for about 30 minutes to set the frosting before serving.

Notes

Three cups of grated carrots equal roughly 8–9 medium carrots. Use a food processor shredding attachment or a box grater. I prefer unsweetened coconut in the batter and sweetened coconut in the filling. Store the assembled cake covered in the refrigerator for up to 3 days; bring to room temperature before serving. To freeze the assembled cake, freeze uncovered until firm, then wrap airtight and freeze up to 2 months. Thaw in the refrigerator overnight.

Makes one 3-layer 9-inch cake. Recipe adapted slightly from Dorie Greenspan.

Nutrition

Serving: 1 unfrosted slice — Calories: 465 kcal; Carbohydrates: 55 g; Protein: 5 g; Fat: 26 g; Fiber: 3 g. (Nutrition is an approximation.)

Slice of carrot cake decorated with coconut and an icing carrot next to a fork on a white plate.