Carrot Cake Recipe with Cream Cheese Frosting
Pin it
In this post
This carrot cake recipe walks you through two soft, lightly spiced layers and a thick cream cheese frosting, with step-by-step photos along the way. Use the links below to jump to any section.
- Carrot Cake at a Glance
- Ingredients
- How to Make Carrot Cake with Cream Cheese Frosting
- Step 1: Prepare the Pans and Heat the Oven
- Step 2: Peel, Grate, and Weigh the Carrots
- Step 3: Whisk the Dry Ingredients
- Step 4: Whisk the Wet Ingredients
- Step 5: Fold the Batter Together
- Step 6: Fill the Pans and Bake
- Step 7: Cool and Turn Out the Layers
- Step 8: Beat the Cream Cheese Frosting
- Step 9: Stack and Frost the Cake
- Step 10: Chill, Slice, and Serve
- Carrot Cake Recipe Card
- Keeping Carrot Cake Good Through the Week
- When the Cake Doesn’t Look Right
- Swapping in What You Already Have
- Why This Cake Stays Soft and the Frosting Holds
- Carrot Cake FAQ
- Serving and Finishing Thoughts

A well-made carrot cake is tender and lightly spiced, with enough grated carrot to keep every slice damp without making it heavy. This version bakes as two 9-inch layers from a stir-together batter, then gets a thick, tangy cream cheese frosting.
Oil does most of the work in the crumb. It stays liquid in the fridge while butter turns firm, so the cake still eats soft after a night of chilling, which matters because anything frosted with cream cheese has to live in the refrigerator. The batter needs no creaming and no mixer, so the effort goes into grating the carrots, letting the layers cool fully, and bringing the frosting to the right thickness.
Carrot Cake at a Glance
- Makes: one 2-layer, 9-inch cake (about 12 generous slices)
- Active time: about 50 minutes
- Bake time: 25 to 35 minutes
- Cooling before frosting: about 1 hour 15 minutes
- Total: about 3 hours, including a short chill after frosting
- Pans: two 9-inch (23 cm) round cake pans, at least 2 inches (5 cm) deep
- Contains: wheat, eggs, dairy, and tree nuts (the nuts can be left out of the batter, and the garnish is optional)
These times are estimates. Oven behavior, pan material, and how fast you grate will move them.
Ingredients
For the Cake
- 2 cups (240 g) all-purpose flour, spooned into the cup and leveled
- 1 teaspoon baking soda
- 1 teaspoon baking powder
- 3/4 teaspoon fine salt
- 2 teaspoons ground cinnamon
- 1/2 teaspoon ground nutmeg
- 3 large eggs
- 1 cup (200 g) granulated sugar
- 1/2 cup (about 105 g) light brown sugar, packed
- 3/4 cup (180 ml) neutral oil, such as canola or vegetable oil
- 2 teaspoons pure vanilla extract
- 2 1/2 cups (about 275 g) finely grated carrots, lightly packed (about 5 medium carrots, peeled)
- 3/4 cup (about 85 g) chopped pecans or walnuts, optional
- Softened butter or oil, plus parchment paper, for the pans
For the Cream Cheese Frosting
- 16 ounces (454 g) full-fat block cream cheese, softened
- 1/2 cup (113 g) unsalted butter, softened
- 4 cups (about 450 g) powdered sugar
- 2 teaspoons pure vanilla extract
- 1/4 teaspoon fine salt
To Finish
- 1/3 cup (about 40 g) chopped pecans or walnuts, optional
Buy a little over 1 cup (about 125 g) of nuts in total if you want them in both the batter and the garnish.
Set everything out and measure it before you start. Once the oven is hot, the batter comes together quickly, and it is easier to follow the steps when nothing is still in the pantry.

Ingredient Notes
- Carrots: Fresh carrots, grated yourself, give the cake its moisture and a little natural sweetness. Most of a carrot’s weight is water, and that water is what keeps the crumb soft.
- Oil: Pick a neutral oil. A strongly flavored oil, such as a robust olive oil, will show up in the finished cake.
- Brown sugar: It adds moisture and a mild caramel note, and its slight acidity gives the baking soda something to react with.
- Cream cheese: Use the foil-wrapped blocks, not the spreadable kind sold in tubs. Tub cream cheese tends to be softer and wetter, which leads to a frosting that slumps.
- Flour: Measure it by weight if you can. If you use cups, fluff the flour with a spoon, spoon it into the cup, and sweep the top level with a knife.
Pans and Tools That Matter
Two light-colored metal 9-inch round pans give the most even browning. Darker pans tend to brown the edges faster, so check them a few minutes early. A box grater, a whisk, a silicone spatula, and a wire rack cover the cake itself. A hand mixer makes the frosting easy, and a serrated knife helps with leveling and slicing. A kitchen scale and an oven thermometer are worth using here, because both the carrot quantity and the oven temperature affect the result more than they might in a forgiving recipe.
How to Make Carrot Cake with Cream Cheese Frosting
Step 1: Prepare the Pans and Heat the Oven
Set a rack in the middle of the oven and heat it to 350°F (175°C). Start here so the oven is fully hot by the time the batter is ready; the batter takes only about 15 minutes to assemble and should not sit around once the flour is in.
Rub the inside of each pan with softened butter, covering the bottom and the sides.

Trace one pan onto parchment, cut out two circles, and press one into the bottom of each pan. Brush the parchment lightly with butter.

The parchment is worth the extra minute. A batter heavy with sugar and carrot tends to cling to a bare pan bottom.
Step 2: Peel, Grate, and Weigh the Carrots
Trim the tops off the carrots and peel them.

Grate them on the small holes of a box grater, or use the fine grating disc of a food processor. You want short, thin shreds, like orange confetti. Long, thick strands tend to stay chewy and leave gaps in the crumb.

Measure 2 1/2 cups (about 275 g), lightly packed. If you have a scale, use it: the volume shifts with carrot size and how fine you grate, while the weight stays consistent.

If you are using nuts, chop them into pieces roughly the size of a chickpea. Pieces much larger than that make the layers harder to slice cleanly.

Why Bagged Shredded Carrots Fall Short
Pre-shredded carrots are usually cut thicker and tend to be drier than carrots grated fresh, so they add less moisture and can leave a stringy texture in the cake. Grating a few carrots takes about 10 minutes and changes the crumb noticeably.
Step 3: Whisk the Dry Ingredients
Add the flour, baking soda, baking powder, salt, cinnamon, and nutmeg to a medium bowl. Whisk for about 30 seconds, until the mixture is one even tan color with no pockets of baking soda and no clumps of spice.

Spoon the Flour, Don’t Scoop It
Dipping the cup straight into the bag packs in extra flour, and extra flour is one of the most common reasons a carrot cake turns out dry and dense. Fluff, spoon, and level, or weigh out 240 g. If a cake from this recipe has already come out dry, this is the first thing to check.
Step 4: Whisk the Wet Ingredients
In a large bowl, whisk the eggs, granulated sugar, and brown sugar for about 1 minute, until smooth and slightly lighter in color. Press any brown sugar lumps against the side of the bowl as you go.

Whisk steadily while pouring in the oil in a thin stream. Adding it slowly gives the oil time to blend into the eggs instead of floating on top.

Stir in the vanilla.

Texture Check: Glossy, Not Greasy
The mixture should look thick, glossy, and uniform, like caramel-colored cream, with no shiny pools of oil at the edges. If oil is pooling, whisk another 20 to 30 seconds before moving on.
Step 5: Fold the Batter Together
Tip the dry mixture over the wet mixture all at once.

Fold with a silicone spatula, cutting down through the middle and sweeping up the side of the bowl, until only a few streaks of flour remain.

Add the carrots and the nuts.

Fold again until no dry flour remains and the carrots are spread evenly through the batter. It should be thick and scoopable, closer to muffin batter than pancake batter.

Stop Folding Sooner Than Feels Right
Overmixing is where this batter most often goes wrong. Working the flour too long builds gluten, which can make the layers tough or rubbery. Carrots also release water as they are stirred, so a batter that is mixed too long loosens up. Stop as soon as the last dry streak disappears, even if the batter still looks a little rough.
Step 6: Fill the Pans and Bake
Divide the batter between the two pans. For evenly sized layers, set each pan on a scale and compare the weights, or scoop alternately into each pan until the batter is gone.

Smooth each top with the back of the spatula, then tap the pans on the counter once or twice to settle large air pockets.

Place both pans on the middle rack, leaving space between them and the oven walls where you can, and bake for 25 to 35 minutes. Avoid opening the oven door during the first 20 minutes, since a sudden drop in temperature can make a layer sink in the center.

Start checking at 25 minutes. Insert a toothpick or thin skewer into the center of each layer.

How to Tell the Center Is Cooked
The toothpick should come out clean or with a few moist crumbs, not streaks of wet batter. The top should spring back when lightly pressed, and the edges should just be starting to pull away from the pan. If the toothpick is wet, bake 3 to 5 minutes more and test again. Dark pans or a hot oven tend to bring the finish time closer to 25 minutes; an oven that runs cool can push it past 30.
Step 7: Cool and Turn Out the Layers
Move the pans to a wire rack and let the layers cool for 15 minutes. That window lets the structure firm up so the cake does not tear when it is released.

Run a thin knife around the edge of each pan. Turn one layer out onto a rack, lift off the pan, and peel the parchment from the bottom.

Set a second rack or a flat plate on the bottom of the layer and flip it right side up. Repeat with the second layer, then let both cool until they feel completely room temperature, about 1 hour.

Warm Layers Melt the Frosting
Frosting spread over a layer that is still faintly warm will soften, slide, and soak into the crumb. Rest the back of your hand on the bottom of a layer; if you can feel any warmth, give it more time. Cooling is also the easiest stage to make ahead (see the make-ahead plan below).
Step 8: Beat the Cream Cheese Frosting
The butter and cream cheese should be soft enough to leave a dent when pressed with a finger, but still cool, not shiny or greasy.
Beat them together with a hand mixer on medium speed for about 2 minutes, until smooth with no lumps of cream cheese. Stop once to scrape the bowl.

Add the powdered sugar, sifting it first if it looks lumpy. Start the mixer on low so the sugar does not cloud the kitchen, then raise the speed to medium.

Add the vanilla and salt and beat for about 1 minute, just until the frosting is fluffy and combined.

Lift the spatula out of the bowl: the frosting should hold a soft peak and spread without running.

Frosting Too Soft to Spread
Cream cheese frosting loosens when it is overbeaten, made with tub cream cheese, or mixed from warm ingredients. If it slumps off the spatula, refrigerate the bowl for 20 to 30 minutes, then stir briefly. It will not fully recover if the cream cheese was very wet to begin with, but chilling usually brings it back to spreadable.
Step 9: Stack and Frost the Cake
Check the tops of the cooled layers. If either has domed, hold a serrated knife flat against the top edge and saw it level with gentle back-and-forth strokes. This step is optional, but a flat surface makes the stack much more stable.

Center the first layer on a cake plate or stand, trimmed side up.

Spread about one-third of the frosting, roughly 1 1/4 cups, over the layer all the way to the edge.

Set the second layer on top upside down, so its flat bottom becomes the top of the cake. Press down gently to seat it.

Spread a generous layer of frosting over the top, then work it down the sides, pushing any excess over the edge and swooping the spatula for texture.

Press the chopped pecans around the top edge, or lightly against the sides if you prefer.

Loose Crumbs in the Frosting
If crumbs lift off and show up in the white frosting, chill the cake for 15 minutes to firm the surface, then spread a second thin coat over the top and sides. The first coat traps the crumbs; the second one looks clean.
Step 10: Chill, Slice, and Serve
Refrigerate the finished cake, uncovered or loosely tented, for 30 minutes so the frosting firms and the layers settle. Cold frosting is much less likely to smear when you cut.
Slice with a long, sharp knife, wiping the blade clean with a damp towel between cuts.

For the best texture, let each slice stand at room temperature for 15 to 20 minutes before eating, which softens the crumb and takes the chill off the frosting.

Carrot Cake Recipe Card

Carrot Cake Recipe with Cream Cheese Frosting
Ingredients
Method
- Heat the oven to 350°F (175°C) with a rack in the middle. Butter two 9-inch round pans and line the bottoms with parchment.
- Peel and finely grate the carrots; measure 2 1/2 cups (about 275 g). Chop the nuts, if using.
- Whisk the flour, baking soda, baking powder, salt, cinnamon, and nutmeg in a medium bowl until evenly combined.
- In a large bowl, whisk the eggs and both sugars for about 1 minute. Whisk in the oil in a thin stream, then stir in the vanilla, until glossy with no pooled oil.
- Add the dry mixture to the wet mixture and fold until a few streaks of flour remain. Add the carrots and nuts and fold just until no dry flour remains.
- Divide the batter between the pans, smooth the tops, and bake for 25 to 35 minutes, until a toothpick in the center comes out clean or with a few moist crumbs.
- Cool in the pans for 15 minutes. Turn the layers out, peel off the parchment, and cool right side up until completely room temperature, about 1 hour.
- Beat the butter and cream cheese until smooth, about 2 minutes. Beat in the powdered sugar, then the vanilla and salt, just until fluffy. If the frosting is too soft to spread, chill it 20 to 30 minutes.
- Level the layers if domed. Stack with about one-third of the frosting between the layers, the second layer upside down, then frost the top and sides. Press nuts around the top edge, if using.
- Chill the cake for 30 minutes, then slice with a clean, sharp knife.
Notes
Keeping Carrot Cake Good Through the Week
Because of the cream cheese frosting, this cake belongs in the refrigerator. Cover it loosely once the frosting has set and keep it there for up to 3 to 4 days. Cream cheese frosting should not sit out for more than 2 hours (1 hour if the room is above 90°F).
Unfrosted layers freeze well. Wrap each completely cooled layer tightly in plastic wrap, then foil, and freeze for up to about 2 months for best quality. Thaw them still wrapped in the refrigerator, then frost once they are fully thawed and at room temperature.
Make-Ahead Plan
- Up to 1 day ahead: Bake the layers, cool them completely, and wrap them tightly at room temperature. Frost the next day.
- Up to 1 day ahead: Make the frosting and refrigerate it. Let it stand about 20 minutes, then stir briefly before spreading. If it stays stiff, beat it for a few seconds rather than warming it.
Pan Size Note
One 9 x 13-inch pan can hold this batter instead of two round pans. It makes a single-layer sheet cake, so bake at the same temperature and begin checking around 30 minutes. The batter spreads across a larger pan, so the timing will not match the round layers exactly. Frost the top only, using roughly half the frosting. For any other pan size, rely on the toothpick test rather than the clock.
When the Cake Doesn’t Look Right
The center sinks. This usually means the layer was underbaked or the oven door was opened early. Next time, bake until the toothpick test passes, and check that the oven temperature is accurate with an oven thermometer. A slightly sunken layer can still be leveled and stacked, so trim the edges and hide it under frosting.
A greasy, dense band at the bottom. The oil was probably not fully blended into the eggs before the flour went in, or the carrots were wet. Whisk until the wet mixture looks uniform and glossy, and pat very juicy carrots lightly with a paper towel before folding them in. A layer with this problem is still edible, but it cannot be fixed after baking.
Domed, cracked tops. A hot oven tends to set the outside before the middle finishes rising. Check the oven temperature and, if needed, lower it by 25°F (about 15°C) on the next bake. Trim the dome flat before stacking.
Swapping in What You Already Have
- Nuts: Walnuts and pecans are interchangeable. You can leave the nuts out of the batter entirely; the cake loses a little texture but not structure.
- All granulated sugar: Replacing the brown sugar with an equal amount of granulated sugar works, though the cake will taste a bit less caramel-like and may come out slightly less moist.
- Raisins: Up to 1/2 cup is a common addition. Add them with the carrots and nuts.
- Cream cheese: Full-fat block cream cheese is the reliable choice. Reduced-fat versions and tub spreads tend to produce a looser frosting.
- Oil: Any neutral oil works. There is no close substitute I would recommend for the oil, since replacing it with a solid fat changes the crumb and the way the cake feels cold.
Why This Cake Stays Soft and the Frosting Holds
- Oil stays liquid in the fridge. Butter firms up when chilled, which can make a cake feel dense or dry. Oil does not, which is why oil-based cakes tend to stay soft after refrigeration.
- Carrots bring water. Most of a raw carrot’s weight is water, so fine shreds release moisture into the crumb as the cake bakes.
- Brown sugar helps the baking soda work. Baking soda needs an acidic ingredient to react. The molasses in brown sugar is mildly acidic, which supports lift and browning.
- Block cream cheese has less water. Spreadable tub versions are formulated to be soft, and that extra moisture and softness is why they tend to make slumping frosting.
Carrot Cake FAQ
Can I serve the cake straight from the refrigerator?
You can, but it tastes better after 15 to 20 minutes at room temperature. The crumb softens, and the frosting loses its stiff, cold texture.
Can I add crushed pineapple or other wet ingredients?
This recipe is balanced for its current amount of moisture, so adding something like crushed pineapple would change the batter and the baking time. It is better to use a recipe designed for it than to adjust this one blindly.
Do I have to use nuts?
No. Nuts are optional in both the batter and the garnish. If anyone eating the cake has a nut allergy, leave them out of every part, and check the labels on the other ingredients, since cross-contact can happen in manufacturing.
Serving and Finishing Thoughts
Serve the cake with coffee or tea after it has had 15 to 20 minutes out of the fridge, and cut the slices on the generous side; the layers are sturdy enough to support them. If you are baking for a date that matters, the make-ahead plan above takes most of the pressure off: the layers and the frosting can both be done the day before, leaving only the stacking and chilling for the day itself.
Do not taste the raw batter, since it contains raw eggs and uncooked flour. The baked cake is the part worth waiting for.
""
Leave a Reply