
This carrot cake recipe is the one people ask you to bring to every gathering after they try it once. The cake stays moist for days, the spice level is balanced without being overwhelming, and the cream cheese frosting is thick and tangy without tasting like straight sugar. It is made completely from scratch, but nothing about the process is complicated. If you have made box mix carrot cake before and wondered why it always falls a little flat, this recipe shows you exactly what was missing.

- 2 cups all-purpose flour
- 2 tsp baking soda
- 1.5 tsp baking powder
- 1.5 tsp ground cinnamon
- 1/2 tsp ground nutmeg
- 1/4 tsp ground ginger
- 1/2 tsp salt
- 4 large eggs , room temperature
- 1.5 cups granulated sugar
- 1/2 cup brown sugar , packed
- 1 cup vegetable oil
- 1/4 cup plain Greek yogurt or sour cream
- 2 tsp pure vanilla extract
- 3 cups freshly grated carrots , about 4 to 5 medium carrots
- 1 cup crushed pineapple , very well drained
- 1 cup chopped walnuts or pecans , optional
- 16 oz full-fat cream cheese , softened to room temperature
- 1/2 cup unsalted butter , softened
- 3.5 cups powdered sugar , sifted
- 2 tsp pure vanilla extract
- 1 pinch of salt
- 1 to 2 tbsp heavy cream , only if needed to loosen consistency
- Two 9-inch round cake pans or one 9x13 inch baking pan
- Large mixing bowl
- Medium mixing bowl
- Box grater or hand grater
- Electric hand mixer or stand mixer
- Rubber spatula
- Wire cooling rack
- Offset spatula for frosting
- Sieve or flour sifter

- Whisk all dry ingredients together in one bowl.
- Beat eggs, sugars, oil, yogurt, and vanilla in a separate large bowl.
- Fold dry ingredients into wet until just combined.
- Add grated carrots, drained pineapple, and walnuts if using.
- Divide batter between two pans and bake at 350°F for 28 to 33 minutes.
- Cool layers completely before making the frosting.
- Beat cream cheese and butter, add powdered sugar, then frost and stack the layers.
- Refrigerate for 30 minutes before slicing.

- Preheat oven to 350°F. Grease both 9-inch round pans and line the bottoms with parchment paper cut to fit.
- In a medium bowl, whisk flour, baking soda, baking powder, cinnamon, nutmeg, ginger, and salt together. Set aside.
- In a large bowl, whisk eggs, granulated sugar, and brown sugar for about 2 minutes until the mixture looks smooth and slightly pale.
- Add vegetable oil, Greek yogurt, and vanilla to the egg mixture. Whisk until everything is fully incorporated.
- Add the dry ingredients to the wet bowl. Fold with a rubber spatula until just combined. Stop as soon as no dry streaks remain. Do not keep mixing.
- Fold in the grated carrots, drained pineapple, and walnuts if you are using them. The batter will be noticeably thick. That is correct.
- Divide the batter evenly between the two prepared pans. Smooth the tops lightly.
- Bake for 28 to 33 minutes. Start checking at 28 minutes. A toothpick inserted into the centre should come out clean or with just one or two moist crumbs attached. No wet batter.
- Set pans on a wire rack and cool for 15 minutes inside the pans.
- Run a thin knife around the edges, then turn the layers out onto the rack. Let them cool completely. Do not rush this. Frosting a cake that is even slightly warm is one of the most common mistakes in baking.
- Once the layers are completely cool, start the frosting. Beat softened cream cheese and butter together on medium speed for 2 to 3 minutes until the mixture is smooth with no lumps.
- Add sifted powdered sugar one cup at a time. Mix on low speed after each addition to avoid a cloud of sugar.
- Add vanilla and the pinch of salt. Increase to medium speed and beat for another minute until the frosting looks creamy and holds its shape.
- Check the consistency. If it is too stiff to spread, add heavy cream one tablespoon at a time and mix briefly until it loosens.
- Place the first cake layer on a serving plate or cake board. Add a generous scoop of frosting to the top and spread it evenly to the edges.
- Set the second layer on top, flat side up if possible. Frost the top and work your way down the sides using an offset spatula.
- Refrigerate the finished cake for at least 30 minutes before slicing. This firms up the frosting and makes clean slices much easier.
- Use the fine side of your box grater for the carrots. Fine shreds integrate into the batter completely and give the cake a smoother, more even crumb. Coarse shreds stay visible and can create uneven pockets of moisture.
- Stop mixing the moment the flour disappears. Overmixing activates gluten and the cake comes out tough and chewy rather than tender. A fold or two past the last streak of flour is plenty.
- Full-fat cream cheese only. Reduced-fat versions contain more water and stabilisers. The frosting will be looser and may weep after a day in the fridge. It is not worth the trade-off.
- Toast the walnuts or pecans before adding them to the batter. Spread them on a dry skillet over medium heat for 4 to 5 minutes, stirring once or twice. The difference in flavour compared to raw nuts is very noticeable.
- Level your cake layers if they have domed. Use a long serrated knife and a steady hand to slice off any dome before stacking. This makes the finished cake sit flat and look much cleaner once frosted.
- Chill before you slice. Even 30 minutes in the fridge after frosting makes a significant difference. The frosting sets, the layers hold together, and you get clean edges instead of crumbling sides.
- Not squeezing the pineapple dry — this is the single most common reason a carrot cake comes out gummy or sinks in the centre. The extra liquid throws off the whole structure.
- Frosting a warm cake — the frosting will melt into the layers and slide down the sides. It needs to go on a completely cool cake, not one that feels barely warm.
- Starting with cold cream cheese — you cannot beat out lumps that form from cold cream cheese. Once they are in, they stay in. Leave it on the counter long enough to fully soften.
- Opening the oven before 25 minutes — the batter is still setting. A blast of cold air can cause the centre to collapse and it will not recover.
- Skipping the parchment paper — carrot cake is dense and moist and it will stick to an unlined pan. Parchment is cheap insurance.
- Scooping flour directly from the bag — this compacts the flour and adds too much, which dries the cake out. Spoon flour into the measuring cup and level the top with a straight edge.
- Nut-free: Leave out the walnuts entirely. The cake structure does not depend on them.
- With raisins: Fold in 1/2 cup of golden raisins with the carrots. Soak them in warm water for 10 minutes first so they stay soft in the finished cake.
- With coconut: Add 1/2 cup shredded sweetened coconut to the batter for a slightly chewier texture and a more tropical note.
- Sheet cake format: Pour the full batter into a greased 9x13 inch pan. Bake at 350°F for 35 to 40 minutes. Frost directly in the pan once cooled.
- Carrot cake cupcakes: Fill lined muffin tins about two thirds full. Bake at 350°F for 18 to 22 minutes. This recipe makes around 24 cupcakes.
- Dairy-free frosting: Substitute dairy-free cream cheese and vegan butter in equal amounts. The frosting will be slightly softer but holds reasonably well when chilled.
- Less sweet frosting: Drop the powdered sugar to 2.5 cups and add an extra pinch of salt. The tang from the cream cheese comes through more and it feels less heavy overall.
- Hot black coffee or a spiced chai — the bitterness cuts through the sweetness of the frosting nicely
- A scoop of vanilla ice cream alongside a warm slice straight from the oven
- Lightly sweetened whipped cream instead of frosting if you want something less rich
- A thin drizzle of salted caramel sauce over the top of the frosted cake just before serving
- Fresh raspberries or sliced strawberries on the plate for a little acidity and colour
- Room temperature: A frosted cake can sit covered at room temperature for up to 1 day as long as your kitchen is not too warm.
- Refrigerator: Keep it covered in the fridge for up to 5 days. The flavour genuinely gets better on day 2 and day 3 as everything settles.
- Freezing unfrosted layers: Wrap each cooled layer tightly in plastic wrap and then a layer of foil. Freeze for up to 3 months. Thaw overnight in the fridge before frosting.
- Freezing frosted slices: Arrange individual slices on a sheet pan and freeze until firm, then wrap each one separately. They keep well for up to 2 months.
- Before serving from the fridge: Set slices on the counter for 20 to 30 minutes to take the chill off. The texture and flavour are both better at room temperature. Avoid microwaving a frosted slice — the frosting separates and goes greasy.

Yes. Bake the layers up to 2 days ahead, wrap tightly, and refrigerate. Make the frosting fresh on the day you assemble and serve.
Three likely causes: underbaking, too much liquid from poorly drained pineapple, or the oven door was opened too early. Check all three before trying again.
A light or mild olive oil works fine. Avoid extra virgin — the flavour is too strong and comes through clearly in the finished cake.
No. Leave it out and replace it with an extra 1/4 cup of Greek yogurt to keep the moisture level correct.
Insert a toothpick into the thickest part of the centre. Clean or one to two moist crumbs means done. Wet batter means it needs more time.
Yes, and it is worth doing. The standard recipe gives moderate coverage. Doubling it gives you thick filling between layers and full coverage on the outside without running short.
- Grate the carrots fresh at home. Bagged pre-shredded carrots are too thick and dry. They do not break down properly in the batter and affect the final texture.
- Drain the pineapple very thoroughly. Press it through a fine sieve or squeeze it in a clean kitchen towel until almost no liquid comes out. Wet pineapple is one of the main reasons carrot cakes sink or turn gummy in the middle.
- The Greek yogurt or sour cream is not optional in terms of what it does. It adds moisture and just enough acidity to balance the sweetness of the sugar and the carrots.
- Pull your eggs and cream cheese out of the fridge at least 30 minutes before you start. Cold eggs do not whisk up evenly with oil. Cold cream cheese will not beat smooth no matter how long you run the mixer.
- The unfrosted cake layers can be baked the day before. Wrap them tightly in plastic wrap once fully cooled and refrigerate overnight. This actually makes the cake easier to frost and can deepen the flavour slightly.
This carrot cake recipe is reliable, straightforward, and genuinely worth making from scratch. The texture holds for days in the fridge, the frosting stays put, and it works just as well as a casual weekend bake as it does for a celebration. Make it once and you will not go back to the box.