Beat butter until softened. Add sugar and beat until light and fluffy, about 3 minutes.
Add eggs, one at a time, beating 30 seconds after each addition.
Measure the flour, baking soda, salt, cocoa powder, and espresso powder into a medium sized bowl and whisk to combine.
Measure the milk and vanilla into a measuring thing.
Add about a third of the dry ingredients to the butter/sugar and beat to combine. Add about a half of the milk/vanilla and beat to combine. Continue adding, alternating between dry and wet and finishing with the dry.
Scoop batter into cupcake cups about 3/4’s full. Bake at 350 degrees for about 25-30 minutes or until a cake tester comes out clean.