How to calculate macros for muscle gain

The exact formula for protein, carbs and fat when you're trying to build muscle without piling on fat.