Your diet is the second half of the muscle-building equation. All the weight training in the world won't yield results if you don't provide your body with the nutrients it needs to build new muscle tissue.
Bulking vs. Cutting
Most athletes, bodybuilders, and serious muscle-growth enthusiasts follow some variation of a bulking and cutting cycle. Bulking periods refer to training phases during which you eat more food than you burn to support muscle growth. On the other hand, cutting refers to a period of calorie restriction to reduce body fat, all while eating and training enough to prevent muscle loss. To gain muscle, you must provide your body with adequate amounts of calories and nutrients, especially protein. Doing so will support the creation of new muscle protein from the dietary protein you eat, which will be stimulated by the work you do in the weight room. The primary goal of eating for muscle gain during a bulking phase is to provide your body with enough nutrients to grow, but not so many calories that you accumulate more fat than muscle.
While some minor fat gains tend to occur during periods of bulking, a sweet spot—where your body builds muscle but doesn't store large amounts of fat—tends to occur when you eat 300–500 extra calories. Your body has a maximum rate of muscle growth, and beyond that limit, excess calories will be stored as fat. If your goal is defined muscles, you'll want to avoid gaining too much body fat.
Calories needed to gain muscle
For sustainable muscle gain without excessive fat gain, you should eat 300 to 500 calories per day above your basic needs.
Many factors affect your reference calorie needs, also known as your total daily energy expenditure (TDE). These factors include your age, sex, current lean body mass, physical activity, occupation, and underlying medical conditions.
Your best bet is to use an online calculator to estimate your calorie expenditure based on the data you input. Once you have this baseline expenditure, add 300 calories to set your daily calorie goal.
Proteins needed to gain muscle
When it comes to nutrients for building muscle, protein is the top priority. Recent research suggests that those training for muscle gain should eat about 0.72 grams of protein per pound (1.6 grams per kg) of body weight per day. When it comes to choosing which foods to eat, a registered dietitian can advise you specifically. However, eating a variety of protein sources is probably the best option.
Carbohydrates and fats needed to gain muscle
Regarding carbohydrate and fat intake, the recommendations are more varied. You need dietary fat to ensure optimal hormonal function, among other things. Recent bodybuilding research suggests consuming 0.22 to 0.68 grams of fat per pound (0.5 to 1.5 grams per kg) of body weight per day. If you tend to prefer fattier foods, start at the higher end of that range and adjust from there. The rest of your daily calories should come from a variety of carbohydrate sources.
To calculate this, multiply your daily protein goal by 4 and your daily fat intake goal by 9, since protein has 4 calories per gram and fat has 9 calories per gram. This will determine how many calories you'll consume from protein and fat. Then, subtract this number from your calculated daily energy requirement and divide it by 4 (the number of calories in one gram of carbohydrates) to get the grams of carbohydrates you need to eat to meet your daily calorie intake, but not exceed it.
In the long run, getting a consistent protein intake and making sure you don't exceed 500 calories a day are the keys to gaining muscle without accumulating excess fat.