Preheat oven to 350°F (175°C). Grease and flour two 9-inch round cake pans.
In a medium bowl, whisk together flour, cocoa powder, baking powder, salt, and sugar.
In a large bowl, beat butter until smooth. Gradually add sugar and continue beating until fluffy.
Add eggs one at a time, mixing well after each addition. Stir in vanilla extract.
Gradually add dry ingredients, alternating with milk, and mix until just combined.
Divide batter evenly into prepared pans.
Bake for 30–35 minutes, or until a toothpick inserted in the center comes out clean.
Cool in pans for 10 minutes before transferring to wire racks. Allow to cool completely before frosting.