This made from scratch carrot cake is moist, spiced, and topped with a tangy cream cheese frosting. It uses oil instead of butter for a tender crumb that stays soft for days, and the carrots add natural sweetness and texture. The recipe is straightforward, uses common pantry ingredients, and yields a classic two-layer cake that works for birthdays, holidays, or any celebration.
Ingredients
- For the cake:
- 2 cups (250 g) all-purpose flour
- 2 teaspoons baking powder
- 1 teaspoon baking soda
- 1 teaspoon ground cinnamon
- 1/2 teaspoon ground nutmeg
- 1/2 teaspoon salt
- 1 cup (200 g) granulated sugar
- 1 cup (200 g) packed light brown sugar
- 4 large eggs, at room temperature
- 1 cup (240 ml) vegetable oil (or canola oil)
- 2 teaspoons vanilla extract
- 3 cups (about 340 g) finely grated carrots (about 4–5 medium carrots)
- 1 cup (120 g) chopped walnuts or pecans (optional)
- 1/2 cup (80 g) raisins (optional)
- For the cream cheese frosting:
- 8 oz (226 g) cream cheese, softened
- 1/2 cup (1 stick, 113 g) unsalted butter, softened
- 3 cups (360 g) powdered sugar, sifted
- 1 teaspoon vanilla extract
- Pinch of salt
Instructions
- Preheat your oven to 350°F (175°C). Grease and flour two 9-inch round cake pans, or line the bottoms with parchment paper.
- In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, nutmeg, and salt. Set aside.
- In a large bowl, whisk the granulated sugar, brown sugar, eggs, oil, and vanilla extract until smooth and well combined.
- Add the dry ingredients to the wet mixture and stir with a spatula or wooden spoon until just combined. Do not overmix.
- Fold in the grated carrots, and if using, the nuts and raisins.
- Divide the batter evenly between the prepared pans. Bake for 25–30 minutes, or until a toothpick inserted into the center comes out clean and the cakes spring back lightly when touched.
- Let the cakes cool in the pans for 10 minutes, then turn them out onto a wire rack to cool completely. This is important – the frosting will melt if the cakes are warm.
- While the cakes cool, make the frosting: In a large bowl, beat the cream cheese and butter together until smooth and creamy. Add the powdered sugar, vanilla, and salt, and beat until light and fluffy, about 2–3 minutes.
- Once the cakes are completely cool, place one layer on a serving plate. Spread about 1 cup of frosting on top. Place the second layer on top and frost the top and sides of the cake with the remaining frosting.
- Refrigerate the frosted cake for at least 30 minutes before slicing to help the frosting set.
Tips
- Grate your own carrots: Pre-shredded carrots are often dry and coarse. Freshly grated carrots (using the fine side of a box grater or a food processor) give better moisture and texture.
- Don’t overmix the batter: Once you add the dry ingredients, mix only until no streaks of flour remain. Overmixing develops gluten, which can make the cake tough.
- Room temperature ingredients: Eggs, cream cheese, and butter should be at room temperature for a smoother batter and frosting. Cold ingredients can cause lumps.
- Cool completely before frosting: Even a slightly warm cake will cause the frosting to slide. If you’re in a hurry, you can chill the layers in the fridge for 15–20 minutes.
Serving Suggestions
Serve this carrot cake at room temperature for the best flavor and texture. It pairs wonderfully with a cup of coffee, black tea, or a glass of cold milk. For a special touch, garnish the top with a few chopped walnuts or a light dusting of cinnamon. It’s also delicious with a scoop of vanilla ice cream or a dollop of whipped cream.
Variations
- Spice it up: Add 1/2 teaspoon of ground ginger or cloves to the dry ingredients for a warmer spice profile.
- Add pineapple: Fold in 1/2 cup of well-drained crushed pineapple for extra moisture and sweetness.
- Make it a sheet cake: Pour the batter into a greased 9x13-inch pan and bake for 35–40 minutes. Frost directly in the pan.
- Go nut-free: Omit the walnuts or pecans and add 1/2 cup of shredded coconut or extra raisins instead.
- Try a different frosting: If you prefer a lighter topping, use a whipped cream frosting (1 cup heavy cream, 2 tablespoons powdered sugar, 1 teaspoon vanilla) but note it will need to be refrigerated and is best eaten within a day.
Storage and Reheating
Store the frosted cake in an airtight container in the refrigerator for up to 5 days. Because of the cream cheese frosting, it must be kept chilled. Let it sit at room temperature for 20–30 minutes before serving to soften. You can also freeze the unfrosted cake layers (wrapped tightly in plastic wrap and foil) for up to 3 months. Thaw overnight in the fridge before frosting. To reheat individual slices, microwave for 10–15 seconds to warm slightly, but note that the frosting will soften.
Frequently Asked Questions
Can I use butter instead of oil?
Yes, you can substitute melted butter for the oil, but the cake will be slightly denser and less moist. Use the same amount (1 cup) of melted butter and let it cool slightly before adding to the eggs.
Why did my cake sink in the middle?
This can happen if the oven door is opened too early during baking, or if the batter was overmixed. It can also happen if the baking powder is old – check the expiration date and test by stirring a teaspoon into hot water; it should bubble vigorously.
Can I make this cake gluten-free?
Yes, you can substitute a 1:1 gluten-free flour blend for the all-purpose flour. The texture may be slightly more crumbly, but it will still work. Make sure the blend contains xanthan gum or add 1/2 teaspoon.
How do I know when the cake is done?
Insert a toothpick into the center – it should come out clean or with a few moist crumbs, not wet batter. The cake should also pull away slightly from the edges of the pan.
Can I reduce the sugar?
You can reduce the total sugar by up to 1/4 cup without major changes, but the cake will be less sweet and slightly less tender. The frosting needs the full amount to hold its structure.
Do I need to refrigerate the cake?
Yes, because the cream cheese frosting is perishable. Refrigerate it, but bring to room temperature before serving for the best flavor.