A good carrot cake should be moist without feeling greasy, warmly spiced without tasting like a spice cake, and substantial without becoming heavy or gummy. I prefer an oil-based batter because it stays soft when chilled, which matters for a cake that is normally stored with cream cheese frosting.
My carrot cake formula
Yield: two 20 cm / 8-inch layers, approximately 10–12 slices.
- 250 g all-purpose flour
- 220 g light brown sugar
- 80 g caster or granulated sugar
- 220 g neutral oil
- 200 g whole egg, about 4 large eggs without shells
- 350 g peeled carrots, finely grated
- 5 g baking powder
- 5 g baking soda
- 4 g fine salt
- 5 g ground cinnamon
- 2 g ground ginger
- 1 g ground nutmeg
- 8 g vanilla extract
- 100 g toasted walnuts or pecans, optional
- 450 g full-fat block cream cheese, cold, for the frosting
- 170 g unsalted butter, softened but still cool, for the frosting
- 180 g icing sugar, sifted, for the frosting
- 6 g vanilla extract for the frosting
- 1 g fine salt for the frosting
How I make it
I heat the oven to 175°C / 350°F and prepare two 20 cm / 8-inch pans with parchment on the bases. I lightly grease the sides.
I whisk the flour, baking powder, baking soda, salt, cinnamon, ginger and nutmeg together so the leavening and spices are evenly distributed.
In a separate bowl I whisk the brown sugar, caster sugar, eggs, oil and vanilla until the mixture is smooth and emulsified. I am not trying to whip in a large volume of air; this is not a creamed-butter cake.
I add the dry ingredients and mix only until no dry flour remains. Then I fold in the finely grated carrots and, if I am using them, the toasted walnuts or pecans. Once flour is hydrated, unnecessary mixing only makes the crumb tougher.
I divide the batter evenly between the pans and bake for approximately 28–35 minutes. I use the cake itself as the final guide: the centre should spring back lightly, the top should look set rather than wet, and a tester inserted near the centre should come out without raw batter. I cool the layers in the pans briefly, then turn them out and cool them completely before frosting.
For the frosting, I beat the cool softened butter with the icing sugar and salt until smooth. I add the cold block cream cheese in several additions and mix only until the frosting is homogeneous, then add the vanilla. Cream cheese frosting becomes looser when it is warm or overmixed, so I stop as soon as the texture is smooth enough to spread.
I fill and cover the completely cold cake, then refrigerate it to set the frosting. Before serving, I give the cake enough time out of the refrigerator for the crumb and butter in the frosting to lose their refrigerator hardness.
Why I use oil instead of butter
Butter gives excellent flavour, but carrot cake has a different structural priority from a butter cake. Neutral oil stays liquid at refrigerator temperature, so the crumb remains soft even after the assembled cake has been chilled for food safety. Oil also works naturally with the large amount of water and fibre contributed by the carrots.
This does not mean butter-based carrot cake is wrong. It is simply a different style. For the moist layer-cake result I want here, oil is the more reliable choice.
Why the carrots should be finely grated
The carrot is not only flavouring. It contributes water, sugar, fibre and bulk to the batter. Finely grated carrot distributes these effects evenly and softens during baking. Very coarse shreds can leave stringy pockets and make the crumb less uniform.
I weigh the carrots after peeling and before mixing them into the batter. I do not squeeze them dry for this formula because their moisture is part of the recipe balance.
Brown sugar or white sugar?
I use both. Brown sugar contributes molasses notes and a slightly deeper flavour, while a smaller amount of white sugar keeps the sweetness clean. Carrot cake is often heavily sweetened, especially once frosting is included, so I prefer the cake itself to remain balanced rather than cloying.
How much spice should carrot cake have?
I want cinnamon to lead, with ginger and nutmeg behind it. The spices should support the carrot and brown sugar rather than dominate them. If every bite tastes primarily of cinnamon, the cake has moved away from the balance I am looking for.
Walnuts or pecans — are they necessary?
No. Nuts are a classic and useful addition, but they are optional. I toast them first because raw nuts can taste flat inside a moist cake. Toasting gives a cleaner roasted flavour and helps them remain distinct from the soft crumb.
I keep the quantity moderate. Too many nuts add weight and interrupt the cake structure; they should be inclusions, not half of the batter.
Does carrot cake need pineapple or raisins?
No. Both are legitimate variations, but neither is required for a classic carrot cake. Pineapple adds acidity, sugar and additional water, while raisins add concentrated sweetness and chew. If I add either one, I treat it as a formulation change rather than simply throwing it into the canonical batter.
For pineapple, excess juice can make the centre gummy or cause structural weakness. For raisins, I keep the amount restrained so the cake does not become overly sweet and dense.
Why did my carrot cake turn out dense or gummy?
I first check the bake. A carrot cake can look done at the edges while the centre still contains too much unstructured moisture. Underbaking is one of the most common causes of a gummy centre.
I also check carrot quantity and preparation. Too much carrot, very wet added fruit, or heavy quantities of nuts and raisins can overload the batter. Finally, inaccurate flour scaling changes the entire liquid-to-solid balance, which is why I strongly prefer grams for this cake.
Why is my carrot cake greasy?
A properly balanced oil-based cake should feel moist, not oily. A greasy crumb usually points to too much oil, poor scaling, or an emulsion that was never properly combined. I whisk the eggs, sugars and oil until smooth before adding the flour.
If the cake also feels heavy and wet, I check for underbaking or excessive carrot and add-ins rather than blaming the oil alone.
Why is my carrot cake dry?
The usual cause is overbaking. Carrot cake contains plenty of moisture, but it can still become dry if it remains in the oven long after the centre has set. Too much flour or too little carrot or oil can produce the same problem.
I therefore use time only as a range and rely on the centre spring, set surface and tester as the final cues.
Why did my carrot cake sink in the middle?
A sunken centre usually means the structure was not strong enough when the cake left the oven. Underbaking is the first suspect. Too much leavener, too much added fruit or inclusions, or a major measuring error can also make the batter rise beyond what the crumb can support.
I avoid opening or moving the cakes aggressively during the early part of the bake, when the centre is still fluid.
How I keep cream cheese frosting stable
The most important ingredient is full-fat block cream cheese rather than soft spreadable cream cheese from a tub. Tub products usually contain more water and are much harder to hold in a clean cake finish.
Temperature matters just as much. I want the butter softened enough to mix but still cool, and the cream cheese cold. Once the cream cheese is incorporated, I mix only as much as necessary. Warm ingredients and prolonged mixing both loosen the frosting.
If the frosting is too soft to assemble the cake neatly, I chill it briefly rather than adding large amounts of extra icing sugar, which changes the flavour balance.
Can I make carrot cake ahead?
Yes. The unfrosted layers can be baked a day ahead, cooled completely and wrapped well. A rested layer is often easier to trim and assemble than one that is still fresh from the oven.
The finished cake should be refrigerated because of the cream cheese frosting. For the best eating texture, I serve it cool rather than refrigerator-hard.
Can I freeze carrot cake?
Yes. The unfrosted layers freeze very well when wrapped airtight after complete cooling. Thaw them while still wrapped so condensation forms on the wrapping rather than directly on the cake.
The assembled cake can also be frozen, although the frosting may lose a little of its freshly made texture after thawing. I thaw it slowly in the refrigerator.
How long does carrot cake keep?
Because of the cream cheese frosting, I store the assembled cake in the refrigerator. For quality, I prefer it within about 3–4 days. I keep it covered so the cut surfaces and frosting do not dry out or absorb refrigerator odours.
My approach
Carrot cake is forgiving only when the formula remains balanced. The carrots, oil, sugar, eggs and flour all carry structural weight, so I do not treat pineapple, raisins or extra nuts as harmless additions. Every extra gram of water or solids changes the batter.
The result I want is simple: a moist but clean crumb, visible fine carrot, warm spice, restrained sweetness and a cream cheese frosting sharp enough to balance the cake rather than bury it.