On page 23 of The McDougall Quick and Easy Cookbook by Dr. and Mary McDougall there is section about the fat you eat is the fat you wear.
I'm paraphrasing - carbohydrates, when injested are used for the main fuel. Approximately 2 pounds of excess carbs are stored in the liver and muscles as glycogen and the rest is dissipated as heat. The body does not store extra carbs as fat because the process is too wasteful.
Proteins in excess are eliminated from kidneys and not stored or routinely converted to carbs or fat.
Fats in excess of our daily needs are stored as fat.
How does this fit calories and weight. If you eat x calories and your body needs y calories then the difference between x and y is what allows you to gain or lose weight. If you are excreting excess protein, then what happens to their calories? What about excess carb calories?