I have a system where I prepackage all my meals. I assemble them at home, and I know ahead how many calories per day I am taking.
I normally take about 800 to 1,000 extra calories above and beyond the exact number of meals I expect to eat. Often in the form of granola bars, Clif bars or Bear Valley bars. Those extra calories generally weigh in the neighborhood of 8 oz. and I carry them out again at the end of the trip.
If I am on a long hike, above 120 miles, I compensate by increasing my calorie allotment toward the end of the hike, for after I've burned through some body fat and revved up my metabolism.