Good food brings people together in ways words sometimes cannot. When I bake this carrot cake, the kitchen fills with the warm, familiar smell of cinnamon and brown sugar, and the house feels like it will hold every story we tell that day. I picture the kids sneaking a crumb, neighbors arriving with a loaf of bread, and my partner slicing a generous wedge while we all stand around the counter, cups of coffee in hand. That simple, everyday ritual a shared dessert, a shared moment is the heart of comfort cooking.
This recipe feels like home. It balances tender, scratch-made cake with a tangy cream cheese frosting that always calls for a second slice. I love how the grated carrots add moisture and texture while crushed pineapple brings a quiet brightness that keeps each bite from feeling heavy. Walnuts add crunch, but they remain optional so you can make this cake for everyone at the table. If you like classic desserts and reliable baking that doesn’t require fuss, you’ll appreciate how this Carrot Cake comes together.
At DishGrub, we test recipes until they work in real kitchens not just under perfect studio lights. We focus on cozy, practical recipes that fit busy lives: straightforward steps, dependable ingredients, and tips that stop small mistakes before they start. Our readers often tell us they return to these recipes for gatherings, weeknight treats, and celebration cakes alike. If you wander through our site, you’ll find other tried-and-true favorites like our New York cheesecake guide that shows the same careful testing and friendly tips we use here: our New York cheesecake guide. We write for home cooks who want food that warms the table and the people around it.
Why this recipe works
Carrot cake succeeds when it stays moist without becoming soggy, carries spice without overpowering, and balances sweet frosting with a touch of tang. This recipe uses oil and grated carrots to lock in moisture so the crumb remains tender even after a day or two. Crushed pineapple adds natural sweetness and a little acidity that brightens the flavors, which helps the cream cheese frosting feel balanced rather than cloying.
The recipe calls for both baking powder and baking soda to deliver a steady rise and a fine crumb. Ground cinnamon gives familiar warmth, and salt sharpens the overall profile. The frosting blends softened cream cheese and butter with powdered sugar and vanilla for a smooth, spreadable finish. Because we tested these proportions, the frosting holds up at room temperature long enough for serving but stays soft enough to spread without tearing the cake layers.
How to prepare Carrot Cake with Cream Cheese Frosting
This method keeps steps logical and kitchen time efficient. Grate carrots ahead of time and drain the pineapple well to avoid excess liquid. Mix dry ingredients separately from wet so you don’t overwork the batter; combine them just until incorporated for a tender texture. Baking two 9-inch pans lets you assemble a classic two-layer cake with even cooking. Let the layers cool fully before frosting so the cream cheese doesn’t melt and weep.
Prepare your pans with a light coating of butter and flour or line with parchment to guarantee clean lifts. When you beat the frosting, keep the speed moderate so you don’t whip too much air into the frosting; that helps it stay stable on the cake. If you need to speed up the process on a busy day, you can bake the layers a day ahead and refrigerate them wrapped well, then frost the next day.
Ingredients
- 2 cups all-purpose flour
- 2 cups granulated sugar
- 1 cup vegetable oil
- 4 large eggs
- 2 cups grated carrots
- 1 teaspoon baking powder
- 1 teaspoon baking soda
- 1 teaspoon ground cinnamon
- 1/2 teaspoon salt
- 1/2 cup crushed pineapple, drained
- 1/2 cup chopped walnuts (optional)
- 8 ounces cream cheese, softened
- 4 cups powdered sugar
- 1/2 cup unsalted butter, softened
- 1 teaspoon vanilla extract
Instructions
-
Preheat your oven to 350°F (175°C) and grease and flour two 9-inch round cake pans.
-
In a large bowl, mix together the flour, sugar, baking powder, baking soda, cinnamon, and salt.
-
In another bowl, whisk together the oil and eggs.
-
Add the grated carrots and crushed pineapple to the wet ingredients and stir until combined.
-
Combine the wet ingredients into the dry ingredients and mix until just combined.
-
Fold in walnuts if using.
-
Divide the batter evenly between the two prepared pans.
-
Bake for 25-30 minutes, or until a toothpick inserted in the center comes out clean.
-
Let the cakes cool in the pans for 10 minutes, then turn out onto a wire rack to cool completely.
-
For the frosting, beat the cream cheese and butter in a bowl until creamy.
-
Gradually add the powdered sugar and vanilla extract, mixing until smooth.
-
Once the cakes have cooled, spread cream cheese frosting between the layers and over the top of the cake.
Serving ideas
Slice the cake into generous wedges and serve with a hot cup of coffee or black tea for an afternoon treat. For a more festive presentation, dust the top with a light sprinkle of cinnamon or finely grated orange zest that complements the pineapple. Toast the walnuts lightly before sprinkling them on top to add a toasty aroma and crisp contrast. For smaller gatherings, cut the cake into squares and plate them with a dollop of lightly sweetened whipped cream and a few fresh berries to add color and acidity.
If you host brunch, serve this cake alongside a simple fruit salad and creamy yogurt. For holiday table settings, place the cake on a pedestal and garnish with candied orange slices or extra chopped walnuts. The cake also pairs nicely with a scoop of vanilla ice cream for dessert lovers who prefer a cold element.
Storage tips
Store leftover cake in an airtight container in the refrigerator; the cream cheese frosting benefits from cool storage and the cake will keep well for 3 to 4 days. If you plan to keep it longer, slice and wrap individual pieces tightly in plastic wrap and store them in a freezer-safe container for up to 2 months. Thaw slices overnight in the refrigerator before serving, then bring them to room temperature for 20 to 30 minutes to restore tenderness.
If you need to hold the cake at room temperature for a party, keep it covered and out of direct heat or sunlight; it will be fine for several hours. When transporting, stabilize the cake on a flat surface and use a cake carrier or a deep, lidded container to prevent shifting.
DishGrub Kitchen Tips
Always measure flour correctly: spoon it into the measuring cup and level it off with the back of a knife. Packing flour too densely yields a heavy cake. Grate the carrots on the medium side of a box grater; very finely shredded carrots melt into the batter and make the cake dense, while coarsely grated carrots can leave large fibrous pieces.
Drain the crushed pineapple thoroughlyexcess juice will change the batter consistency and can make the cake gummy. Let the layers cool completely before frosting; warm cake will melt the cream cheese. When making frosting, use room-temperature cream cheese and butter so they blend smoothly without lumps. If your frosting becomes too soft, chill it briefly before using.
To check doneness beyond the toothpick test, press lightly in the center of the cake; it should spring back. Rotate pans halfway through baking if your oven runs hot on one side to ensure even coloring.
Recipe variations
Add a twist by swapping half a teaspoon of cinnamon for a mix of cinnamon and cardamom for a fragrant, slightly floral version. Replace walnuts with pecans for a regional American flavor. For a lighter cake, use half whole-wheat pastry flour and half all-purpose flour; note the texture will become a little heartier.
Make mini cakes by dividing batter into muffin tins to create carrot cake cupcakes; decrease bake time to 18–22 minutes. For a coconut-lovers’ riff, fold in 1/2 cup of sweetened shredded coconut and sprinkle a little on top of the frosting. If you want to skip nuts and pineapple, increase the carrots to 2 1/2 cups and add 1/2 cup raisins for chew and sweetness.
Common questions
Q: Can I make this cake ahead of time?
A: Yes. You can bake the layers a day ahead, cool them completely, then wrap them tightly in plastic wrap and store them at room temperature for up to 24 hours or in the refrigerator for 2 days. Chill the layers if you plan to stack and frost them later; slightly chilled layers are easier to trim and frost cleanly. If you need to prepare further in advance, freeze the wrapped layers for up to 2 months and thaw them overnight in the refrigerator before frosting.
Q: How do I avoid a soggy cake when using crushed pineapple?
A: Drain the crushed pineapple thoroughly using a fine-mesh sieve and press lightly with the back of a spoon to remove excess liquid. You can even place the drained pineapple on paper towels for a few minutes to absorb remaining moisture. The recipe balances moisture, so keeping pineapple well-drained prevents the batter from becoming too wet and the crumb from turning gummy.
Q: My frosting looks runny what went wrong and how do I fix it?
A: Runny frosting usually happens when the cream cheese or butter is too warm or you add powdered sugar too quickly. Chill the frosting in the refrigerator for 20 to 30 minutes to firm it up, then rewhip briefly at low speed. If it still seems soft after chilling, add an additional 1/2 to 1 cup of powdered sugar gradually to achieve spreadable firmness. Work quickly when frosting in warm kitchens and keep the finished cake cool if you don’t serve it right away.
Q: Can I halve the recipe to make one 9-inch cake instead of two layers?
A: Yes. Halve all ingredients to bake a single 9-inch layer and reduce bake time slightly, checking for doneness around 20 to 25 minutes. For even heating, consider using an oven thermometer so you can rely on accurate temperature when baking smaller quantities.
Conclusion
If you want a tested, reliable carrot cake that pleases a crowd and keeps the kitchen smelling like comfort, this recipe delivers. For another highly rated carrot cake approach and more baker-tested tips, see The BEST Carrot Cake Recipe.
Print
Carrot Cake with Cream Cheese Frosting
- Total Time: 50 minutes
- Yield: 10 servings
- Diet: Vegetarian
Description
A moist and tender carrot cake with tangy cream cheese frosting, perfect for sharing with family and friends.
Ingredients
- 2 cups all-purpose flour
- 2 cups granulated sugar
- 1 cup vegetable oil
- 4 large eggs
- 2 cups grated carrots
- 1 teaspoon baking powder
- 1 teaspoon baking soda
- 1 teaspoon ground cinnamon
- 1/2 teaspoon salt
- 1/2 cup crushed pineapple, drained
- 1/2 cup chopped walnuts (optional)
- 8 ounces cream cheese, softened
- 4 cups powdered sugar
- 1/2 cup unsalted butter, softened
- 1 teaspoon vanilla extract
Instructions
- Preheat your oven to 350°F (175°C) and grease and flour two 9-inch round cake pans.
- In a large bowl, mix together the flour, sugar, baking powder, baking soda, cinnamon, and salt.
- In another bowl, whisk together the oil and eggs.
- Add the grated carrots and crushed pineapple to the wet ingredients and stir until combined.
- Combine the wet ingredients into the dry ingredients and mix until just combined.
- Fold in walnuts if using.
- Divide the batter evenly between the two prepared pans.
- Bake for 25-30 minutes, or until a toothpick inserted in the center comes out clean.
- Let the cakes cool in the pans for 10 minutes, then turn out onto a wire rack to cool completely.
- For the frosting, beat the cream cheese and butter in a bowl until creamy.
- Gradually add the powdered sugar and vanilla extract, mixing until smooth.
- Once the cakes have cooled, spread cream cheese frosting between the layers and over the top of the cake.
Notes
Store leftover cake in an airtight container in the refrigerator for 3 to 4 days. The frosting can be chilled if it becomes too soft.
- Prep Time: 20 minutes
- Cook Time: 30 minutes
- Category: Dessert
- Method: Baking
- Cuisine: American

