Now, energy in is actually the simplest aspect of all of this, this represents the number of calories that you ingest each day from the nutrients protein, carbs, fat, fiber and alcohol. Of course, even that is not so simple. First and foremost, not all foods are digested with identical efficiency. On average, high quality animal-source proteins are digested with roughly 90-95% efficiency with vegetable source proteins coming in lower than that (80-85%), fats digest with about 97% efficiency and carbs can be as low as 80% depending on fiber content.
There can be some variance between different sources of the same nutrient as well. For example, a recently developed carbohydrate called resistant starch (it resists digestion) is absorbed with poor efficiency, more calories are lost in the stool compared to other carbs; some sugar alcohols share this effect (although they can just as readily cause massive stomach upset and diarrhea because of it). You don’t generally see massive differences in proteins or fats although there can be slight differences.
Put differently, some energy is lost prior to digestion (and shows up in the feces), never to be absorbed by the body. But strictly speaking you can make an adjustment on the energy in side of the equation to take digestibility into account with a correction factor (which would vary depending on the nutrient in question)