|Fig. 1: Making 1 kg of beef requires the cow to eat about 13 kg of grain or 30 kg of hay.  (Source: Wikimedia Commons.)|
Human food consumption was the main source of energy for the human civilization until humans were assisted first by farm and transport animals and currently mainly machinery powered by non-food energy sources. Still food plays a major role in supplying energy. This report compares the current magnitude of energy content in food consumption to the total energy use of human civilization to better understand the share and role of food and agriculture in the energy landscape.
Let us assume a current world population of 7 billion and an average daily energy intake of 2940 kcal or 12301 kJ (estimated values for 2015, using the conversion factor of 4.184 kJ/kcal) per person.  This average includes also malnourished people, so an estimate for satisfying everyone's needs would be closer to the industrial countries average of 3440 kcal or 14393 kJ.  Note that these numbers include food not eaten, in other words, wasted. We obtain
This increases to 3.68 × 1019 joules for the desired energy intake (using the industrial countries average).
Let us now double check these numbers by examining the relevant energy flows:
Integrating this expression over a day, and assuming a balanced diet so that the accumulation term is zero, we obain
Humans use on average about 100 watts. The integral of this over a day gives 8640 kJ. This results from internal basal processes and all leaves the body as heat.  Additionally humans secrete daily feces of with a dry mass of about 0.2 kg. [3,4] Converted this with an average energy content of biological matter of 20 MJ/kg, we obtain an average of 4000 kJ per day of energy present in the secretions. (This assumes negligible energy content of the urine.) The total of 12640 kJ is comparable to the food energy intake and thus corroborates the calculation.
The calculation just performed focuses on the energy content of all eaten food. However, if we want now to get the energy at the source of the food chain and to see what plant energy is required to feed the animals which make the products we consume, we have to take animal conversion efficiencies into account. This will lead to higher numbers.
About one third of the human population follow a meat-heavy diet, while the other two thirds follow a mostly plant-based diet.  In a meat-heavy diet, about 30% of calories stem from animal products, of which about half is meat and fish and the other half other animal products. In a plant-heavy diet only about 19% stem from animal products.  That averages to about 22.7% of the wold diet consisting of animal products.
For every 1 kg protein returned in animal products about 6 kg of protein have to be fed to animals. This number varies depending on the animal, and the energy conversion efficiency also varies depending on the product. Thus 0.7 kg grain is used for 1 kg of milk, 2.3 kg grain is used for 1 kg of chicken, and 13 kg grain or 30 kg hay is used for 1 kg of beef. 
However cows dwarf other animals by food intake. (Their manure production is at least an order of magnitude higher than that of other animals.)  Cows are therefore are the most important animals to consider in the average.
As 1 kg of beef has a much higher water content than grain, we shall assume its energy content per kilgram to be half that of grain. Assuming an average grain-to-animal product conversion factor of 10 (for kg grain to kg animal product), this gives a total energy conversion efficiency of 5%. The total energy consumed in plant matter is thus greater than the total energy eaten by the factor
This makes clear how wasteful the practice of eating animal products is. Eating plants indirectly through animal products requires 5 times more energy than eating the plants directly. All plants required to feed the world populace, both directly and indirectly through food crops fed to animals, thus contain energy
We can double check this number by calculating the total energy in all farm animal manure, which gives 
or about 42% of the energy of the food crops fed to farm animals. This seems very reasonable considering that, when eating hay or grass, cows can't digest 45% of it's dry mass.  The latter then ends up in the manure. This then validates the food crop energy estimate.
It is interesting to compare the food energy requirement with the annual world non-food energy consumption from fossil fuels, uranium, and alternative energy sources. The latter amounted to 12476.6 million tons oil equivalent in 2012. Using a conversion factor of 44 MJ / kg, we obtain a worldwide energy consumption of 5.49 × 1020 J.  The global food energy eaten by humans is already a significant portion of this: about 6% for the current and 7% for the desired food energy. The energy content of the food crops (including those fed to animals) is 30% of that number. Note that these numbers include only the food energy itself and do not include additional energy required to make the food through fertilizer, transport, maintenance of equipment etc.. These would increase that percentage significantly.
As current food demands outstrips production, there is a significant gap of about 1/7 of the desired calories that are currently not delivered. Reducing the share of animal products would alleviate this. However, the trend points in the other direction: Many people desire Western standards and want to include more animal products and meat in their diets, and this is cause for the gap to increase. Since food supplies are not adequate for the needs of the population today, food is not abundant at all. Thus a large-scale food-to-fuel scheme would only make a small dent in the conventional fuel demand while leaving many more people hungry.
© Daniel Bechstein. The author grants permission to copy, distribute and display this work in unaltered form, with attribution to the author, for noncommercial purposes only. All other rights, including commercial rights, are reserved to the author.
 "World Agriculture: Towards 2015/2030," Food and Agriculture Organization of the United Nations, 2002.
 C. Binggeli, Building Systems for Interior Designers (Wiley, 2009), p 22.
 J. Fry, "Methane Digesters For Fuel Gas and Fertilizer," New Alchemy Institute, 1973.
 M. Nishimuta et al., "Moisture and Mineral Content of Human Feces - High Fecal Moisture Is Associated with Increased Sodium and Decreased Potassium Content," J Nutr. Sci. Vitaminol. 52, 121 (2006).
 D. Pimentel and M. Pimentel "Sustainability of Meat-Based and Plant-Based Diets and the Environment," Am. J. Clinical Nutr. 78 (Suppl.), 660S (2003).
 R. B. Laughlin, Powering the Future (Basic Books, 2011), p 171.
 H. G. Van Pelt, How to Feed the Dairy Cow (Fred L. Kimball, 1919).
 "BP Statistical Review of World Energy 2013," British Petroleum, June 2013.