This sourdough discard carrot cake bakes up soft and moist with freshly shredded carrots, crushed pineapple, chopped pecans, and a warm blend of cinnamon, ginger, nutmeg, and cloves, finished with a smooth cream cheese frosting.
The batter comes together in about 25 minutes, bakes in a 9″ by 13″ pan at 350°F for 45 to 55 minutes, and works with sourdough discard or active starter straight from the refrigerator with no fermentation required.
If you enjoy cakes made with sourdough discard, here are a few more: Sourdough Vanilla Cake with Fresh Milled Flour, Sourdough Lemon Poppy Seed Pound Cake, and, for a chocolate option, Sourdough Chocolate Cake Made with Fresh Milled Flour.

This was soooo good and moist! Got lots of compliments! Thank you!!! ~ Lane
Did you know you can convert your recipes to freshly milled flour? I share how to convert your recipes and more at The Cottage Mill.

Step into The Cottage Mill: Freshly Milled Flour Guides, Recipes, and More Await!
Why You’ll Love This Recipe

Ingredients
For The Cake Batter
For the Cream Cheese Frosting

Variations & Add-Ins
Recipe Tips
Drain the pineapple well before mixing – Press the crushed pineapple gently in a fine mesh strainer to remove as much excess liquid as possible before adding it to the batter. Too much liquid from the pineapple can weigh the batter down and create a dense, wet crumb in the finished cake.
Grate the carrots finely – Finely grated carrots blend into the batter more evenly and help the cake bake through without dense or wet pockets. Pre-shredded store-bought carrots are often too coarse and too dry to give the same result as freshly grated.
Use room temperature ingredients – Butter, eggs, and cream cheese all incorporate more smoothly when fully at room temperature. Cold butter will not cream properly, cold eggs can cause the batter to look curdled, and cold cream cheese produces a lumpy frosting.
Mix the batter just until combined – Stop mixing as soon as the wet and dry ingredients come together and no dry flour remains. Overmixing develops gluten and tightens the crumb, especially with heavier add-ins like carrots, pineapple, and pecans.
Check doneness with a skewer rather than surface color – Carrot cake is naturally moist and deeply colored from the spices, so the surface can look done before the center is fully set. Insert a skewer into the thickest part of the cake and pull it when it comes out clean.
Cool the cake completely before frosting – Cream cheese frosting melts and slides on a warm cake. Let the cake cool fully in the pan on a wire rack before adding the frosting so it sets properly and stays in place once spread.
Store the frosted cake covered – Keeping the cake covered in the refrigerator helps maintain moisture in the crumb and protects the frosting texture. Let slices sit at room temperature for 15 to 20 minutes before serving for the best crumb and flavor.




Instructions
- Preheat the oven and prepare the pan – Preheat the oven to 350°F and grease a 9 by 13 inch baking pan thoroughly. Line with parchment paper if desired for easier removal and cleaner slicing once the cake has cooled.
- Mix the dry ingredients – In a medium bowl, whisk together the flour, cinnamon, ginger, salt, nutmeg, and cloves until evenly combined. Whisking the dry ingredients separately ensures the spices are distributed evenly before they hit the wet mixture.
- Cream the butter and sugar – In a large bowl or stand mixer, beat the room temperature butter and granulated sugar together for 1 to 3 minutes until light and fluffy. Proper creaming creates air pockets in the batter that help the cake bake up tender rather than dense.
- Add the eggs and wet ingredients – Beat in the eggs one at a time, mixing well after each addition. Add the sourdough discard, drained crushed pineapple, chopped pecans, and vanilla extract and mix until everything is evenly combined.
- Coat the carrots – Add the finely grated carrots to the dry ingredient bowl and toss until evenly coated in the flour and spice mixture. This step helps distribute the carrots evenly throughout the batter rather than clumping together in one area.
- Combine wet and dry mixtures – Pour the wet ingredients into the dry ingredient bowl and mix just until combined and no dry flour remains. Stop as soon as everything comes together to avoid overmixing and tightening the crumb.
- Transfer and bake – Pour the batter into the prepared pan and smooth the top into an even layer. Bake for 45 to 55 minutes until a skewer inserted into the center of the cake comes out clean with no wet batter clinging to it.
- Cool completely – Remove the pan from the oven and set it on a wire rack. Let the cake cool completely to room temperature in the pan before moving on to the frosting. This step is essential for a frosting that sets properly and stays in place.
- Make the frosting – In a large bowl or stand mixer, beat the softened cream cheese, room temperature butter, sifted powdered sugar, vanilla extract, and whipping cream or milk together until completely smooth and spreadable. Fold in the chopped pecans until evenly distributed throughout the frosting.
- Frost the cake – Spread the cream cheese frosting generously over the completely cooled cake using an offset spatula or the back of a spoon. Work from the center outward for the most even coverage and a clean finish at the edges.
- Slice and serve – Cut the cake into squares and serve at room temperature for the softest crumb and best flavor. For cleaner slices and a more set frosting, refrigerate the frosted cake for 30 minutes before cutting.

Gifting Ideas
Freezing & Storage
- Refrigerator – Store the frosted cake covered tightly in the refrigerator for up to 5 days. The cream cheese frosting requires refrigeration so do not leave the frosted cake at room temperature for more than 2 hours. Let slices sit at room temperature for 15 to 20 minutes before serving for the softest crumb and best flavor.
- Room temperature – If serving the cake the same day it is baked and frosted, it can sit covered at room temperature for up to 2 hours. For anything longer, refrigerate to keep the cream cheese frosting stable.
- Freeze unfrosted for best results – Wrap the completely cooled unfrosted cake or individual unfrosted slices tightly in plastic wrap, then in a layer of foil, and freeze for up to 2 months. Thaw overnight in the refrigerator and frost just before serving for the freshest finish.
- Freeze frosted slices – Individual frosted slices can also be frozen if needed. Place on a baking sheet and freeze until the frosting is solid, then wrap each slice tightly and transfer to a freezer-safe container for up to 1 month. Thaw in the refrigerator overnight before serving.
- Reheating or refreshing – This cake is best served at room temperature and does not need reheating. If slices have been refrigerated, allow them to rest on the counter for 15 to 20 minutes before serving to bring the crumb back to its softest texture.
FAQ
Join The Community
Want More Cozy Recipes & Seasonal Inspiration?
Get cozy, from-scratch recipes, seasonal cottage living tips, and slow living inspiration delivered straight to your inbox.
More Dessert Recipes from the Cottage

Sourdough Carrot Cake with Cream Cheese Frosting
Equipment
- 1 Large and medium mixing bowls
- 1 Whisk
- 1 Spatula
- 1 9×13 Pan
- 1 Cheese grater or food processor
- 1 Offset spatula
Ingredients
Sourdough Carrot Cake Batter
- 1⅔ cups all-purpose unbleached flour 200 grams
- 3 cups shredded carrots finely grated, 300 grams
- 2 cups granulated sugar 400 grams
- 4 large eggs room temperature, 200 grams
- 1 pint crushed pineapple drained, 567 grams
- 1 cup chopped pecans 120 grams
- 1 stick butter room temperature, 113 grams
- ½ cup sourdough discard or active starter 100 grams
- 2 teaspoons cinnamon 5 grams
- 1 teaspoon ginger 2 grams
- 1 teaspoon salt 5 grams ½ teaspoon nutmeg, 1 gram
- ¼ teaspoon cloves 0.5 grams
- 2 teaspoons vanilla extract 10 grams
Cream Cheese Frosting
- 8 ounces cream cheese fully softened, 227 grams
- 1 stick salted butter room temperature, 113 grams
- 3 cups powdered sugar sifted, 360 grams
- 2 teaspoons vanilla extract 10 grams
- 1 to 2 tablespoons whipping cream or whole milk 15 to 30 grams
- 1 cup chopped pecans 120 grams
Instructions
- Preheat the oven and prepare the pan – Preheat the oven to 350°F and grease a 9 by 13 inch baking pan thoroughly. Line with parchment paper if desired for easier removal and cleaner slicing once the cake has cooled.
- Mix the dry ingredients – In a medium bowl, whisk together the flour, cinnamon, ginger, salt, nutmeg, and cloves until evenly combined. Whisking the dry ingredients separately ensures the spices are distributed evenly before they hit the wet mixture.
- Cream the butter and sugar – In a large bowl or stand mixer, beat the room temperature butter and granulated sugar together for 1 to 3 minutes until light and fluffy. Proper creaming creates air pockets in the batter that help the cake bake up tender rather than dense.
- Add the eggs and wet ingredients – Beat in the eggs one at a time, mixing well after each addition. Add the sourdough discard, drained crushed pineapple, chopped pecans, and vanilla extract and mix until everything is evenly combined.
- Coat the carrots – Add the finely grated carrots to the dry ingredient bowl and toss until evenly coated in the flour and spice mixture. This step helps distribute the carrots evenly throughout the batter rather than clumping together in one area.
- Combine wet and dry mixtures – Pour the wet ingredients into the dry ingredient bowl and mix just until combined and no dry flour remains. Stop as soon as everything comes together to avoid overmixing and tightening the crumb.
- Transfer and bake – Pour the batter into the prepared pan and smooth the top into an even layer. Bake for 45 to 55 minutes until a skewer inserted into the center of the cake comes out clean with no wet batter clinging to it.
- Cool completely – Remove the pan from the oven and set it on a wire rack. Let the cake cool completely to room temperature in the pan before moving on to the frosting. This step is essential for a frosting that sets properly and stays in place.
- Make the frosting – In a large bowl or stand mixer, beat the softened cream cheese, room temperature butter, sifted powdered sugar, vanilla extract, and whipping cream or milk together until completely smooth and spreadable. Fold in the chopped pecans until evenly distributed throughout the frosting.
- Frost the cake – Spread the cream cheese frosting generously over the completely cooled cake using an offset spatula or the back of a spoon. Work from the center outward for the most even coverage and a clean finish at the edges.
- Slice and serve – Cut the cake into squares and serve at room temperature for the softest crumb and best flavor. For cleaner slices and a more set frosting, refrigerate the frosted cake for 30 minutes before cutting.
Notes
Nutrition
Did you make this recipe?
Rate it 5 “⭐️” below.
If you liked this recipe, I’d be so grateful if you would share it with others. Use the buttons below to share, comment, or connect.

Emily Rider
Home miller since 1999 with fresh-milled flour & sourdough experience. Sharing from-scratch recipes and traditional kitchen skills, rooted in the seasons and inspired by everyday cottage living and seasonal rhythms.

This was soooo good and moist! Got lots of compliments! Thank you!!!
Forgot to say that I finely shredded the carrots.
Great Tip:)!! PS: We appreciate your feedback more than you could know. Our blog has been a labor of love for us to share our tried and true recipes and our cottage lifestyle. Thank you again for taking the time to give us feedback:).
Lane, I’m delighted you enjoyed the sourdough carrot cake recipe and received many compliments! Thank you for your feedback. Great tip on finely shredding the carrots!
Warmly,
Emily