Vegetable cakes are some of my favorite things to bake, and carrot cake sits at the very top of that list. The carrots do something genuinely remarkable inside the batter, they hold moisture through the entire bake, which gives you a super moist crumb that stays tender for days. Pair that with a warm spice blend of cinnamon, ginger, nutmeg, and cloves, and you get a cake that is deeply flavorful, wonderfully moist in the middle, and topped with a rich cream cheese frosting that ties every bite together.

I made this cake for Emma's class bake sale last spring without telling any of the parents it had vegetables in it. It sold out before anything else on the table and two moms came up to me afterward asking for the recipe. When I told them it was made with carrots, they looked at me like I had just revealed a magic trick, Emma thought that was the funniest thing that had ever happened. If you love baking from scratch like I do, my cinnamon rolls from scratch are another recipe our family keeps circling back to all season long.
Jump to:
Why You'll Love This Carrot Cake
- This is an easy-to-make, made-from-scratch recipe that uses simple pantry staples you almost certainly already have on hand.
- Freshly grated carrots add natural sweetness and keep every layer moist and light, no pudding mix or box shortcuts needed.
- The batter comes together in two bowls with a whisk and a spatula. No stand mixer required for the cake itself.
- It feeds a crowd beautifully. This recipe makes a generous two-layer cake that works for birthdays, bake sales, potlucks, or a cozy weekend at home.
- The homemade cream cheese frosting takes about five minutes to make and tastes far better than anything from a can.
Ingredients for Carrot Cake
Here is everything you need to make this carrot cake from scratch, most of it is probably already in your kitchen.
What You'll Need

Freshly grated carrots - use a fine or medium box grater and grate them yourself. Pre-shredded carrots from the bag are too dry and thick. Freshly grated carrots release just enough moisture into the batter to give you that super moist crumb this recipe is known for.
Vegetable oil - this is the fat that makes the cake so tender. Unlike butter, oil stays liquid at room temperature, which is exactly why a carrot cake made with oil stays moist and light for days rather than drying out the next day.
Brown sugar and granulated sugar blend - using both together gives you depth of flavor. The brown sugar adds a subtle molasses note that works beautifully with the warm spice blend.
Cream cheese frosting ingredients - you need full-fat block cream cheese (not the spreadable kind in a tub) and real butter, both at room temperature. Cold cream cheese will leave lumps in your frosting no matter how long you mix it.
- 2 cups all-purpose flour
- 2 teaspoons baking soda
- 1 teaspoon baking powder
- ½ teaspoon salt
- 2 teaspoons ground cinnamon
- ½ teaspoon ground ginger
- ¼ teaspoon ground nutmeg
- ¼ teaspoon ground cloves
- 1 cup granulated sugar
- 1 cup packed brown sugar
- 4 large eggs, room temperature
- 1 cup vegetable oil
- ½ cup unsweetened applesauce
- 2 teaspoons vanilla extract
- 3 cups freshly grated carrots (about 4 to 5 medium carrots)
- 1 cup toasted pecans or walnuts, roughly chopped (optional)
- 16 oz full-fat block cream cheese, room temperature
- ½ cup unsalted butter, room temperature
- 4 cups powdered sugar, sifted
- 1 teaspoon vanilla extract
- Pinch of salt
See recipe card below for full measurements.
Substitutions and Variations for Carrot Cake
- Nuts: swap toasted pecans for walnuts, or leave them out entirely if you are baking for a nut-free crowd. Either way the cake holds together perfectly.
- Applesauce: replace with an equal amount of crushed pineapple (well-drained) for a slightly sweeter, tropical variation. It also keeps the cake wonderfully moist.
- Gluten-free: substitute a 1:1 gluten-free all-purpose flour blend. The texture will be slightly denser but still very good.
- Spices: swap the individual spices for 2 and a half teaspoons of pumpkin pie spice if that is what you have. It gives a similar warm, cozy flavor profile.
- Sheet cake version: instead of two 9-inch round pans, bake the batter in a 9x13 inch pan for a simple single-layer sheet cake. Reduce the baking time and check for doneness starting at 35 minutes.
This recipe has not been tested with other substitutions or variations. If you replace or add any ingredients, please let us know how it turned out in the comments below!
Equipment for Carrot Cake

- Box grater - the most important tool for this recipe. A fine or medium grater gives you soft, delicate carrot shreds that melt into the batter. No box grater? A food processor with a shredding attachment works well too, though the shreds will be slightly thicker.
- Two 9-inch round cake pans - you need two so both layers bake at the same time and come out even. Grease and line them with parchment paper so the layers release cleanly without sticking.
- Kitchen scale - measure the flour in grams for the most accurate result. Too much flour is the number one reason homemade cakes turn out dry and dense. If you do not have a scale, use the spoon-and-level method: spoon the flour into the measuring cup and level it off with a straight edge.
- Hand mixer or stand mixer - essential for the cream cheese frosting. You need to beat the cream cheese and butter together until completely smooth before adding the powdered sugar, and that takes a few minutes of real mixing power. If you are making my blueberry muffins the same weekend, you will already have it out on the counter.
- Offset spatula - makes frosting the layers and the sides of the cake much easier. A regular butter knife works in a pinch but an offset spatula gives you much more control.
How to Make Carrot Cake
Step-by-Step Directions
Step 1: Preheat your oven to 350°F (175°C). Grease two 9-inch round cake pans and line the bottoms with parchment paper circles. Set aside.
Step 2: In a large bowl, whisk together the flour, baking soda, baking powder, salt, cinnamon, ginger, nutmeg, and cloves until the mixture looks uniform with no visible clumps of spice.
Step 3: In a separate large bowl, whisk together both sugars, the eggs, vegetable oil, applesauce, and vanilla extract until the mixture is smooth and slightly thickened, about one minute.

Step 4: Pour the dry ingredients into the wet ingredients and fold gently with a spatula until just combined and no flour streaks remain. Stop folding the moment the streaks disappear, over-mixing develops too much gluten and will make the cake dense instead of tender.

Step 5: Fold in the freshly grated carrots and the chopped toasted pecans or walnuts if using. The batter will look thick and chunky. That is exactly right.
Step 6: Divide the batter evenly between the two prepared pans. The layers should look roughly equal in height. Bake at 350°F for 30 to 35 minutes, until a toothpick inserted in the center comes out clean and the top of the cake springs back lightly when you press it.
Step 7: Let the cakes cool in the pans for 10 minutes, then run a knife around the edges and turn them out onto a wire rack. Let them cool completely to room temperature before frosting. Frosting a warm cake will cause the cream cheese frosting to slide off and melt into a mess.

Step 8: To make the cream cheese frosting, beat the room-temperature cream cheese and butter together on medium speed until completely smooth and no lumps remain, about 2 to 3 minutes. Scrape down the sides of the bowl halfway through.
Step 9: Add the sifted powdered sugar one cup at a time, mixing on low speed after each addition until just combined, then increase to medium speed and beat until the frosting is smooth, light, and holds its shape. Add the vanilla and a pinch of salt, and mix for another 30 seconds until fully incorporated.
Step 10: Place the first cake layer on your serving plate or cake board. Spread a generous layer of cream cheese frosting over the top, going all the way to the edges. Set the second layer on top, press it down gently, and frost the top and sides of the cake. Press a small handful of chopped toasted pecans around the sides or on top if you like.
Once the cake is sliced and plated, it pairs beautifully with a cup of coffee, my chocolate peanut butter no-bake cookies are a great treat to serve alongside if you are putting together a dessert spread.
Expert Tips for Carrot Cake
- Grate the carrots fresh, right before mixing. Pre-shredded carrots from the store are too dry and will not give you the same moisture in the final cake. Grate them yourself on a box grater and use them immediately. Three cups of grated carrot sounds like a lot, but it shrinks right into the batter as it bakes.
- Do not skip cooling the layers completely. This is the step most people rush and it always causes problems. Cream cheese frosting melts on contact with a warm cake. Give the layers at least one full hour at room temperature, or 20 minutes in the fridge if you are in a hurry, before you start frosting.
- Measure the flour in grams using a kitchen scale. Flour packed into a measuring cup is one of the most common reasons a from-scratch carrot cake batter turns out heavy and dry. Weigh it out for a consistently light and fluffy cake every time. If you do not have a scale, spoon the flour into the cup and level it off with a straight edge. Never scoop directly from the bag.
- Use room-temperature eggs. Cold eggs do not incorporate as evenly into the oil-based batter. Room-temperature eggs mix in smoothly and help the from-scratch carrot cake batter come together without curdling or separating.
Storage Tips for Carrot Cake
Because this cake is frosted with cream cheese frosting, it needs to be stored in the refrigerator. Cover the cake tightly and keep it in the fridge for up to 5 days. The cake actually tastes even better on day two once the flavors have had time to settle together. Let individual slices sit at room temperature for 15 to 20 minutes before serving if you prefer it a little softer. This cake also freezes well unfrosted, wrap the cooled layers tightly in plastic wrap and store them in the freezer for up to 2 months. Thaw overnight in the fridge before frosting.
FAQ about Carrot Cake
What is the secret to a good carrot cake?
The two biggest factors are freshly grated carrots and vegetable oil. Freshly grated carrots release moisture directly into the batter as the cake bakes, which gives you that super moist crumb this classic carrot cake recipe is known for. Oil, unlike butter, stays liquid at room temperature and keeps the texture tender for days.
Why is it called divorce carrot cake?
The "divorce cake" story is a popular internet legend tied to a Southern recipe where the carrot cake was supposedly so good, or so controversial in its recipe origins, that it caused conflict between people who both claimed it. There is no single verified origin, but the name has stuck as a playful way to describe a carrot cake so good people will fight over the last slice.
What are common carrot cake mistakes?
The most common mistakes are over-mixing the batter, using pre-shredded carrots instead of freshly grated, and frosting the cake while it is still warm. Over-mixing develops too much gluten and makes the texture tough. Pre-shredded carrots are too dry and thick to melt into the batter properly. And frosting a warm cake turns even the best cream cheese frosting into a runny mess.
What is in Costco carrot cake?
Costco's carrot cake is a well-known bakery item that typically includes a spiced carrot cake base with cream cheese frosting and a generous amount of walnuts. The exact from-scratch carrot cake recipe ingredients are proprietary, but it is notably very dense and very sweet. This homemade version gives you more control over the spice level, sweetness, and the quality of the cream cheese frosting, and in my honest opinion, it tastes better.
Related
Looking for other recipes like this? Try these:
Pairing
These are my favorite dishes to serve with Carrot Cake:
📖 Recipe

The Best Homemade Carrot Cake with Cream Cheese Frosting
Ingredients
Equipment
Method
- In a large bowl, whisk together the all-purpose flour, baking soda, baking powder, salt, ground cinnamon, ground ginger, ground nutmeg, and ground cloves. Make sure it looks uniform-you want those warm spices in every single bite.
- In a large bowl, whisk together the all-purpose flour, baking soda, baking powder, salt, ground cinnamon, ground ginger, ground nutmeg, and ground cloves. Make sure it looks uniform-you want those warm spices in every single bite.
- In a separate bowl, whisk the granulated sugar, packed brown sugar, eggs, vegetable oil, unsweetened applesauce, and vanilla extract. Whisk for about a minute until it's nice and smooth. This is where the magic moisture starts!
- Now, gently pour the dry ingredients into the wet ones. Using your spatula, fold them together just until the flour streaks disappear. Be gentle-we want a tender cake, not a tough one!
- Fold in those beautiful freshly grated carrots and the toasted pecans. The batter will look thick and chunky, and that's exactly how it should be! It reminds me so much of the hearty cakes my grandmother used to make.
- Divide the batter between your pans and bake for 30 to 35 minutes. When a toothpick comes out clean, they're done! Your kitchen is going to smell like heaven right about now.
- Let the cakes cool in the pans for 10 minutes, then turn them onto a wire cooling rack. They must be completely cool before frosting, or the cream cheese will melt away. Use this time to grab a cup of tea!
- Using your electric hand mixer, beat the full-fat block cream cheese and unsalted butter until perfectly smooth. No lumps allowed here! It takes about 2 to 3 minutes of mixing power.
- Gradually add the powdered sugar, vanilla extract, and a pinch of salt. Beat until it's light, fluffy, and holds its shape. Try not to eat it all straight from the bowl-I know it's tempting!
- Place one layer on your plate, spread a thick layer of frosting, and top with the second cake. Frost the top and sides, and if you're feeling fancy, press a few extra pecans onto the sides. You did it!
Nutrition
Notes
- Storage: Since we have that delicious cream cheese frosting, please store your cake in the fridge! It stays fresh and moist for up to 5 days.
- Make Ahead: This cake actually tastes better on day two! The spices really settle in overnight.
- Nut-Free: Simply leave out the pecans if you're baking for friends with allergies, it's just as tasty without them.
- Pro Tip: Always grate your carrots fresh. The pre-bagged ones are just too dry for this recipe!












