This cake is moist and chocolatey with a slight sourdough tang. A tall glass of milk and a slice of Sourdough Discard Chocolate Cake is what dreams are made of. The perfect way to use up extra sourdough discard.

I’ll be honest, this is the best chocolate cake I’ve ever made, and I used to make and sell cakes as a side gig. This sourdough discard chocolate cake is extremely moist, yet not too heavy or dense. In fact it is incredibly light and tender. With a deep chocolaty flavor and a rich chocolate butter cream frosting, this recipe makes the perfect birthday cake for the chocolate lover in your life. Once you try it I’m sure you will agree this cake is sinfully delicious.
This recipe is made with sourdough discard. If you’re not sure what sourdough discard is, check out my How to Make a Sourdough Starter post to learn how to make your own sourdough starter. Sourdough discard not only helps give this cake a little extra body, it adds a slight tang that couples perfectly with its deep chocolaty flavor. If you are looking for a new favorite chocolate cake recipe, I think you’ve found it.
Sourdough Chocolate Cake Ingredients
Ingredients for the Cake
- All-purpose Flour – Flour is the heart and soul of any great cake! I used unbleached organic all-purpose flour to make this Sourdough Discard Chocolate Cake.
- Sugar – Sugar is what makes this cake so sweet and yummy! I like to use organic cane sugar when baking.
- Cocoa Powder – You can’t make a chocolate cake without the chocolate! Use unsweetened non-dutch cocoa powder for best results.
- Baking Soda – Baking soda helps lift the cake and neutralizes the acids in the cocoa powder, coffee, and sourdough discard.
- Baking Powder – Baking powder also helps to leaven this recipe. For best results be sure to use both baking soda and baking powder.
- Salt – Using salt in sweet recipes helps to enhance the flavor, but don’t worry it won’t make your cake salty. I like to use sea salt and celtic salt in most of my baking.
- Milk – Added milk makes helps to thin out the batter and make the cake moist. For best results use full fat milk.
- Coconut Oil – Oil is needed to ensure the final cake is moist because cocoa powder is very drying. I use coconut oil in most of my recipes for health reasons, but any oil will work. Don’t use butter as a substitute in this recipe.
- Eggs – Eggs help give the cake body and structure. Make sure your eggs are room temperature when making the batter. If you forgot to bring them to room temperature before you started mixing don’t worry! Just place your cold eggs in a bowl of hot water for three minutes to bring them to temperature.
- Vanilla – Choose real vanilla over imitation to ensure the best flavor and cleanest ingredients.
- Sourdough Discard – Sourdough discard adds a touch of fermented goodness and a slight tang to this recipe. If you don’t have a sourdough starter but would like to learn how to make one, check out my How to Make a Sourdough Starter recipe.
- Coffee – Hot coffee enhances the chocolate flavor of this cake and also helps to dissolve the cocoa powder. If you don’t consume caffeine try using a decaf coffee as a substitute.
Ingredients for the Frosting
- Butter – When making frosting, use room temperature butter. To check if your butter is soft enough press your finger into it. If you can push through it without any resistance it is ready.
- Powdered Sugar – Powdered sugar is necessary for any frosting recipe. Sift the powdered sugar to ensure your frosting is lump free.
- Cocoa Powder – Cocoa powder makes this buttercream rich and chocolaty.
- Vanilla – Vanilla adds a nice depth to the flavor of the frosting.
- Milk – Milk thins out the frosting enough to make it creamy and spreadable.

How to Make Sourdough Discard Chocolate Cake
Make the cake
Preheat your oven to 375°F (190°C). Grease and flour two 9″ cake pans then set them aside.
In a large mixing bowl whisk together the flour, sugar, cocoa, baking soda, baking powder, and salt until fully combined.
In a different mixing bowl, mix together the milk, oil, eggs, vanilla, and sourdough discard. Whisk until the sourdough discard is fully dissolved and everything is fully incorporated.
While stirring continuously, slowly add the wet ingredients to the dry until the batter is as lump free as possible. Pour the hot coffee in and stir, scraping down the sides as needed, until your ingredients are fully combined. The batter will be very thin, this is just how we want it!
Pour the batter evenly into the cake pans and bake for 35 to 40 minutes, or until a toothpick inserted into the center comes out clean.
Allow the cakes to cool in the pans for 30 minutes before turning them out onto a cooling rack to finish cooling.
Make the Frosting
Using a stand mixer with the paddle attachment or a hand mixer, beat the room temperature butter until it is smooth and creamy.
Mix in the powdered sugar a little at a time until about half of it is incorporated into the butter. Then add in the vanilla and milk. This will thin out the frosting and allow you to more easily incorporate the rest of the powdered sugar.
Alternate adding the remaining powdered sugar and cocoa powder a little at a time, scraping down the sides of the bowl as needed. Beat until the frosting is light and fluffy.
Assemble the Cake
Once the layers are completely cooled, you can assemble and frost the cake. Set one layer on cake plate flat side facing up. Spread about 1/4 of the frosting evenly across the cake layer.
Place the second layer on top of the first with the flat side facing down. Spread the rest of the frosting evenly over the top and sides of the cake.

Tips for Making Sourdough Discard Chocolate Cake
- Use room temperature ingredients – When making this discard cake use room temperature eggs, milk, and sourdough discard. Room temperature ingredients will bind together better than cold ingredients, resulting in a lighter and taller final product.
- Use fresh ingredients – The combination of baking soda and baking powder in this recipe is necessary to leaven the cake and neutralize the acids brought in from the coffee, cocoa powder, and sourdough discard. Make sure your baking soda and baking powder are fresh for the best results.
- Use non-dutch cocoa powder – Dutch cocoa powder is not as acidic as non-dutch cocoa powder because of the way it is processed. Using dutch processed cocoa powder in this recipe can result in a sunken or flat cake, because it won’t react with the baking soda to lift your cake. If uncertain organic cocoa powder is a safe choice.
- Don’t over mix the batter – Over mixing the batter can can cause too much gluten development, resulting in a cake that is tough and rubbery. Avoid over mixing to keep your chocolate cake light and tender.
- Don’t overbake the cake – Overbaking can cause your cake to come out dry.
How to Store Sourdough Chocolate Cake
This sourdough discard chocolate cake will stay moist for days if stored properly. Keep this cake frosted in an airtight container at room temperature for up to 3 days or in the fridge for up to a week. If refrigerating, bring the cake to room temperature before serving for the best texture.
If you want to make this cake ahead of time you can freeze it. To do this tightly wrap the cake layers in plastic wrap after they have completely cooled and place them in the freezer for up to 3 months. When you are ready frost the cake, pull the layers out of the freezer and allow them to thaw fully before assembling.

This was literally the best chocolate cake I’ve ever made. Thank you for sharing!
Thank you for sharing Kim! It’s definitely my favorite as well.
Does this recipe need the coffee??
Coffee helps to bring out the flavor of the chocolate. If you would prefer to leave it out you can substitute it with boiling water.
Is there a substitute for coffee??
The coffee can be substituted with boiling water.
We don’t drink coffee but I do drink Pero so I’m going to try it with that. 🙂
I would love to hear how it turns out!
This is so good! Made it in a 9 x 13 pan and cooked for the 40 minutes. Will make again. Delicious!
Thanks for sharing Pauline! I am so happy to hear you enjoyed this recipe!
A fabulous recipe and I learned a thing or two. Eggs, milk and sourdough starter at room temp for a lighter, fluffier cake; and it was!! The texture and flavor are amazing.
Thanks
Thank you for sharing Cheryl! I am happy you learned some new things from making this recipe!
Has anyone tried reducing the sugar? Will it affect the cake if I halve it?
Hey Bianca! You can reduce the sugar in this recipe, but it is likely make the cake more bitter due to the uneven balance between the cocoa and sugar.
I made this cake this morning with about half the sugar in grams. With a slightly sweet frosting, it tastes great!
Hey Jolene! I’m so happy to hear it. Thank you for sharing!
Fantastic tasting cake! Bookmarked this one for sure and will definitely be using this recipe again and again.
I don’t have 8 inch pans but this rich dense cake worked beautifully in my in 9 inch pans. It baked great and looked very elegant.
Has anyone every frozen this cake? I’m gonna give it a try. ( Just the layers no frosting).
I’m glad you liked it Rebecca! I think the cake will freeze well!
I made this cake and it came out really dense. Perhaps because my ingredients were not at room temperature? Still delicious – iced with buttercream cream cheese frosting.
Will definitely try again!
I’m sorry to hear robin! I hope you do try again with room temperature ingredients. Please let me know how it turns out!
This is a fantastic cake, very moist and not too rich or too sweet. I will certainly bake it again. My sourdough had only wholegrain flour, the results were much better than I expected. Thank you so for sharing this recipe.
Thank you for sharing Allison! I am so happy to hear you enjoyed this recipe!
Would it work to do a long fermentation with this cake? Would I need to add the baking soda/powder after fermentation?
You could absolutely long ferment the batter if you would like, just add the baking soda and powder before baking.
I did this cake for my husband birthday and everyone was impressed with how moist and flavorful was. I’m thinking in making cupcakes for Valentines day any idea of how long the cooking time should be?
This recipe should convert to cupcakes wonderfully! Bake them for about 20 minutes or until a toothpick inserted into the center of a cupcake comes out clean.
Great cake, but mine overflowed from the 8” pans. I’ll use 9” next time. I did ferment the sourdough starter, oil, flour and coffee before mixing in the other ingredients.
Hey Nelda! The long ferment time most likely activated the yeast in the discard and gave your cake some extra umph! 9″ pans the next go-round sounds like a great idea.
Nelda,
I’m very interested in making this recipe as it’s my daughter’s birthday this weekend and she’s obsessed with everything chocolate. I’m wondering, how long did you ferment the dough before adding the remaining ingredients?
Yum! I need to try this recipe out for our next birthday party.
Good recipe, easy to follow. The cake was kind of firm and not moist. The icing was too sweet for us; we had to add salt, milk, and more cocoa powder to make the icing less sweet.
Thanks for the feedback CC! If your cake came out on the firmer side be sure to check the expiration dates on your leavening agents, sometimes this can be the cause.
This is the best chocolate cake I have ever made or tasted! I followed the recipe exactly but used multiple espresso shots and hot water for the coffee! Also used 9″ rounds and pulled it a little sooner from the oven. I loved that it actually calls for coconut oil, as I usually sub that anyway but worry about the heaviness of it. I am going to try this as cupcakes tomorrow! Thank you 🙂
This was the best cake that I have ever made! I topped it with a peanut butter icing and it was decadent! Thank you for sharing!
This is the best chocolate cake and frosting I have ever made and possibly ever had! I will be making it again. In the very need future!
Thank you for the recipe. It makes a lovely moist cake that stays fresh. I didn’t notice any sourdough taste in the cake, but I’m guessing that depends on how sour your starter is. I appreciate the amount of salt in it too, excellently balanced.
I make a lot of cake, and this compares to the Hershey’s “Perfectly Chocolate” Chocolate Cake.
The one drawback is the non-dutched cocoa. I usually use Rodelle’s Dutch Cocoa or Cocoa Barry Cocoa in my cakes, but I tried Yupick’s natural cocoa 10-12% for this one because it asked for non-dutched cocoa. I don’t know if that is just lousy cocoa or I prefer Dutch process Cocoa, but it did not have as good of a flavour as my cakes normally do, and I would expect that with the sourdough starter it would give it a deeper, more developed flavour.
The plan is to try it again with what I normally use and see if I like it better, because the cake does have a nice texture, and is worth recreating.
This is a great recipe! Delicious! As a note to others, I made the mistake of using foil wrappers when I made these into cupcakes. The cakes stayed very flat since the sourdough reacts with aluminum. I totally spaced the fact that the wrappers contained aluminum. They still taste great though so I’ll just mask the shape with frosting. Thanks for the recipe!
Great recipe! The cake is delicious. I used boiling water and girassol oil instead of coconut oil, but I will use it next time and reduce the sugar a bit. Thank you for sharing! Do you think we can let the dough ferment for a few hours before baking it?
This recipe was a home run! I’m a cheapskate, so I did a stick of melted butter in place of the coconut oil. 400g of sugar seemed like a lot to me, so I did 275g, because that’s what I had left of my quart jar and didn’t feel like opening up another jar. I put the batter in the fridge overnight until the following night because I didn’t want to stay up to bake it, and I like letting stuff ferment a little. I left the batter out on top of my stove while it preheated, then I preheated my cast iron for an additional 20 minutes. I slathered lots of butter in the pan and made a sling from parchment paper. I baked the cake in a cast iron bread pan for ease of creating slices for my toddlers. This cake recipe (with the smaller amount of sugar) was the perfect amount to create a nice cake loaf. When it was done (I baked to 202 degrees which took about… 40 minutes or so) I turned my pan upside down, and it slipped right out! Very light, fluffy, and very moist! We ate it without any frosting – it was that good! The kids wouldn’t stop asking for more, and I could hardly keep away from it! I did spill some coffee grounds (I’ll admit – I’m Mormon and don’t really know the first thing about coffee- I got a bag of dark roasted fine grounds from Aldi and followed instructions to steep in cold water for 24 hours, no idea if that makes any sort of difference to the coffee-ness of the liquid/cake, but as a pregnant lady, it smelled heavenly hahaha) and we didn’t notice any off texture. I’m not sure how much I spilled (I was being lazy and held a coffee filter while I strained straight into the batter lol) but I couldn’t tell anything was off! I think next time, I may add some chopped chocolate chunks for an extra kick of chocolate, but that’s just the pregnancy talking, the cake really is amazing as-is! I honestly may even add it to my farm’s baked goods lineup that I sell!
This cake is delicious. Do you think I could modify it for not including sourdough discard? That would mean that I would add 150 g flour and 150 g water instead of the discard. Recipes like this are good reason to keep feeding a starter!
I’m so glad you loved this cake! You could try replacing the sourdough discard with 150g flour and 150g water, but just a heads-up—the flavor and texture might change a bit. Sourdough discard adds a subtle tang that plain flour and water won’t quite replicate. That said, it’s always fun to experiment! And yes, sourdough discard chocolate cake is definitely one of those recipes that makes keeping a starter totally worth it. 😊
Today I realised this cake has become a monthly staple in my home and I’ve made it 3 times so I should probably leave a review! it’s amazing, the best cake ever even. Just perfect for any chocolate cravings that pop up. The last time I made it I was in a hurry and didn’t wait for the ingredients to come to room temperature which definitely made a difference so I’m currently waiting for my ingredients to come to temp now before making it for the fourth time 😍
I’m so thrilled to hear this sourdough discard chocolate cake has become a monthly staple in your home—it’s one of my favorites too! You’re absolutely right that using room temperature ingredients makes a difference in texture and rise. A quick tip: placing your eggs in a bowl of warm water for 3–5 minutes brings them to temperature fast. You can do the same with your sourdough discard if its been sitting in the fridge—just pop it into a ziplock bag and set it in warm water to take off the chill. Happy baking, and thank you for taking the time to leave such a lovely review! 😊