Add the room temperature butter, the peanut butter and the cocoa powder to a large mixing bowl and mix with an electric mixer on medium to medium-high until well mixed and smooth. Scrape down the sides of the bowl and mix again for another 20 seconds or so.
Add 3 cups of the confectioner's sugar plus several tablespoons of milk and mix with an electric mixer on low speed until combined, then on medium until fully incorporated.
Add the vanilla and the last 2 cups of confectioner's sugar plus a couple more tablespoons of milk. Mix on low speed until combined, then on medium until fully incorporated. Scrape down the sides of the bowl, then mix again for about 20 seconds or so.
Check the consistency. If it's too thick, add another tablespoon or two of milk and mix again. If too thin, add another half cup of confectioner’s sugar and mix again. Repeat until the desired consistency has been reached.
Spoon or pipe onto cooled cupcakes. I used a 1M piping tip for the cupcakes shown in this post.
