Assemble the Ingredients.
Place the 2 teaspoons butter into the microwave-safe mug and melt it in your microwave for 20 seconds or until butter is completely melted.
To the mug, add 1/4 cup flour, 1 egg, 2 tablespoons white sugar, 1 tablespoon milk, 1 teaspoon vanilla extract, 1/4 teaspoon baking powder, and 2 tablespoons cocoa powder. Mix with a whisk or a fork until you get a smooth batter.
Microwave the mixture for 60 seconds. At this point. the top should be firm. If it's not, then microwave the cake in 5 second intervals until it is done. Use a spoon to eat the cake straight out of the mug! If you liked this recipe, you can make more mug cake and experiment by adding different ingredients like peanut butter, cinnamon or mashed bananas.