Mix butter until smooth and creamy - about 3 minutes using a stand mixer on high speed.
Add cream cheese and mix until completely combined.
Mix in powdered sugar, one cup at a time.
Mix in cocoa powder until fully combined.
Spread or pipe on cakes and cupcakes.
Double this recipe if you like very high frosting swirls on your cupcakes.
Always make sure that all ingredients are at room temperature before starting.
Mix for several minutes to incorporate lots of air into the frosting and make it fluffy.
You can add more or less powdered sugar to the recipe to give it lighter or stiffer texture.
The USDA considers frostings made with cream cheese to be unsafe if left unrefrigerated for more than a couple of hours, and there are a lot of food websites that echo this fear. If you have a weakened immune system, or just like to err on the side of caution, then by all means refrigerate your frosting until you are ready to serve.If you want to know what I do, though, I leave my cupcakes with cream cheese frosting out of the fridge. I have never had problems with the frosting souring, and I have certainly never had any health effects.
Cream cheese frosting can be frozen! Foods with a high fat content tend to survive freezing well. You can put a plastic bag of chocolate cream cheese frosting in the freezer for weeks or maybe even months. You will need to let it thaw and re-whip it a bit when it comes out, though, before you start piping.