With the exception of a few special conditions (being a novice trainee, coming back from a layoff, or taking steroids), it is near impossible to gain any meaningful amount of muscle while simultaneously losing body fat.
Ideally, if you want to gain any significant amount of muscle you'll need to be in a caloric surplus. Or in other words, you need to be consuming more calories than you're burning. When done properly this can allow you to slowly gain muscle mass over time while minimizing fat gain. Any amount of fat that is gained can be shed later by way of a fat-loss phase. That said, you do have to be prepared to be in a surplus for a long time as muscle gain is a very slow progress.
Here is a quick-and-dirty framework for anyone who wants to start creating their own nutrition program to help them build muscle.
It is to be assumed that you'll be weight training during this program as lifting is required to maintain muscle while losing fat. In fact, your training is going to be the primary driver of progress here. Your increased intake will be providing your body with the nutrients it needs to recover and grow. We do not recommend the addition of any cardio while in a building phase.
Step 1 - Set Calories
Assuming that 15 x bodyweight (in pounds) is a reasonable estimate for the number of calories required to maintain body weight, this is often a good place to start. If you've been in a calorie deficit (i.e., fat-loss phase) for an extended period, you may first want to bring your calories up to about 13.5 x bodyweight for at least a couple of weeks and then proceed to 15 x bodyweight.
Step 2 - Set Protein Intake
Generally speaking, relative protein intake goes up as caloric intake goes up. A number to start with would be around 1 gram per pound of body weight If you've set your caloric intake using the formula above, you'll probably find that fitting in this much protein is pretty easy as you'll be able to fit in relatively large protein servings.
Step 3 – Add in Omega 3’s
Add some Omega 3’s by taking fish oil.
Step 4 – Fill in the Rest
Once you’ve accounted for your protein and fish oils( yes fish oil has calrioes), you can essentially fill in the rest of your calorie requirements with carbohydrates and fats depending on your needs/preferences. Despite what you may have read, there are no magical macronutrient ratios for muscle gain. As long as you’re in a caloric surplus and meeting your protein and healthy fat needs, you can fill in the rest according to your preferences. Just don't go crazy on the carbs.
Step 5 – Create Your Meals
Break down your calories and macros over the desired number of meals per day using a site like CalorieKing.com to determine the amounts.
As part of this breakdown, make sure that you’ve included some form of protein in the post-workout meal. It doesn’t necessarily have to be protein powder, but many find this to be convenient.Your post-workout meal should also contain some low-fat carbs numbering from about 50 to 70 grams (sometimes more) depending on goals, body size, etc. These carbs can either come from things like rice and potatoes or delicious low-fat Skinny Cow ice cream bars and candy based on your preference. ( This process doesn't have to suck, keep in mind this is not an excuse to get carried away)
Once completed, this should give you a general framework for your initial nutrition program.
Step 6 – Execute
Step 7 – Assess and Adjust
The calorie estimates you used to create your initial program are just that; estimates. They are needed to get you started, but you’ll often require adjustments to fine tune your plan and find the appropriate number for YOU.
After two weeks, repeat your starting measurements and make an assessment of progress. If you’ve been sticking to your plan and are not making progress then you can adjust your diet by adding a little food and implement the plan for another two weeks. You repeat this until you’re able to start making progress.
If your nutritional compliance and/or training has not been good, you may not see any progress at this point. Under no circumstances should you be changing a program that you haven’t been following as it isn’t the program that is failing…it is your compliance. You’ll need to sort that out first.
It is important to remember that progress is rarely ever going to come as quickly as you want it to come. The process of building muscle is VERY slow so don’t be quick to make changes even if you’re advancing forwards at what seems to be a snail’s pace.