There comes a time in everyone’s ketogenic life where you crave something sweet. Cookies, brownies, cake – but there’s nothing that you’ve pre-made and nothing that is low carb laying around.
In under 5 minutes you can have a chocolate cake that’s rich, delicious, and sure to slam those cravings straight into the ground. Cake in a mug! Chocolate cake in a mug, that is. Absolutely divine in taste, just like you spent 45 minutes slaving away baking it in the oven.
I know, I know, you need almond flour. And none of that almond meal, either – only a fine grain almond flour for the soft and non-grainy texture. But it’s worth it, trust me!
I used to make these with protein powder, and the consistency is just nowhere close. The protein powder will give a more rubbery texture, and while it’s still good it’s just not great. The almond flour helps give it that real-cake texture that you’re looking for!

The key to the perfect consistency is the egg. Combined with the absorptive powers of the coconut flour and the rising properties of the almond flour, the egg will coax the cake to rise even higher than you might expect and provide an extremely decadent consistency.
Yields 1 chocolate cake
The Preparation
- 2 tablespoons butter, salted
- 1 1/2 tablespoons erythritol
- 2 tablespoons unsweetened dark cocoa powder
- 2 teaspoons coconut flour
- 2 tablespoons almond flour
- 1/2 teaspoon baking powder
- 1/4 teaspoon vanilla extract
- 1 large egg
The Execution
1. Measure out 2 Tbsp. butter and put it inside the mug you will be using.

2. Microwave the butter for 20-25 seconds until it mostly melted and hot. Add your sweetener to the melted butter.
Note: You can use any low carb/low glycemic sweetener for this. Read more at: the best low carb sweeteners.

3. Add your 2 Tbsp. cocoa powder to the butter.

4. Add your coconut flour, almond flour, baking powder, and vanilla.

5. Don’t forget the egg! It will help the cake rise.

6. Mix the ingredients well, until everything is combined and there’s as little lumps as you can get. If you’re going to make 2 servings, this is the point where you would measure the batter out into 2 mugs or 2 ramekins. If you’d rather have something you can cut into squares and share, the keto chocolate brownies use cream cheese and coconut oil for a fudgier texture than a mug cake.

7. Microwave the cake for 60-75 seconds. It takes 75 seconds in my microwave. If you are making 2 servings, probably 50-60 seconds would do the best – I never make 2 servings because I’m greedy 🙂 If you have more time and want something that serves a crowd, our keto pound cake uses the oven and a loaf pan, with lemon extract and vanilla instead of cocoa powder.

8. While you’re waiting for the cake to cook, whip some cream in a mixing bowl. (Optional)
I do this by using an immersion blender – very quick, easy, and tasty but it will produce stiff peaked whipped cream (and to some it may be over whipped). Pour enough whipping cream into a container to cover the immersion blender blades. Blend for 20-40 seconds until you reach the consistency you want.

9. Let the cake cool for a moment and spoon on the whipped cream. (Optional)

This makes a total of 1 serving of Keto Chocolate Cake in a Mug. The serving comes out to be 417 calories, 36.6g fats, 5.1g net carbs, and 12.1g protein.
If you want the same chocolate hit but with a citrus note, our orange chocolate keto cookies use orange zest and chocolate chunks baked together – a different texture and flavor profile from this mug cake.
| NUTRITION | CALORIES | FAT | CARBS | FIBER | NET CARBS | PROTEIN |
| 2 tablespoon butter | 203 | 23 | 0 | 0 | 0 | 0.2 |
| 1 1/2 tablespoon erythritol | 4 | 0 | 0 | 0 | 0 | 0 |
| 2 tablespoon unsweetened dark cocoa powder | 40 | 1 | 6 | 4 | 2 | 2 |
| 2 teaspoon coconut flour | 13 | 0.8 | 2.2 | 1.6 | 0.7 | 0.7 |
| 2 tablespoon almond flour | 81 | 7 | 3.1 | 1.8 | 1.3 | 2.9 |
| 1/2 teaspoon baking powder | 1 | 0 | 0.6 | 0 | 0.6 | 0 |
| 1/4 teaspoon vanilla extract | 3 | 0 | 0.1 | 0 | 0.1 | 0 |
| 1 large egg | 79 | 5.2 | 0.4 | 0 | 0.4 | 6.9 |
| Totals | 424 | 37 | 12.5 | 7.4 | 5.1 | 12.8 |

Keto Chocolate Cake in a Mug
Ingredients
- 2 tablespoon butter salted
- 1 ½ tablespoon erythritol
- 2 tablespoon unsweetened dark cocoa powder
- 2 teaspoon coconut flour
- 2 tablespoon almond flour
- ½ teaspoon baking powder
- ¼ teaspoon vanilla extract
- 1 large egg
Instructions
- Measure out the butter and put it inside the mug you will be using. This should be at least a 12 oz mug.

- Microwave the butter for 20-25 seconds until it is mostly melted and hot. Add the sweetener to the melted butter.

- Add the cocoa powder to the butter.

- Add the coconut flour, almond flour, baking powder, and vanilla.

- Don't forget the egg! It will help the cake rise.

- Mix the ingredients well, until everything is combined and there's as few lumps as you can get. If you're going to make 2 servings, this is the point where you would measure the batter out into 2 mugs or 2 ramekins.

- Microwave the cake for 60-75 seconds. It takes 75 seconds in my microwave. If you are making 2 servings, probably 50-60 seconds would do the best - I never make 2 servings because I'm greedy.

- While you're waiting for the cake to cook, whip some cream in a mixing bowl. (Optional)

- Let the cake cool for a moment and spoon on the whipped cream. (Optional)

Omg I just made this, and honesty it’s the best cake I’ve ever made. Although I didn’t have almond flour, I just put 3 tbs coconut flour instead of 2 and added milk till I was happy with the texture. I can’t get over how amazing it tasted.
Thank you Rudina!
Thank you for the recipe!!! I’m new to keto and third is a lifesaver! Have you ever tried coconut oil instead of the butter?
My batter turned out really thick so i added cream and that didn’t really help so i put it in the microwave and in was terribly dry. i made it 3 times and turned this way all 3 times.Does anyone have any advice i made sure to measure all the ingredients properly and followed all instructions.
The batter should be like a thick pancake batter in consistency. As far as the dryness, try to cook it for less time in the microwave. If you over-cook mug cakes, they tend to get pretty dry.
Can I replace cocoa powder with Lindt 85% dark chocolate bars?
Sure, but you may need to add some more coconut or almond flour.
Hi, I followed instruction exactly. My mug cake came out too bitter, what can I have done wrong? Don’t understand, again I know I followed completely. Help. Thank you so much. Elsa
Really well made, super fluffy and rich. Mine felt a bit salty, I might try unsalted butter next time.
https://uploads.disquscdn.c…
Hopefully that adjustment will do the trick!
Amazing recipe… subbed the almond flour with another spoon of coconut flour and it was so divine… Thanks for sharing
Made this for my wife and I tonight, my wife and I have been doing keto for a couple months now. She has a total sweet tooth and I figured I’d give this a shot. This is the first time I’ve made keto dessert since we started. It turned out pretty good! It was a little dry but I did microwave it the full 75 sec. I’ll try less next time. We took a couple bites and it was great but dry, so I poured a little liquid heavy cream in it and after that it was alllllll gooooood! Thank you!
Yuuuum! I love putting a pat of butter on mine. 🙂 A little less time will definitely help, though the low carb cakes do tend to be drier than a normal cake.
Would this work by multiplying and cooking in muffin tins in the oven? If so, what temp and how long?
Yes! 350°F for about 10-15 minutes. Maybe a little less, or a little longer, depending on muffin size and your oven.
WOW so unbelievably delicious! tastes like old-fashioned homemade brownies!
I cut the cocoa in half and added a tablespoon of sour cream and it was insanely moist and delicious. I only intended to eat half but I had no self control and now the mug is empty 😩. Sooooo goooood!
I’ve been eating a lot of mug cakes lately and this is by far the best one. When I took my first bite the heavens opened and Angels surrounded me.
Oh my!
OhEmGee. This was AMAZING. (“Was” because it be Gone…)
This was fantastic!! I made the recipe exactly as is but added some whipped cream and raspberries to the top. It was SOO good!! Thank you for sharing!!
https://uploads.disquscdn.c…
Hi – I realized after I made it that my Erythritol has 4 net carbs per tsp. Did I buy the wrong kind? The chart below indicates no carbs in Erythritol…
Erythritol isn’t processed by the human body, so we tend to leave it out of our nutritional information. You can see more about it here: https://www.ruled.me/keto-diet-plan-best-and-worst-sweeteners/
Erythritol isn’t processed by the human body, so we tend to leave it out of our nutritional information. You can see more about it here: https://www.ruled.me/keto-d…
Is it possible to just use gluten free flour instead of almond and coconut?
It’s possible, but “gluten free flour” can mean a lot of things. It may not be keto friendly.
Laura, how big are the ramekins that you used?
I’m looking to purchase some and wondering whether I should buy the 5 or 8 oz ones…
A standard size mug should work just fine. I transferred it to a ramekin dish for the photographs only.
Sincerely, this is the BEST mug cake ever. Over any other kind, with “normal” ingredients! Easy, fluffy, cooks evenly and cleans up easily. Thank you!!!
Super glad to hear you like it!
This is good skip the cocoa..add 2 squares of lilly’s with the butter
I quadrupled this recipe and added about 1/2 cup of heavy cream. I baked it in the oven for 25 to 30 minutes at 350 degrees. Topped it with some whipped cream and strawberries. I used Swerve as the sweetener and it came out perfect. My son had no clue it was low carb. I didn’t feel guilty eating it or giving it to my boys. Score!
Yum – sounds delicious!
Just wanted to tell you guys how amazing and foolproof this recipe is. It’s been my go to for months now and my favourite variation yet is stirring 2-3 smooshed up raspberries to make a black forest cake 🙂 also a little pouring cream when it’s cooked solves any dryness deliciously and ups the fat ratio as well. Thank you!!
The raspberries sound like a delicious twist on the recipe – glad you like it!
I was going to use Stevia for sweetener, but it turned into a clump when mixed with the butter. I will have to try what the recipe calls for next time. I don’t know if anyone else encountered this problem.
I used stevia and didn’t have this issue but I put it in last. I am finding it really hard to to overcome the bicarb flavour in so many keto recipes, does anyone have any suggestions how I can remove this taste?
Sort of dry and not nearly sweet enough…. Not moist like real cake…
Sorry to hear. If you find that it’s dry, try cooking it for a bit less time in the microwave. Typically mug cakes dry out when they’re overcooked.
Amazing added clotted cream and a little dusting of stevia and cinnamon exactly what I’ve been looking for after three weeks without sugar.
https://uploads.disquscdn.c…
Yum! Looks fantastic!
A little grainy and hard to swallow. Good portion size for being low carb. The coconut perhaps makes it too idk weird Kinda nutty too. Will do in a pinch. Not bad overall
How do you get the cake to rise so high. I use the same cooking vessel and it only comes about half way up that dish,
I think Craig may have transferred it to a shorter dish so that it’s easier to see the cake in the photos. You can see in the step by step photos that he used a coffee mug, but the final shots have it sitting in a ramekin.
I just made this with an oz of added bakers chocolate and 2T of erythitol….oh my so good! Very rich, ate with cream. Next time less sweet.
Thank you for this recipe! I made modifications and it was delicious, except for the erythritol+Stevia that I’m not used to, but that’s not because of this recipe.
I can’t eat dairy so I substituted coconut oil in place of the butter. Put in 1tbs erythritol+Stevia powder rather than 1.5tbs (not too sweet but just sweet enough). Added about 1tsp almond milk. Baked it in the oven at 170 degrees celcius which took only 15 minutes (I avoid the microwave if time allows). Gorgeous and moist!
What size ramekin did you use? I’m not sure if I need the 4oz or 8oz or other.
It shouldn’t matter – most of the time I just use a regular mug. Any ramekin similar in size to a mug should work.
I finally decided to try a mug cup recipe. I have been extremely skeptical, but, boy, was I wrong!! This was awesome!! It did only take 75 seconds in the microwave. My daughter even likes it! Thanks for the recipe 🙂
This is by far the best mug cake I’ve made. It’s my go-to recipe! I find it’s smoothest when I mix the ingredients each time I add one; no clumps that way!
I wonder how we can have vanilla extract in this recipe? It’s full of sugar–hence, carbs. 🙁
If you find a good vanilla extract, it should just be alcohol and vanilla beans. Vanilla paste and syrups will have sugar, but the extracts usually don’t if you go for a higher quality vanilla. Hope this helps!
Yum, Yum, Yum! I substituted coconut flavoring for the vanilla extract. A little Mounds bar for me!
I just made this tonight, it was so disgusting I was very disappointed to waste the food I was trying to choke it down but I couldn’t get threw it and it’s suppose to be cake!?
I love this recipe!!! I usually divide the batter into two ramekins to make dessert for my boyfriend and I. The cake itself is great, but it’s also super easy to change up a little bit. Sometimes I add Lily’s chocolate chips, or whipped cream, or a lazy raspberry sauce (a few frozen raspberries + a little erythritol in the microwave, stir, pour).
Today I really experimented and replaced the cocoa powder with 3 tbsp of pumpkin puree and added 1/4 tsp of pumpkin pie spice. PUMPKIN SPICE CAKE Y’ALL. It completely satisfied my need for pumpkin spice everything. All the extra moisture from the pumpkin made it take longer to bake and the texture was different (in between cake and pumpkin pie filling) but it was super super good!
Good start, but two problems: bitterness and egginess
bitterness fix: only 1 tablespoon cocoa, 1 packet of stevia as only fake sweetener, 1/2 square Trader Joe’s Pound Plus 72% chocolate; 1/8 teaspoon baking SODA instead of any baking powder
egginess fix: 1 egg white instead of whole egg, 1 tablespoon inulin for slight sweetness and better texture, 3 tablespoons almond flour (no coconut flour)
same net carbs and calories as original recipe
instructions: melt butter, then mix in order: chocolate (until melted) and Stevia, cocoa, vanilla, egg white; then, together: inulin, almond flour and baking soda. 60 seconds in microwave immediately
This Keto mug cake is my go to dessert when I want something sweet. I have memorized the ingredients I make it at lease one a day. Thank you so much for this recipe!
I always have cacao and cocoa powder in my pantry, would you suggest one over the other? Or would it be the same taste/consistency and not matter?
cocoa powder would probably be less bitter 🙂
Totally doing this tonite for me and my daughter. Thanks!!
I know this went up a while ago, but thanks so much for posting this recipe! This is my favorite mug cake, hands down. I like making a hole through the center and pouring in a melted mix of cream cheese, almond milk, erythritol, vanilla, maple syrup, and cinnamon.
I’m glad you loved this mug cake! Thanks for the feedback.
I couldn’t eat this cake it was so disgusting and I followed everything to a T. Wish there was a cake that actually tasted the real normal fatty cake and not gritty and weird.
Sorry to hear. This is probably one of the most positively reviewed recipes on this website. I’m not sure where things went wrong, but it’s possible you’re not user a super fine almond flour? That can cause some grit. If you used purely erythritol that can also cause some grit. If you powder it in a spice grinder or use a sweetener that is powdered, it will help as well.
I am new to keto and this was my first dessert attempt . I followed it to the letter. The results are amazing. I didn’t find it very dry but that’s probably my microwave. Nor was it too sweet or bitter.
I’m glad your first keto dessert came out well! Thanks for the feedback.
If you’d like some more keto-friendly ideas, you can find our dessert recipes here:
https://www.ruled.me/keto-r…
Ok..so I just tried the mug cake-probably should have read the suggestions about decreasing the cocoa…it was bitter but I make my whipped topping with heavy cream and truvia…it worked…its pretty quick-cheap and delicious 😊…and the directions above made 2 mugs. So win WIN.
Peanut cake! I substituted cocoa for Tru Nut keto friendly peanut flour. Yum!
PS: I added a piece of keto chocolate before microwaving my peanut batter for 50 sec. I prepared the peanut desert without the egg, by accident. Great with fresh whipped heavy cream. I’m eager to retry this with the egg!
I hope you enjoy it even more with the egg! 🙂
for someone not on keto but doing low carb/low fat – can the fat content be reduced (less butter) in order to reduce the calorie count ?
Yes, it could be. Though I will say that low-calorie, low-carb, low-fat diets have been shown to be unhealthy in the long-term.
So good! The best low carb mug cake I’ve had!
I loved this recipe so much that I started thinking about how I could turn it into mini muffins Quadrupled the mug muffin recipe (though I think tripled would have been enough) and put into patty pans on a mini muffin tray. Made 29 muffins. First batch I did for 10 mins on 200 which was too long. A bit dry. Second lot I did for 7 mins only which was better, I think actually they may even be done by 5 or 6 mins though. Going to freeze these and then reheat for easy snacks.
Thank you for a fantastic recipe!
Wow, I love this idea! Perfect for a quick and easy snack or dessert. Thanks for the comment, Hannah.
Hi
I love love love this recipe! Thank you so much!
Coconut flour is cheaper than almond flour in Australia, would you sub 1/2 tbsp to replace 2 tbsp of almond flour? I’ve read that it’s just a simple 4 to 1 ratio.
Also, please confirm oven baking temp 190° Celsius for 10 to 15 minutes?
Thanks
I’ve found that it changes recipe to recipe. Sometimes you can replace almond with coconut flour easily, other times it completely changes the recipe. I haven’t had experience substituting out flours for this, so I’m not sure if it would work.
As far as the oven temp goes, that is correct. I’d say 8-12 minutes, though.
This recipe was exactly what I was looking for. I think for those who may not have liked the recipe they expected it to taste exactly like boxed or store bought however, if your taste buds have changed as a result of eating no or limited sugar then you will enjoy this recipe. I had mine with clotted cream and it was delicious.
I’m happy you enjoyed it! The cream sounds like a great idea