In a large bowl, on the medium speed of an electric mixer, cream the butter until smooth.
Add the sugar gradually and beat until fluffy, about 3 minutes.
Add the eggs, one at a time, beating well after each addition.
Add the dry ingredients in three parts, alternating with the milk and vanilla. With each addition, beat until the ingredients are incorporated but do not overbeat. Using a rubber spatula, scrape down the batter in the bowl to make sure the ingredients are well blended.
Carefully spoon the batter into the cupcake liners, filling them about three-quarters full.
Bake for 20–25 minutes, or until a cake tester inserted in the center of the cupcake comes out clean.
Cool the cupcakes in the tins for 15 minutes.
Remove from the tins and cool completely on a wire rack before icing.
Place the butter in a large mixing bowl. Add 4 cups of the sugar and then the milk and vanilla. On the medium speed of an electric mixer, beat until smooth and creamy, about 3-5 minutes.
Gradually add the remaining sugar, 1 cup at a time, beating well after each addition (about 2 minutes), until the icing is thick enough to be of good spreading consistency.