{"@context":"https://schema.org","@type":"Recipe","url":"https://trevorfarias.com/recipes/carrot-cake","markdownUrl":"https://trevorfarias.com/recipes/carrot-cake/recipe.md","name":"The Best Carrot Cake Recipe with Cream Cheese Frosting","description":"The best carrot cake recipe: incredibly moist, warmly spiced, packed with fresh carrots and toasted pecans, and covered in tangy cream cheese frosting. Two 9-inch layers, printable card.","summary":"The best carrot cake is made with oil rather than butter for a moist crumb that stays soft for days, three cups of finely grated fresh carrots, a mix of brown and white sugar, cinnamon, nutmeg and ginger, and toasted pecans. Bake two 9-inch layers at 350°F for 30 to 35 minutes and frost with a simple cream cheese frosting made from cream cheese, butter, powdered sugar and vanilla.","author":"Trevor","publisher":"Sunny Side Kitchen","datePublished":"2026-09-05","dateModified":"2026-09-05","category":"Cakes","cuisine":"American","keywords":["carrot cake recipe","best carrot cake recipe","moist carrot cake","carrot cake with cream cheese frosting","homemade carrot cake","easy carrot cake","carrot layer cake","cream cheese frosting recipe"],"prepTime":"PT30M","cookTime":"PT35M","totalTime":"PT2H","yield":"One 2-layer 9-inch cake (16 slices)","servings":16,"ingredientGroups":[{"name":"For the cake","ingredients":[{"amount":"2 1/2","unit":"cups","name":"all-purpose flour","note":"315 g, spooned and leveled","text":"2 1/2 cups all-purpose flour, 315 g, spooned and leveled"},{"amount":"2","unit":"teaspoons","name":"baking soda","text":"2 teaspoons baking soda"},{"amount":"1/2","unit":"teaspoon","name":"baking powder","text":"1/2 teaspoon baking powder"},{"amount":"1","unit":"teaspoon","name":"fine salt","text":"1 teaspoon fine salt"},{"amount":"2","unit":"teaspoons","name":"ground cinnamon","text":"2 teaspoons ground cinnamon"},{"amount":"1/2","unit":"teaspoon","name":"ground nutmeg","text":"1/2 teaspoon ground nutmeg"},{"amount":"1/4","unit":"teaspoon","name":"ground ginger","text":"1/4 teaspoon ground ginger"},{"amount":"1 1/4","unit":"cups","name":"vegetable oil","note":"300 ml","text":"1 1/4 cups vegetable oil, 300 ml"},{"amount":"1","unit":"cup","name":"granulated sugar","note":"200 g","text":"1 cup granulated sugar, 200 g"},{"amount":"1","unit":"cup","name":"packed light brown sugar","note":"200 g","text":"1 cup packed light brown sugar, 200 g"},{"amount":"4","name":"large eggs","note":"at room temperature","text":"4 large eggs, at room temperature"},{"amount":"2","unit":"teaspoons","name":"pure vanilla extract","text":"2 teaspoons pure vanilla extract"},{"amount":"3","unit":"cups","name":"finely grated carrots","note":"about 300 g, from 4 to 5 medium carrots","text":"3 cups finely grated carrots, about 300 g, from 4 to 5 medium carrots"},{"amount":"1","unit":"cup","name":"chopped pecans or walnuts","note":"115 g, toasted; optional","text":"1 cup chopped pecans or walnuts, 115 g, toasted; optional"},{"amount":"1/2","unit":"cup","name":"crushed pineapple","note":"very well drained; optional","text":"1/2 cup crushed pineapple, very well drained; optional"}]},{"name":"For the cream cheese frosting","ingredients":[{"amount":"16","unit":"ounces","name":"full-fat brick cream cheese","note":"452 g, slightly softened","text":"16 ounces full-fat brick cream cheese, 452 g, slightly softened"},{"amount":"1/2","unit":"cup","name":"unsalted butter","note":"113 g, softened","text":"1/2 cup unsalted butter, 113 g, softened"},{"amount":"4","unit":"cups","name":"powdered sugar","note":"480 g, sifted","text":"4 cups powdered sugar, 480 g, sifted"},{"amount":"2","unit":"teaspoons","name":"pure vanilla extract","text":"2 teaspoons pure vanilla extract"},{"amount":"1/4","unit":"teaspoon","name":"fine salt","text":"1/4 teaspoon fine salt"},{"amount":"1/2","unit":"cup","name":"chopped toasted pecans","note":"for decorating; optional","text":"1/2 cup chopped toasted pecans, for decorating; optional"}]}],"steps":[{"step":1,"name":"Prepare the pans","text":"Preheat the oven to 350°F (175°C). Grease two 9-inch round cake pans, line the bottoms with parchment paper, and grease the parchment.","tip":null},{"step":2,"name":"Whisk the dry ingredients","text":"In a large bowl, whisk together the flour, baking soda, baking powder, salt, cinnamon, nutmeg and ginger.","tip":null},{"step":3,"name":"Whisk the wet ingredients","text":"In another large bowl, whisk the oil, granulated sugar and brown sugar until combined. Add the eggs one at a time, whisking well after each, then whisk in the vanilla. The mixture should look smooth and glossy.","tip":null},{"step":4,"name":"Combine and fold in the carrots","text":"Pour the dry ingredients into the wet and whisk just until no flour streaks remain. Switch to a spatula and fold in the grated carrots, the nuts and the pineapple, if using.","tip":"The batter will be fairly thick and speckled with carrot. Do not overmix."},{"step":5,"name":"Bake","text":"Divide the batter evenly between the pans and smooth the tops. Bake for 30 to 35 minutes, until the cakes are golden, spring back when lightly pressed, and a toothpick inserted in the center comes out clean.","tip":null},{"step":6,"name":"Cool completely","text":"Cool the cakes in their pans for 15 minutes, then run a knife around the edges, turn them out onto a wire rack, peel off the parchment, and cool completely, about 1 hour. Warm cake will melt the frosting.","tip":null},{"step":7,"name":"Make the frosting","text":"Beat the butter with an electric mixer until smooth, about 1 minute. Add the cream cheese and beat just until combined and smooth, about 30 seconds. Add the powdered sugar, vanilla and salt and beat on low until incorporated, then on medium for 1 minute until fluffy. If the frosting is soft, refrigerate it for 20 minutes.","tip":null},{"step":8,"name":"Assemble and frost","text":"Place one layer on a serving plate. Spread about 1 cup of frosting evenly over the top. Add the second layer, then frost the top and sides with the remaining frosting. Press chopped pecans around the base or sprinkle over the top, if you like.","tip":null},{"step":9,"name":"Chill briefly and serve","text":"Refrigerate the cake for at least 30 minutes to set the frosting, which makes it far easier to slice cleanly. Let slices sit for 15 minutes before serving for the best texture.","tip":null}],"equipment":["Two 9-inch round cake pans","Parchment paper","Box grater or food processor","Two large mixing bowls","Whisk and spatula","Electric hand mixer or stand mixer","Wire cooling rack","Offset spatula for frosting"],"notes":["Grate the carrots finely and freshly. Bagged shredded carrots are too dry and coarse.","Make sure the layers are completely cool before frosting or the frosting will slide off.","Use brick-style cream cheese, softened only slightly, for frosting that holds its shape."],"storage":["Store the frosted cake covered in the refrigerator for up to 5 days. Let slices sit out for 15 to 20 minutes before serving.","Unfrosted layers keep wrapped at room temperature for 2 days or frozen for up to 3 months.","Frosted slices can be frozen on a tray until firm, then wrapped, for up to 2 months. Thaw overnight in the refrigerator."],"variations":["Raisins: fold in 3/4 cup of raisins or golden raisins with the carrots.","Coconut: add 3/4 cup sweetened shredded coconut for a Southern-style carrot cake.","Brown butter frosting: brown the 1/2 cup of butter, chill until solid, then proceed with the frosting recipe for a nutty depth.","Nut-free: leave out the nuts entirely; no other changes are needed."],"faqs":[{"question":"Why is oil better than butter in carrot cake?","answer":"Oil stays liquid at room temperature, so the cake stays moist and soft for days, while butter firms up as it cools and makes the crumb tighter and drier. Carrot cake gets its flavor from the carrots, spices and brown sugar rather than from butter, so nothing is lost."},{"question":"Can I use pre-shredded carrots from the store?","answer":"It is best not to. Bagged shredded carrots are thick and dry and stay crunchy in the finished cake. Fresh carrots grated on the small holes of a box grater melt into the crumb and add moisture."},{"question":"Why is my cream cheese frosting runny?","answer":"The cream cheese was too warm, or it was beaten too long, or it was the whipped tub kind rather than the brick. Use brick cream cheese softened for only about 20 minutes, beat it just until smooth, and chill the frosting for 20 to 30 minutes if it is still soft."},{"question":"Can I make carrot cake as a sheet cake?","answer":"Yes. Pour the batter into a greased 9x13-inch pan and bake at 350°F for 40 to 45 minutes. Cool completely in the pan and frost right in the pan. It is the easiest way to serve a crowd."},{"question":"Does carrot cake need to be refrigerated?","answer":"Once frosted, yes, because the cream cheese frosting is perishable. It will keep for up to 5 days covered in the refrigerator. Unfrosted layers can sit at room temperature for 2 days."},{"question":"Can I make this carrot cake gluten-free?","answer":"Yes. Replace the all-purpose flour with an equal weight of a measure-for-measure gluten-free flour blend that contains xanthan gum. The texture is very close because carrot cake does not rely heavily on gluten for structure."}],"nutritionPerServing":{"calories":590,"fatGrams":33,"saturatedFatGrams":10,"carbohydrateGrams":70,"fiberGrams":2,"sugarGrams":53,"proteinGrams":6,"sodiumMilligrams":400,"cholesterolMilligrams":85}}