Carrot Cake with Cream Cheese Frosting
The first time I made this carrot cake, it was for my dad’s birthday, and I stood at the counter with a box grater and a mountain of carrots wondering what I had gotten myself into. Twenty minutes later my arms were tired, the counter was flecked with orange, and I was not sure it would be worth it. It was. The carrots melt right into the batter as the cake bakes, and what comes out of the oven is a tender, warmly spiced cake that stays moist for days.
This version bakes in a 9 by 13 inch pan, so there are no layers to stack, level, or slide around. You mix the batter in two bowls, spread it in the pan, and while the cake cools you whip up a simple cream cheese frosting with four ingredients. A handful of chopped walnuts scattered over the top gives it a little crunch, and the whole pan travels well to potlucks, Easter dinners, and spring birthdays.
It is also a friendly cake to make ahead. The flavors settle in overnight, the frosting firms up in the refrigerator, and a cold slice with a cup of coffee the next morning might be the best one of all.
Why You’ll Love This Recipe
- The shredded carrots keep every bite moist for days, so there is no dry cake to apologize for.
- Warm cinnamon with a little nutmeg and ginger gives it that classic bakery flavor without a long spice list.
- Baking it as a sheet cake means no layers to stack and no special pans to buy.
- The cream cheese frosting mixes up in one bowl with just four ingredients.
- It feeds a crowd and holds up well in the refrigerator, so it is easy to make a day ahead.

Ingredient Notes and Easy Substitutions
Finely shredded carrots are the heart of this cake. Use the small holes on a box grater or the shredding disc on a food processor, which turns the grating job into about two minutes of work. You want about 3 cups, loosely packed, from roughly a pound of carrots. Peel them first, and skip the bagged matchstick carrots from the salad aisle. Those are cut thick and stay firm and stringy in the finished cake.
Oil instead of butter keeps the crumb tender even when the cake is served cold from the refrigerator, since butter firms up when it is chilled. Any neutral oil works, such as canola or vegetable oil. If you prefer butter, melt 1 cup, let it cool a bit before mixing, and let slices sit at room temperature for a few minutes before serving so the crumb softens.
Cinnamon does most of the flavor work, with nutmeg and ginger behind it. Chopped walnuts or pecans are optional but lovely, and you can fold in up to a cup of raisins if your family likes them. If you add raisins, toss them in a spoonful of the flour mixture first so they stay spread through the cake instead of sinking to the bottom.
For the frosting, both the cream cheese and the butter need to be at room temperature so they whip up smooth instead of lumpy. Use full fat block cream cheese, not the whipped kind in a tub and not a low fat version, since those can make the frosting runny. Sift the powdered sugar if it looks lumpy, and add milk a teaspoon at a time only if you need the frosting a little softer for spreading.
Step by Step Overview and Practical Kitchen Tips
Heat the oven to 350 degrees F and grease a 9 by 13 inch baking pan. Whisk the flour, baking soda, cinnamon, nutmeg, ginger, and salt in a medium bowl. In a large bowl, whisk the eggs and both sugars until the mixture looks smooth, then whisk in the oil and vanilla. Stir the dry ingredients into the wet ones just until no dry flour shows. Overmixing at this stage can make the cake tough, so stop as soon as it comes together.
Fold in the shredded carrots and the nuts, if you are using them, until they are spread evenly through the batter. The batter will look thick and generously filled, and that is right. Spread it into the prepared pan, smooth the top with a spatula, and nudge the batter into the corners so the cake bakes evenly.
Bake for 33 to 38 minutes, until the top springs back when you press it lightly and a toothpick inserted in the center comes out clean or with a few moist crumbs. Start checking at 33 minutes, because a cake that bakes even five minutes too long loses some of that moist crumb. Cool the cake in the pan on a wire rack until it is completely cool, at least an hour. Frosting a warm cake is a fast way to watch the frosting slide into a puddle.
While the cake cools, beat the cream cheese and butter together until smooth, then beat in the powdered sugar, vanilla, and a pinch of salt until the frosting is fluffy. Spread it over the cooled cake in soft swoops and scatter extra chopped walnuts over the top if you like. If you enjoy cream cheese frosting as much as we do, our Gingerbread Cake with Cream Cheese Frosting pairs a similar frosting with a warmly spiced cake, and the Yellow Cake with Chocolate Frosting is the birthday staple that never lasts long around here. You can browse more of our cakes in the Sweets and Desserts collection.
Storage, Freezing, and Reheating
Because of the cream cheese frosting, this cake belongs in the refrigerator. Cover the pan tightly or move slices to a covered container, and it will keep well for 4 to 5 days. The cake actually tastes better on the second day, once the spices have had time to settle into the crumb.
To freeze, wrap individual slices or the whole unfrosted cake tightly in plastic wrap and then in foil, and freeze for up to 3 months. Frosted slices freeze fine too. Thaw overnight in the refrigerator. This cake is best served cold or after sitting out for about 20 minutes, so there is no real reheating needed. If you like a softer slice, about 10 seconds in the microwave does it, though the frosting will get very soft.

FAQs
Can I bake this as a layer cake instead?
Yes. Divide the batter between two greased and parchment lined 9 inch round pans and bake for 28 to 33 minutes, checking with a toothpick the same way. Cool the layers in the pans for 10 minutes, turn them out, and let them cool completely before frosting. Make one and a half times the frosting so you have plenty to fill and cover a layer cake.
Do I have to peel the carrots?
It is worth the minute it takes. Carrot peel can taste a little bitter and earthy, and it does not soften the way the rest of the carrot does. A quick pass with a vegetable peeler before shredding gives you the cleanest, sweetest flavor.
Can I make the cake ahead of time?
Absolutely, and it is even better for it. Bake the cake a day ahead, cool it, cover the pan, and refrigerate it unfrosted. Make the frosting a few hours before serving, or frost the whole cake a day ahead and keep it covered in the refrigerator. Either way, it slices cleanly and tastes great.
Why did my frosting come out runny?
Usually the cream cheese was too warm, or a low fat or whipped variety was used. Block style full fat cream cheese and butter that are soft but not melty give the firmest frosting. If yours is already soft, chill the bowl for 20 minutes and beat it again briefly, or whisk in a little more powdered sugar.
Carrot Cake with Cream Cheese Frosting
Ingredients
- 2 and 1/2 cups all purpose flour
- 2 teaspoons baking soda
- 2 teaspoons ground cinnamon
- 1/2 teaspoon ground nutmeg
- 1/2 teaspoon ground ginger
- 1 teaspoon fine salt
- 4 large eggs, at room temperature
- 1 and 1/2 cups granulated sugar
- 1/2 cup packed light brown sugar
- 1 cup neutral oil, such as canola
- 2 teaspoons vanilla extract
- 3 cups finely shredded carrots, loosely packed (about 1 pound)
- 1 cup chopped walnuts or pecans, plus more for the top (optional)
- 8 ounces block cream cheese, at room temperature
- 1/2 cup unsalted butter, at room temperature
- 3 and 1/2 cups powdered sugar, sifted if lumpy
- 1 teaspoon vanilla extract, for the frosting
- Pinch of salt, for the frosting
- 1 to 2 teaspoons milk, only if needed for spreading
Instructions
- Heat the oven to 350 degrees F. Grease a 9 by 13 inch baking pan.
- Whisk the flour, baking soda, cinnamon, nutmeg, ginger, and salt in a medium bowl.
- In a large bowl, whisk the eggs, granulated sugar, and brown sugar until smooth. Whisk in the oil and vanilla.
- Stir the dry ingredients into the wet ingredients just until combined, then fold in the carrots and nuts.
- Spread the batter in the pan and bake for 33 to 38 minutes, until a toothpick inserted in the center comes out clean.
- Cool the cake completely in the pan on a wire rack, at least 1 hour.
- Beat the cream cheese and butter until smooth. Beat in the powdered sugar, vanilla, and salt until fluffy, adding milk a teaspoon at a time if needed.
- Spread the frosting over the cooled cake, top with extra chopped nuts if you like, and refrigerate until serving.