The carbon footprint of food can be calculated by adding the CO2 emitted during production, transportation, and packaging of the food :
The larger this result, the greater the impact of the food on the environment.
This section explains in detail how Envirofy computes the carbon footprint for each food item. Envirofy crawls the detail pages for all products from an online grocery retailer and extracts Ingredients, Produce Of, and Recycling information to calculate the Total Environmental Impact (TEI). As a consumer's food waste cannot be determined at the point-of-purchase, it is neglected in the equation. The TEI is calculated for 100 grams of the product.
The CO2 cost of food production (e.g. environmental impact of growing food) is determined by the ingredients list. On the example of Tesco's Sharwoods Green Label Mango Chutney 227G  the ingredients list reads “Sugar, Mangoes (45%), Salt, Acid (Citric Acid), Spices”. The mean CO2 value for each ingredient is extracted from [2,4] (CO2 is used as the measure of environmental impact as all publicly available databases provide these data, in contrast to GHG data). As the distribution of ingredients beyond the 45% mango is not clearly stated, an exponential decay function is applied to determine the composition of the remaining 55%: y = a (1 - b) * x; x is the number of remaining items in the list, (1-b) is the decay factor, and a is the remaining percentage (e.g. 55%), and y the amount it contributes to the overall product. Items leading the ingredients list contribute greater towards the final product. If no ingredients list was provided on the product page, the algorithm used the words in the title as a 100% component (e.g. mango from ``Tesco Giant Mango Each'').
The T value is described as: y = d * m * w, where d is the distance travelled, m is the mode of transportation (e.g. lorry, plane), and w is the net weight of the product. From a product's detail page, the list of origin countries is extracted. If there is a single country of origin, the distance between the user and that country's coordinates is calculated in kilometres. Country coordinates are from ; and participants' coordinates are retrieved from the online retailer's website, as it collects location data. If multiple countries are listed including the UK, it is first checked whether the product is in season in the UK ; if true, the UK is assumed to be the country of origin. If however, the product is not in season in the UK or from outside the UK, the average distance from the participant's location to the other countries is calculated. Transport mode ---lorry, train, ship, plane --- is determined on the distance of the product from the consumer, and whether that product is perishable (e.g. avocados). Perishable foods are transported by train or plane, and non-perishable and frozen foods are transported by sea or lorry . If a product originates in Europe, non-perishable foods are on average transported to the UK via lorries, and perishable foods via train; otherwise via ship or plane . Keywords such as ``perfectly ripe``, ``frozen'', and ``dried'' help determine the mode of transport, as well as categorisation of products into ``fresh'' or ``cupboard''. The net weight of a product is extracted from its detail page.
The carbon footprint of the packaging is a function of the plastic’s life cycle , containing plastic production, recycling, and the waste handling of the packaging . If a food item’s packaging consists of recyclable and a non-recyclable components, the P value represents both life cycles. If the online retailer does not specify the type of plastic (e.g. polypropylene, polystyrene), the average life cycle cost for all plastic  is used. The computation of the P value is based on the assumption that all recyclable plastic will be recycled.
 Fredrik Wikström, Helén Williams, Karli Verghese, and Stephen Clune. 2014. The influence of packaging attributes on consumer behaviour in food-packaging life cycle assessment studies - a neglected topic. Journal of Cleaner Production 73 (2014), 100 – 108. https://doi.org/10.1016/j.jclepro.2013.10.042 Towards eco-efficient agriculture and food systems: Selected papers from the Life Cycle Assessment (LCA) Food Conference, 2012, in Saint Malo, France.  J. Poore and T. Nemecek. 2018. Reducing food’s environmental impacts through producers and consumers. Science 360, 6392 (2018), 987–992. https://doi.org/10.1126/science.aaq0216 arXiv:https://science.sciencemag.org/content/360/6392/987.full.pdf  Tesco.com. 2020. Sharwoods Green Label Mango Chutney 227G. https://www.tesco.com/groceries/en-GB/products/254865566  Mike Berners-Lee. 2011. How bad are bananas?: the carbon footprint of everything. Greystone Books.  Inc. CSG, Computer Support Group and CSGNetwork.Com. 2020. Countries, Capitals, Latitude and Longitude Table. http://www.csgnetwork.com/llinfotable.html  The Vegetarian Society of the United Kingdom Limited. 2020. Seasonal UK grown produce. https://vegsoc.org/cookery-school/blog/seasonal-uk-grown-produce/  Time for Change. 2020. CO2 emissions for shipping of goods. https://timeforchange.org/co2-emissions-for-shipping-of-goods/  Flanagan Logistics Warehouse Space. All rights reserved. 2017. How Is Food Transported? https://www.warehouse-space.co.uk/food-transport.html  Aaron Dormer, Donal P. Finn, Patrick Ward, and John Cullen. 2013. Carbon footprint analysis in plastics manufacturing. Journal of Cleaner Production 51 (2013), 133 – 141. https://doi.org/10.1016/j.jclepro.2013.01.014  Zero Waste Scotland. 2020. The carbon impacts of recycling and the effects of transport. https://www.zerowastescotland.org.uk/sites/default/files/Carbon%20impacts%20of%20recycling%20and%20transport.pdf  Juerg from Time for Change. 2020. Plastic bags and plastic bottles – CO2 emissions during their lifetime. https://timeforchange.org/plastic-bags-and-plastic-bottles-co2-emissions-during-their-lifetime/