What you want to do is set up a healthy ratio of Carbs/Protein/Fat.
Depending on how many calories you need to consume a day you choose the amount of calories for each.
Lets say you start off with a 40% protein, 35% carbs, 25% fat ratio and you can take in 1800 calories. It would be..
720 calories from Protein
630 calories from Carbs
450 calories from Fat
Do that and make sure its good fats, good carbs and lean proteins.