This carrot cake is the one you’ll make again and again—deeply moist, warmly spiced, and topped with a tangy cream cheese frosting that balances every sweet bite. It works because the batter uses oil (not butter) for tenderness, crushed pineapple for extra moisture, and a precise blend of spices that never overwhelms the carrot. Baked in a 9×13-inch pan, this recipe is straightforward enough for a weekday bake and impressive enough for a celebration.
Ingredients
- 2 cups (240 g) all-purpose flour
- 2 teaspoons baking powder
- 1 ½ teaspoons baking soda
- 1 ½ teaspoons ground cinnamon
- ½ teaspoon ground nutmeg
- ½ teaspoon ground ginger
- ½ teaspoon salt
- 1 cup (200 g) granulated sugar
- ½ cup (100 g) packed light brown sugar
- 3 large eggs, at room temperature
- ¾ cup (180 ml) vegetable oil or canola oil
- ½ cup (120 g) sour cream, at room temperature
- 2 teaspoons vanilla extract
- 3 cups (about 340 g) finely grated carrots (from about 4–5 medium carrots)
- 1 cup (240 g) crushed pineapple, drained well
- 1 cup (120 g) chopped walnuts or pecans (optional)
For the cream cheese frosting:
- 8 oz (226 g) cream cheese, softened
- ½ cup (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 a 9x13x2-inch metal baking pan (or line with parchment paper) and set aside.
- In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, nutmeg, ginger, and salt. Set aside.
- In a large bowl, whisk the granulated sugar, brown sugar, eggs, oil, sour cream, and vanilla until smooth and well combined.
- Add the dry ingredients to the wet mixture and stir with a spatula until just combined—do not overmix.
- Fold in the grated carrots, drained pineapple, and nuts (if using) until evenly distributed.
- Pour the batter into the prepared pan and spread it evenly. The pan will be about two-thirds full.
- Bake for 35–45 minutes, or until a toothpick inserted in the center comes out with a few moist crumbs (not wet batter) and the top springs back when lightly pressed. If using a glass or dark metal pan, check at 30 minutes and adjust—see tips below.
- Cool the cake completely in the pan on a wire rack, about 1 ½ hours. Do not frost a warm cake.
- Make the frosting: In a large bowl, beat the cream cheese and butter until smooth and creamy. Add the powdered sugar, vanilla, and salt, and beat until fluffy, about 2 minutes.
- Spread the frosting evenly over the cooled cake. Slice and serve.
Tips
- Pan material matters: If you use a glass or dark nonstick pan, reduce the oven temperature to 325°F (165°C) and start checking for doneness at 30 minutes—these pans conduct heat differently and can brown the edges too quickly.
- Drain the pineapple well: Extra liquid will make the cake dense and soggy. Press the pineapple against a sieve to remove as much juice as possible.
- Grate your own carrots: Pre-shredded carrots are dry and coarse. Freshly grated carrots (using the large holes of a box grater) release moisture and flavor that make the cake truly phenomenal.
- Room temperature ingredients: Eggs, sour cream, and cream cheese blend more smoothly when they’re not cold, giving you a smoother batter and frosting.
Serving Suggestions
Serve the cake at room temperature for the best flavor and texture. It’s wonderful on its own, or with a scoop of vanilla ice cream or a dollop of lightly sweetened whipped cream. For a brunch or afternoon tea, cut it into squares and dust with a little extra cinnamon on top.
Variations
- Spice it up: Add ¼ teaspoon of cloves or allspice for a deeper, warmer spice profile.
- Add-ins: Swap the nuts for raisins, dried cranberries, or shredded coconut. If you add raisins, toss them in a little flour first to keep them from sinking.
- Make it a layer cake: Divide the batter between two 9-inch round pans and bake for 25–30 minutes. Double the frosting recipe if you want to fill and frost the top.
- Gluten-free: Use a 1:1 gluten-free all-purpose flour blend (one that contains xanthan gum) in place of the regular flour.
Storage and Reheating
Store frosted cake in an airtight container in the refrigerator for up to 5 days. Let it sit at room temperature for 30 minutes before serving to soften the frosting and cake. Unfrosted cake can be wrapped tightly and kept at room temperature for 2 days, or frozen for up to 3 months. To freeze, wrap the unfrosted cake in plastic wrap then foil, and thaw overnight in the fridge before frosting. If you prefer a warm slice, microwave a single piece for 10–15 seconds—but note that the frosting will melt if heated too long.
Frequently Asked Questions
Can I use a different pan? Yes. This batter works in two 9-inch round pans (bake 25–30 minutes) or a 10-cup bundt pan (bake 45–55 minutes). For any pan, fill it only two-thirds full and adjust the bake time—check earlier for a thinner layer, later for a deeper one. Always test with a toothpick.
Why is my cake dense or gummy? Overmixing the batter develops gluten, which makes the cake tough. Also, if the pineapple wasn’t drained well, the extra moisture can weigh down the crumb. Mix just until the flour disappears, and drain the pineapple thoroughly.
Can I reduce the sugar? You can cut the granulated sugar to ¾ cup and the brown sugar to ⅓ cup without drastically changing the texture, but the cake will be less sweet. Keep in mind the frosting also adds sweetness.
Do I have to use sour cream? Sour cream adds moisture and a slight tang. You can substitute plain Greek yogurt (full-fat works best) or buttermilk (use ½ cup, and reduce the oil by 2 tablespoons).
How do I know when the cake is done? Insert a toothpick into the center—it should come out with a few moist crumbs, not wet batter. The top should spring back when lightly pressed, and an instant-read thermometer inserted in the middle should read about 200–210°F (93–99°C).
Can I make this ahead of time? Yes. Bake the cake a day ahead, cool it completely, and store it unfrosted in the fridge. Frost it the next day. The cake actually gets more moist as it sits.