Preheat oven to 350°F (175°C).
Line muffin tins with cupcake liners or grease and line two round cake pans with parchment paper.
Mix dry ingredients:
In a large bowl, whisk together the flour, cocoa powder, baking powder, baking soda, salt, and sugar.
Add wet ingredients:
Add eggs, milk, vegetable oil, and vanilla to the dry ingredients. Mix until smooth.
Add boiling water or coffee:
Carefully stir in boiling water or hot brewed coffee. The batter will be thin — that’s normal.
Fill pans or cupcake liners:
For cupcakes: Fill each liner about 2/3 full.
For cake: Divide evenly between prepared pans.
Bake until set:
Standard cupcakes: 18–22 minutes
Jumbo cupcakes: 22–26 minutes
Cake layers: 28–35 minutes
Bake until a toothpick inserted in the center comes out clean. Cool completely.