Beat the butter. In the bowl of a stand mixer fitted with the paddle attachment, beat the softened butter on medium speed for 2–3 minutes, until smooth and creamy.
Add the powdered sugar. Reduce the mixer speed to low and gradually add the sifted powdered sugar, one cup at a time. Mix until fully incorporated, scraping down the sides of the bowl as needed.
Add the flavoring. Mix in the peppermint extract, vanilla extract, and salt.
Adjust the consistency. Add 2 tablespoons of heavy cream or milk and beat until smooth. Add additional cream, one tablespoon at a time, until the buttercream reaches your desired piping consistency.
Whip until fluffy. Beat on medium speed for another 2–3 minutes, until light and fluffy. Taste and add a tiny amount of additional peppermint extract if needed.
Decorate. Pipe or scoop the buttercream onto completely cooled chocolate cupcakes. Sprinkle with crushed candy canes just before serving.