Now that you've established how many calories a day it takes to sustain your body, some consideration needs to be paid to what you eat. Calories typically come from four sources (called macro nutrients): carbohydrates, protein, fat, and alcohol. Alcohol is sort of a special category, but those calories can add up! Note that each broad category can be broken down into more fine categories. For example, fat comes as either saturated fat, monounsaturated, and polyunsaturated fat. That is why you will sometimes here fats that are not "saturated" called "good fat". Carbohydrates and protein are both 4 calories per gram. Fat is nearly 9 calories per gram, more than double. Eating fat will then have the by product of leaving you feeling less "full", but taking in many more calories. Also note that the body does not process all these calories the same in terms of efficiency with regards to blood, oxygen, etc...
So, what should a runner eat? The table below shoes a break down of the recommended percentages of your diet that come from each type according to different sources.
Pfitz refers to the book Advanced Marathoning and Karno refers to the book Ultramarathon Man by Dean Karnazes.
Each of the sources above has their own explanation for their recommendation. I won't go into detail about that logic, but here are a few things to consider about the background of each source of food. For a runner, the carbohydrates are the most important fuel source because they are the ones that your body needs when running. The closer you get to lactate threshold paces, the higher percentage of your calories come from carbohydrates for energy. Your body can typically store enough carbohydrates to run about 20 miles, which is part of the reason most marathoners hit the wall around 20 miles. Your body can store enough fat (depending on how lean you are) to run hundreds of miles. But, the process of converting fat to a usable energy source is so inefficient that you will have to slow way down (to nearly a walk) to keep moving forward. Protein is important for muscle repair and growth. If you are running lots of miles, then your muscles need to repair from the damage done. But, protein is inefficient as an energy source.
After tracking my calories using MyPlate for the better part of a month, you can see where my calories are coming from. And using the tool has caused to me to more disciplined than I normally am. You may notice that my calories only add up to 95%. So where is the other 5%? Some of that is just lost due to rounding (calories in carbs is slightly higher than 4) and some it is the other category above (alcohol). My initial thoughts seeing this data is that I need to eat more carbs and less fat. That is a difficult transition for me because I started a low-carb diet years ago (with success by the way) and that mentality has stuck. The key is to recognize that all carbs are not created equal. In particular, you want to eat slow-burning, "complex" carbs from sources like whole wheat, Quinoa, and Bulgur wheat. Avoid simple carbs like sugar and sucrose which wreak havoc on your blood sugar. Of course, this is for your day-to-day diet. In race nutrition is primarily comprised of simple sugar because it can be converted to energy so quickly. But this is when your body's furnace is running hottest. Some people suggest it is acceptable to eat these sugars right after a long training run as well to replenish glycogen stores. Personally I still prefer the slow burning carbs after a long, hard workout.
Before ending this post, I want to emphasize one thing: consistency. There are no easy answers to this equation. People spend millions of dollars a year on diets that are simple, quick, or the latest fad. In the end, the truth is that people that consistently eat calories close to what their body needs day-in-and-day-out will maintain weight. If you exceed that number, you'll gain weight. Pretty simple. Tracking the sources of calories is helpful to understand how you can eat more without eating more calories (hint: cut out fat!) and how you can leave your body feeling energized all day long. This is particularly important for a runner. But it has other implications. For example, research has shown that cancer growth rate can be slowed by eating less fat. Don't look for a silver bullet solution to your diet. Do the work up front to determine what your body needs, and then be as consistent as you can to hit those goals. And use exercise as an excuse to eat better instead of "rewarding" yourself with junk food. Develop a mentality where you feel you are wasting your hard effort by eating that extra piece of whatever.