My grandmother used to say carrot cake was “vegetable soup in disguise.” She was joking, obviously, but she wasn’t entirely wrong.
This cake has been fooling picky eaters for decades. Kids who swear they hate vegetables will ask for seconds. Adults who “don’t really do cake” somehow finish the whole slice.
I’ve made this recipe more times than I can count, at birthdays, potlucks, and one very memorable Tuesday when I just needed cake. Every time, it disappears fast.
Here’s exactly how to make it, step by step, with every trick I’ve picked up along the way. 🥕
Recipe At a Glance
| Details | Info |
|---|---|
| Prep time | 25 minutes |
| Bake time | 35 minutes |
| Total time | 1 hour, plus cooling |
| Servings | 12 slices |
| Difficulty | Easy |
| Best for | Birthdays, potlucks, Sunday baking |
What You’ll Need
For the cake:
- 2 cups all-purpose flour
- 2 tsp baking soda
- 1 tsp baking powder
- 1/2 tsp salt
- 2 tsp ground cinnamon
- 1/4 tsp ground nutmeg
- 4 large eggs
- 1 1/4 cups vegetable oil
- 1 1/2 cups granulated sugar
- 1/2 cup brown sugar, packed
- 3 cups grated carrots (about 4-5 medium carrots)
- 1 cup crushed pineapple, drained
- 1 cup chopped walnuts (optional)
- 1 cup shredded coconut (optional)
For the cream cheese frosting:
- 16 oz cream cheese, softened
- 1/2 cup unsalted butter, softened
- 4 cups powdered sugar
- 1 tsp vanilla extract
- Pinch of salt
Tools You’ll Need
- Two 9-inch round cake pans (or one 9×13 pan)
- Box grater or food processor for the carrots
- Stand mixer or hand mixer
- Large mixing bowl
- Rubber spatula
- Cooling rack

How to Make It
Step 1: Prep your pans and oven
Preheat your oven to 350°F. Grease your cake pans and line the bottoms with parchment paper.
This little step saves you from the heartbreak of a cake stuck to the pan.
Step 2: Mix the dry ingredients
In a medium bowl, whisk together the flour, baking soda, baking powder, salt, cinnamon, and nutmeg.
Set this aside.
Step 3: Whisk the wet ingredients
In a large bowl, whisk the eggs until they’re pale and slightly frothy.
Add the vegetable oil, granulated sugar, and brown sugar. Whisk until fully combined.
Step 4: Bring it together
Add the dry ingredients to the wet ingredients in two batches, folding gently with a spatula.
Don’t overmix here. Overmixing is the number one reason carrot cakes turn out dense instead of fluffy.
Step 5: Fold in the good stuff
Gently fold in the grated carrots, drained pineapple, walnuts, and coconut (if using).
The batter will look thick. That’s exactly what you want.
Step 6: Bake
Divide the batter evenly between your prepared pans.
Bake for 30-35 minutes, or until a toothpick inserted in the center comes out clean.
Step 7: Cool completely
Let the cakes cool in the pans for 10 minutes, then transfer to a wire rack to cool fully.
This part takes patience. Frosting a warm cake is basically a disaster waiting to happen.
Step 8: Make the frosting
Beat the cream cheese and butter together until smooth and creamy.
Add the powdered sugar one cup at a time, mixing well between additions. Add the vanilla and salt.
Beat until light and fluffy, about 2-3 minutes.
Step 9: Frost and serve
Once the cakes are completely cool, frost the top of one layer, stack the second layer on top, then frost the top and sides.
Slice, serve, and watch it disappear.
Pro Tips
- Grate your own carrots. Pre-shredded bagged carrots are drier and won’t give you that moist texture this cake is known for.
- Squeeze out the pineapple. Extra liquid in the batter leads to a soggy cake. Press it in a fine mesh strainer or between paper towels first.
- Room temperature everything. Cold cream cheese and butter will leave lumps in your frosting no matter how long you beat it.
- Toast your walnuts first. Five minutes in a dry pan brings out so much more flavor than raw walnuts.
- Level your cakes. If the tops dome slightly, slice them flat with a serrated knife before stacking. It makes frosting way easier.
Substitutions and Variations
Not everyone eats the same way, and this cake is flexible enough to handle it.
For gluten-free: Swap the all-purpose flour for a 1:1 gluten-free baking blend.
For dairy-free: Use a plant-based cream cheese and butter alternative for the frosting.
For less sugar: Cut the granulated sugar down to 1 cup. You’ll lose a little sweetness, but the carrots and pineapple add plenty on their own.
No nuts? Just leave the walnuts out entirely. The cake holds up fine without them.
Want a twist? Add 1/2 cup golden raisins or a handful of shredded zucchini alongside the carrots.
Make-Ahead Tips
You can bake the cake layers up to two days ahead. Wrap them tightly in plastic wrap and store at room temperature.
The frosting can be made a day in advance too. Keep it in the fridge, then let it soften at room temperature for about 20 minutes before using.
You can also freeze unfrosted cake layers for up to three months. Just thaw overnight in the fridge before frosting.
Additional Details
Nutritional Breakdown (per slice, approximate)
| Nutrient | Amount |
|---|---|
| Calories | 520 |
| Fat | 28g |
| Carbs | 63g |
| Protein | 6g |
| Sugar | 46g |
Meal Pairing Ideas
This cake pairs well with:
- A hot cup of coffee or chai
- Vanilla bean ice cream on the side
- A glass of cold milk (classic, but it works)
Time-Saving Tip
Grate the carrots and drain the pineapple the night before. Store both in the fridge so the morning of baking, you’re just mixing and pouring.
Leftovers and Storage
Store leftover cake in an airtight container in the fridge for up to 5 days. The cream cheese frosting needs refrigeration, so don’t leave it out on the counter for long stretches.
Want to freeze slices? Wrap individual pieces tightly in plastic wrap, then foil, and freeze for up to 2 months. Thaw in the fridge overnight before eating.
FAQ
1. Can I make this as cupcakes instead?
Yes. This batter makes about 24 cupcakes. Bake at 350°F for 18-20 minutes.
2. Why did my cake sink in the middle?
This usually happens from underbaking or opening the oven door too early. Give it the full bake time and resist peeking.
3. Can I skip the pineapple?
You can, but it adds moisture and a subtle sweetness that’s hard to replace. If you skip it, add an extra tablespoon of oil to the batter.
4. Do I have to use a stand mixer for the frosting?
No, a hand mixer works just as well. It just might take a minute or two longer to get fully smooth.
5. How far in advance can I frost the cake?
You can frost it up to a day before serving. Keep it covered in the fridge and let it sit at room temperature for 20 minutes before slicing.
Wrapping Up
This carrot cake has earned its spot as a permanent fixture in my recipe box, and I think it deserves a spot in yours too.
It’s the kind of cake that turns an ordinary afternoon into something worth remembering. Give it a try this weekend.
Leave a comment below and tell me how it turned out. And if you tried any of the substitutions, I’d love to hear which ones worked best for you.