Moist Spiced Carrot Cake with Cream Cheese Frosting

If you’re searching for the best carrot cake recipe — moist, warmly spiced, and easy to make — you’ve found it. This version uses pantry staples and delivers a reliably tender crumb. Finish it with a classic cream cheese frosting for an irresistible result.

A slice of the best carrot cake recipe on a white plate with white flowers in the background. A bite missing from the slice.

If I had to pick a favorite cake, this carrot cake would be at the top of the list. Its tender, moist crumb, balanced spices, and a not-too-sweet cream cheese frosting make it a reliable classic. The recipe combines oil and melted butter for both moisture and flavor, and the grated carrots add texture and natural sweetness. It’s simple enough for weeknight baking and impressive enough for special occasions.

What You Need

Overhead view of the ingredients (labeled) needed for my carrot cake recipe.

A few key ingredients make this carrot cake reliably great:

  • All-purpose flour: Provides structure for a heartier cake. Avoid cake flour here.
  • Sugar: A mix of granulated and brown sugar adds sweetness and depth. Light or dark brown sugar will work; dark yields a richer flavor.
  • Oil and butter: Oil keeps the cake moist, while butter adds flavor. Using both gives the best texture and taste.
  • Eggs: Use room-temperature eggs so they incorporate evenly and help the batter mix smoothly.
  • Fresh grated carrots: Peel and grate your own carrots for the best texture. Avoid pre-shredded or matchstick-style carrots — they’re too thick.
  • Nuts (optional): Chopped walnuts or pecans are classic additions but can be omitted.
  • Cream cheese: Use block-style cream cheese (not tub-style) for a firm, stable frosting.

Sam’s Tip

To grate carrots in a food processor, start with the shred disk, then briefly pulse with the standard blade to break the shreds into finer pieces. Be careful not to overprocess or you’ll end up with puree.

How to Make This Carrot Cake (Step-by-Step)

collage of four photos showing how to make carrot cake
  1. Preheat oven to 350°F (175°C). Prepare two 8-inch round pans by lining the bottoms with parchment, then lightly greasing and flouring the sides.
  2. In a large bowl, whisk together 2½ cups all-purpose flour, 1 cup granulated sugar, 1 cup packed brown sugar, 1½ teaspoons baking soda, 1 teaspoon baking powder, 1 teaspoon salt, 2 teaspoons ground cinnamon, and ½ teaspoon ground nutmeg.
  3. Add 1 cup cooking oil and ½ cup melted unsalted butter to the dry ingredients and stir until combined. The batter will be thick; an electric mixer or stand mixer makes this easy.
  4. Add 4 large eggs one at a time, mixing well after each addition, then stir in 1 tablespoon vanilla extract.
  5. Fold in 3 cups grated carrots (about 4 large carrots, peeled and grated) and 1 cup chopped walnuts or pecans if desired. Mix until evenly distributed.
  6. Divide the batter evenly between the prepared pans and bake at 350°F (175°C) for about 37–40 minutes, or until a toothpick in the center comes out with a few moist crumbs.
  7. Let cakes cool in their pans for 10 minutes, then run a knife around the edge and invert onto a cooling rack to cool completely before frosting.
  8. Prepare the cream cheese frosting and then spread it over the cooled layers. Slice and serve.
collage of two photos showing how to frost a carrot cake after baking

Sam’s Tip

One batch of frosting will cover the cake, but if you like a thicker coating or want to pipe decorations, increase the frosting by 50% or double it.

cake pans filled with carrot cake batter

Frequently Asked Questions

Can I use this recipe for cupcakes?

This recipe is quite moist and slightly dense, so cupcakes made from it can be heavier and may be more convenient to eat with a fork. If you want lighter carrot cupcakes, use a dedicated cupcake version designed for that format.

Can I add raisins?

Yes. Stir in about 1 cup of raisins when you add the carrots and nuts. Adjust the amount to your preference.

Why did my carrot cake turn green?

A green tint can come from not peeling the carrots before grating, which can cause the peels to react during baking. Peeling your carrots first solves this. Unevenly distributed baking soda may also cause discoloration, so measure and mix dry ingredients thoroughly.

More Frosting Options

If you prefer something other than cream cheese frosting, this cake pairs beautifully with brown butter frosting, Swiss meringue buttercream, ermine (flour) frosting, stabilized whipped cream, or a simple vanilla buttercream.

a slice of frosted carrot cake on a white plate with the rest of the cake in the background

More Recipes to Try

close-up view of a thick slice of lemon blueberry cake frosted with lemon frosting

Lemon Blueberry Cake

Carrot cake cookies topped with cream cheese frosting and sprinkles on a wood cutting board.

Carrot Cake Cookies

Banana cake with bite taken out on a white plate.

The Best Banana Cake

Slice of cream cheese frosted hummingbird cake on a white plate

Hummingbird Cake

Enjoy!

Let’s bake together! Subscribe to my newsletter to be notified of new recipes and find recipe tutorials on YouTube.

Ingredients

  • 2½ cups (315 g) all-purpose flour
  • 1 cup (200 g) granulated sugar
  • 1 cup (200 g) packed light or dark brown sugar
  • 1½ teaspoons baking soda
  • 1 teaspoon baking powder
  • 1 teaspoon table salt
  • 2 teaspoons ground cinnamon
  • ½ teaspoon ground nutmeg
  • 1 cup (235 ml) cooking oil (canola, avocado, or vegetable)
  • ½ cup (113 g) unsalted butter, melted
  • 4 large eggs, room temperature
  • 1 Tablespoon vanilla extract
  • 3 cups (340 g) grated carrots (peel before grating)
  • 1 cup (125 g) chopped walnuts or pecans, optional

Cream Cheese Frosting

  • ½ cup (1 stick / 113 g) unsalted butter, softened
  • 8 oz (226 g) cream cheese, softened (brick-style)
  • 1 teaspoon vanilla extract
  • ¼ teaspoon salt
  • 4 cups (500 g) powdered sugar

Instructions

  1. Preheat oven to 350°F (175°C). Line two 8-inch round pans with parchment and lightly grease and flour the sides.
  2. Whisk together the dry ingredients: flour, granulated sugar, brown sugar, baking soda, baking powder, salt, cinnamon, and nutmeg.
  3. Add the oil and melted butter and stir until combined. The batter will be thick; use a mixer if needed.
  4. Add the eggs one at a time, mixing well after each addition. Stir in vanilla.
  5. Fold in the grated carrots and chopped nuts, if using.
  6. Divide batter evenly between pans and bake 37–40 minutes, or until a toothpick comes out with a few moist crumbs.
  7. Cool cakes in pans for 10 minutes, then invert onto a rack and cool completely.
  8. For the frosting: beat butter and cream cheese until smooth, add vanilla and salt, then gradually add powdered sugar on low until fully combined and smooth. Frost cooled cake.

Notes

Brown sugar: Light or dark both work. Dark brown sugar gives a slightly deeper, molasses-like flavor.

Carrots: You’ll need about 4 large carrots to yield 3 cups grated. Peel before grating and use a fine shred for best texture. Avoid pre-shredded matchstick carrots.

Frosting: One batch will cover the cake, but increase by 50% or double if you prefer thicker frosting or want to pipe decorations.

Different pan sizes and bake times: Two 9-inch pans: ~30–33 minutes. 9×13 pan: ~40 minutes. Bundt pan: ~55 minutes. Four 6-inch pans: ~40 minutes. Cupcakes: use a dedicated cupcake recipe for lighter results.

Storing: Store the cake in an airtight container. At room temperature in a cool, dry place it will be fine for up to 48 hours. For longer storage, refrigerate for up to 5 days.

Gluten-free: Some bakers have had success using a 1:1 gluten-free flour blend such as Cup4Cup, but results may vary.

Nutrition (per slice)

Approximate values: 1 slice (calories calculated with frosting but without optional nuts):

Calories: 533 kcal | Carbohydrates: 86 g | Protein: 7 g | Fat: 19 g | Saturated Fat: 8 g | Sugar: 65 g | Fiber: 2 g

Like this recipe? Leave a comment and let me know how it turned out!

This recipe was originally published August 22, 2018. The recipe is unchanged and updated with new photos, clearer instructions, and a step-by-step walkthrough.