Print
clock clock iconcutlery cutlery iconflag flag iconfolder folder iconinstagram instagram iconpinterest pinterest iconfacebook facebook iconprint print iconsquares squares iconheart heart iconheart solid heart solid icon
Carrot cake recipe sliced on a plate.

The Perfect Carrot Cake Recipe

  • Author: Joy the Baker
  • Prep Time: 30 minutes
  • Cook Time: 24 minutes
  • Total Time: 54 minutes - 1 hour
  • Yield: 1 9-inch cake 1x
  • Category: dessert, cake, birthday
  • Cuisine: dessert

Ingredients

Scale

For the Cake:

  • 3 cups (375 grams) all-purpose flour
  • 2 teaspoons baking powder
  • 1 teaspoon baking soda
  • 1 teaspoon kosher salt
  • 1 1/2 teaspoon ground cinnamon
  • 3/4 teaspoon ground ginger
  • 1/2 teaspoon fresh grated nutmeg
  • 4 large eggs
  • 1 cup (200 grams) granulated sugar
  • 1 cup (200 grams) lightly packed light brown sugar
  • 1 cup vegetable oil
  • 1 teaspoon vanilla extract
  • 3/4 cup drained crushed pineapple
  • 2 cups (260 grams) finely grated peeled carrots

Optional:

  • 1/4 cup raisins
  • 1/2 cup finely chopped walnuts
  • 1/2 cup sweetened shredded coconut

For the Frosting:

  • 2 blocks (16 ounces) cream cheese, very well softened
  • 1/2 cup unsalted butter, softened
  • Pinch of kosher salt
  • 4 cups (480 grams) powdered sugar, sifted if lumpy
  • 1 teaspoon vanilla extract

Instructions

  1. Place a rack in the upper third of the oven and preheat oven to 350 degrees F. Grease three 9-inch round cake pans with butter, vegetable shortening, or nonstick baking spray. Line the bottom of the pans with a parchment paper round for extra security the cake will come out of the pan after it’s baked. Lightly grease the paper too.
  2. In a large bowl whisk together flour, baking powder, baking soda, salt, and spices. Set aside.
  3. In a medium bowl, whisk the eggs to combine. Add the sugars and whisk to thick. Carefully whisk in the oil and vanilla followed by the pineapple and carrots.
  4. Add the wet ingredients all at once to the dry ingredients and use a rubber spatula to fold together until well incorporated.  Add any of the optional ingredients you’d like like raisins, walnuts, and coconut.
  5. Divide between the pans and bake until cooked through, 22-24 minutes.  You’ll know the cake is done when a toothpick inserted in the center comes out with moist crumbs not wet batter. Allow to rest in the pan until the pans are cool enough to handle, about 15 minutes. Invert onto wire racks to cool completely.
  6. While the cakes cool, make the frosting. In the bowl of a stand mixer or in a large bowl with electric hand beaters, beat cream cheese around the bowl to soften and smooth. Add the softened butter and beat the two until well incorporated. Add the salt, powdered sugar and vanilla extract and beat to smooth and thick.
  7. To assemble the cake, use a serrated knife to cut a thing layer off the top of any uneven cake layers. This may not be necessary. Place the first cake layer on a serving platter, cake stand, or round cardboard top side down. Top with a thick layer of frosting. Repeat with the remaining one or two layers of cake. Spread remaining frosting across the sides. Refrigerate the cake for 20 minutes to allow the frosting to chill before frosting again to completely cover the sides if you’d like. Refrigerate the cake for an hour before serving. Cake is best served cold.
  8. Store any leftovers wrapped in the refrigerator for up to 5 days.

Notes

This cake batter can also be baked in a 9×13-inch cake pan for 30-36 minutes.*

This cake batter can also be baked in a 12-cup bundt pan for 50-60 minutes (maybe more). *

When experimenting with different baking pans, don’t fill the batter more than 3/4 of the way up the pan, leaving room for the cake to rise without it spilling over the sides during baking.