Cakes & Cupcakes
Carrot Cake with Cream Cheese Frosting
My Favorite Cake in the Entire World
I am going to say something that might sound dramatic, but I mean every word: this carrot cake is the single best cake I have ever made. I know that is a bold claim from someone who has spent years developing and testing cake recipes, but this one earned the title honestly. It is moist beyond belief, warmly spiced, loaded with texture, and crowned with a cream cheese frosting so good that I have to stop myself from eating it straight from the bowl with a spoon.
Carrot cake has always been a bit of an underdog in the dessert world. It does not have the glamour of a towering chocolate cake or the nostalgia of a classic vanilla birthday cake. What it does have is depth — layers of flavor and texture that reveal themselves with every bite. The warm cinnamon and nutmeg, the subtle sweetness of the carrots and pineapple, the crunch of toasted pecans, the slight chewiness from the coconut — it all comes together in a way that is infinitely more interesting than most cakes.
I developed this recipe over the course of an entire autumn, baking at least two carrot cakes a week for nearly three months straight. Each iteration brought me closer to the version I had been imagining — one that was moist but not heavy, richly spiced but not overwhelming, and loaded with interesting textures without feeling cluttered. My neighbors were thrilled. My waistline was less so. But the result was worth every single test batch: a recipe that is foolproof, endlessly delicious, and produces a cake that looks and tastes like it belongs in a professional bakery window.
What Makes This Carrot Cake Exceptional
The Pineapple Is the Secret Weapon
I know pineapple in carrot cake is controversial. Some purists insist it does not belong, and I respect that position even though I completely disagree with it. Crushed pineapple adds a remarkable amount of moisture to the cake without making it heavy or soggy. It also introduces a very subtle tropical sweetness that enhances the carrots without calling attention to itself. Most people who eat this cake have no idea there is pineapple in it — they just know it is incredibly moist.
The key is to drain the pineapple thoroughly. I pour it into a fine-mesh strainer and press it firmly with the back of a spoon to squeeze out as much liquid as possible. Excess liquid will make the batter too wet and can lead to a sunken cake.
Oil-Based for Maximum Moisture
Like my red velvet cupcakes, this carrot cake uses oil instead of butter. Oil keeps the cake moist and tender for days, while butter-based cakes tend to dry out more quickly as they cool. The neutral flavor of vegetable oil also lets the spices, carrots, and other flavors shine through without competing.

Finely Grated Carrots Are Essential
The way you grate your carrots matters more than you might think. Finely grated carrots melt into the batter during baking, creating a consistently moist texture throughout. Coarsely shredded carrots, on the other hand, can create pockets of stringy vegetable that disrupt the cake’s crumb. I use the finest holes on my box grater, which produces almost a carrot pulp. If you have a food processor with a fine shredding disc, even better — it makes the job much faster.
The Spice Blend Is Intentional
I keep the spices relatively simple here — cinnamon and nutmeg — because I want them to complement the other flavors rather than dominate. Some carrot cake recipes throw in cloves, allspice, ginger, and everything else in the spice cabinet. In my testing, less was more. The cinnamon provides warmth and familiarity, the nutmeg adds an earthy depth, and together they create a spice profile that is cozy without being overwhelming.
Perfecting Every Layer
Getting Level Cake Layers
Nothing is more frustrating than trying to stack two domed cake layers. To prevent doming, wrap damp cake strips around the outside of your pans before baking. You can buy these commercially, or make your own by soaking strips of old towels in water, wringing them out, and securing them around the pans with safety pins. The moisture keeps the edges of the cake from setting too quickly, allowing the batter to rise more evenly.
If your layers still dome slightly, no problem. Once they are completely cool, use a long serrated knife to level the tops. Place one hand flat on top of the cake and saw horizontally with slow, steady strokes. Save the trimmed pieces — they make excellent snacking material.
The Cream Cheese Frosting
This frosting is the same base recipe I use for my red velvet cupcakes, and it is absolutely perfect with carrot cake. The tang of the cream cheese cuts through the sweetness of the cake and creates a beautiful balance. A few things to keep in mind:
Temperature is everything. Your cream cheese and butter must be at room temperature — not cold, not warm, just soft enough to yield easily when pressed. Cold cream cheese creates lumps that are nearly impossible to beat out, and overly warm cream cheese makes runny frosting.
Beat before you sweeten. Always beat the cream cheese and butter together until completely smooth before adding any powdered sugar. This step is what gives you that luxuriously creamy texture that melts on your tongue.
Sift the powdered sugar. This is not optional. Powdered sugar clumps are the enemy of smooth frosting, and sifting is the easiest way to prevent them.
Assembling the Cake
I like to do a crumb coat before the final frost. Spread a thin layer of frosting over the entire cake, then refrigerate for 15 minutes. This seals in the crumbs and gives you a clean surface for the final coat. Then apply the remaining frosting generously, using an offset spatula to smooth the top and sides.
For decoration, I press chopped pecans around the lower edge of the cake. It looks beautiful and adds a textural element that I love. You can also pipe frosting rosettes around the top edge, or simply leave it with a rustic swirl pattern.
Variations Worth Trying
Carrot cake cupcakes: Divide the batter among 24 lined muffin cups and bake for 18-22 minutes. These are perfect for parties where you do not want to fuss with slicing a cake. Top each one with a generous swirl of cream cheese frosting.
Without coconut: Simply omit the coconut if you are not a fan. The cake is still phenomenal without it, and you will not need to adjust anything else.
Raisin lovers: Add 1/2 cup of golden raisins that have been soaked in warm water for 10 minutes and drained. They add chewy sweetness throughout the cake.
Cream cheese filling: Instead of frosting between the layers, spread a layer of sweetened cream cheese (cream cheese, a little sugar, and vanilla) for a lighter touch. Then frost only the outside of the cake.
Spiced version: For a more complex spice profile, add 1/4 teaspoon each of ground ginger, allspice, and cloves to the flour mixture. This creates a deeper, more aromatic cake that is especially wonderful during the autumn and winter months.
If you are new to layer cakes, this is an excellent recipe to learn on. The oil-based batter is very forgiving — it does not require any tricky creaming steps or temperature-sensitive techniques. The layers bake evenly, they are sturdy enough to stack without crumbling, and the cream cheese frosting is simple to spread. If you can stir ingredients in a bowl and operate an oven, you can make this cake.
For another cake that pairs beautifully with cream cheese frosting, do not miss my banana bread — it is a different experience entirely, but equally wonderful.
Storage and Make-Ahead Instructions
Carrot cake is one of the best make-ahead desserts because it actually improves with time. The flavors meld and the cake becomes even moister as it sits.
Room temperature: Because of the cream cheese frosting, this cake should not sit out for more than 2 hours. Plan accordingly for buffets and parties.
Refrigerator: Store the frosted cake in the refrigerator, loosely covered with plastic wrap or under a cake dome, for up to 5 days. Bring it to room temperature for 30 minutes before serving for the best flavor and texture.
Freezer: The unfrosted cake layers freeze beautifully. Wrap each layer tightly in plastic wrap, then in foil, and freeze for up to 3 months. Thaw overnight in the refrigerator and frost the day you plan to serve. I do this regularly for holiday gatherings — it takes the pressure off the day of the event.
Troubleshooting Your Carrot Cake
Cake is too dense: This usually means the batter was overmixed or the baking soda was old. Baking soda loses its leavening power over time, so if yours has been in the pantry for more than six months, replace it.
Frosting is grainy: The cream cheese was either too cold or you added the powdered sugar too quickly. Next time, make sure the cream cheese is fully softened and add the sugar gradually, beating well between additions.
Cake sank in the middle: Likely caused by too much liquid (undrained pineapple is the usual culprit) or opening the oven door too early. Make sure to drain that pineapple thoroughly and resist peeking during the first 25 minutes of baking.
Layers stuck to the pan: Grease thoroughly, use parchment paper on the bottom, and let the cakes cool in the pans for a full 10 minutes before inverting. The brief cooling period allows the cake to contract slightly from the sides of the pan.
Carrots are visible and stringy: Your carrots were grated too coarsely. Use the finest holes on your grater or the fine disc on a food processor. Finely grated carrots virtually disappear into the crumb during baking, creating uniform moisture without visible vegetable shreds.
Essential Equipment and Preparation Tips
Grating the Carrots Efficiently
If you are grating five or six carrots by hand on a box grater, your arm is going to get tired. I highly recommend using a food processor with the fine shredding disc — it processes all the carrots in about 30 seconds and produces perfectly uniform shreds. If you are using a box grater, the finest holes give the best texture, but the medium holes work in a pinch. Just avoid large, coarse shreds, as they create a stringy texture in the finished cake.
Draining the Pineapple Properly
Inadequately drained pineapple is the number one cause of soggy carrot cake. Open the can, pour the pineapple into a fine-mesh strainer set over a bowl, and press firmly with the back of a spoon to extract as much juice as possible. I let it drain for at least 5 minutes, pressing occasionally. Save the juice — it makes a wonderful addition to smoothies or cocktails.
Toasting the Pecans
Raw pecans work in this cake, but toasted pecans are transcendently better. Spread them on a baking sheet in a single layer and toast at 350°F for 6-8 minutes, shaking the pan once halfway through. They should be fragrant and a shade darker. Let them cool completely before chopping and adding to the batter. Toasting intensifies their flavor, removes any raw bitterness, and gives them a crunchier texture that holds up beautifully in the moist cake.
Choosing the Right Pans
Two 9-inch round pans are ideal for this recipe. I recommend light-colored aluminum pans, which conduct heat evenly and produce a golden exterior without overbrowning. If you use dark nonstick pans, reduce the oven temperature by 25°F. And always, always use parchment paper on the bottom — carrot cake is notoriously sticky, and parchment makes unmolding effortless.
This Cake Brings People Together
There is something about carrot cake that cuts across all preferences. People who claim they do not like cake will eat a slice of this. People who are skeptical about vegetables in dessert will come back for seconds. I have seen it happen more times than I can count, and it never gets old.
This recipe represents everything I love about home baking — it is generous, it is warm, it rewards patience and care, and it creates moments of genuine happiness around the table. There is a generosity to carrot cake — the abundance of carrots, the handful of pecans, the shower of coconut, the lavish cream cheese frosting — that makes it feel like a celebration even on an ordinary day. Whether you bake it for a birthday, a holiday dinner, or just a Saturday afternoon because you feel like making something special, it will not let you down.
If you love the cream cheese frosting as much as I do, you should definitely try my pound cake as a base for it — spread a thick layer on top of a slice of warm pound cake and tell me it is not one of the best things you have ever eaten.

Never Miss a Sweet Recipe
Join 5,000+ home bakers and get new recipes straight to your inbox.
Ingredients
Carrot Cake
Cream Cheese Frosting
Instructions
- 1
Prepare the Pans
Preheat your oven to 350°F (175°C). Grease two 9-inch round cake pans with butter, dust with flour, and line the bottoms with parchment paper rounds. This ensures the cakes release cleanly every time.
- 2
Whisk the Dry Ingredients
In a medium bowl, whisk together the flour, baking soda, cinnamon, nutmeg, and salt until evenly distributed. Set aside.
- 3
Mix the Wet Ingredients
In a large mixing bowl, whisk together the sugar and vegetable oil until combined. Add the eggs one at a time, beating well after each addition, then stir in the vanilla extract.
- 4
Combine and Fold In the Add-Ins
Add the flour mixture to the wet ingredients and stir until just combined. Fold in the grated carrots, drained pineapple, chopped pecans, and shredded coconut until evenly distributed throughout the batter.
- 5
Bake the Cake Layers
Divide the batter evenly between the two prepared pans. Bake for 30-35 minutes, or until a toothpick inserted in the center comes out clean. Let the cakes cool in the pans for 10 minutes, then invert onto wire racks to cool completely — at least 1 hour.
- 6
Make the Cream Cheese Frosting
Beat the softened cream cheese and butter with a stand mixer or hand mixer on medium speed until smooth and creamy, about 3 minutes. Add the sifted powdered sugar one cup at a time, mixing on low after each addition. Add the vanilla and salt, then beat on medium-high for 1-2 minutes until light and fluffy.
- 7
Assemble the Cake
Place one cake layer on a serving plate or cake board. Spread about 1 cup of frosting evenly over the top. Place the second layer on top and frost the top and sides of the entire cake. Press chopped pecans around the bottom edge for a classic finish. Refrigerate for 30 minutes before slicing.
Nutrition Information
Per serving (serves 14). Values are approximate.
| Calories | 410 calories |
| Total Fat | 22g |
| Saturated Fat | 8g |
| Carbohydrates | 50g |
| Sugar | 38g |
| Protein | 5g |
| Sodium | 320mg |
| Fiber | 1.5g |
* Percent Daily Values are based on a 2,000 calorie diet. Your daily values may be higher or lower depending on your calorie needs. Nutritional information is an estimate and may vary.
Frequently Asked Questions
Do I have to use pineapple in carrot cake?
No, the pineapple is optional but highly recommended. It adds moisture and a subtle sweetness that makes the cake incredibly tender. You can leave it out without adjusting anything else.
Can I make this as a sheet cake instead?
Yes. Pour the batter into a greased 9x13-inch pan and bake for 35-40 minutes. Frost the top only once cooled. This is actually my preferred method when I am feeding a crowd.
How do I grate the carrots?
Use the fine holes on a box grater or the shredding disc of a food processor. Finely grated carrots blend seamlessly into the batter and create the best texture. Avoid large, chunky shreds.
Can I make this cake ahead of time?
Yes. The frosted cake keeps in the refrigerator for up to 5 days. You can also freeze the unfrosted layers for up to 3 months. Thaw overnight in the fridge, then frost before serving.
Reader Reviews
Based on 198 reviews