- Open Access
Cost of the Diet: a method and software to calculate the lowest cost of meeting recommended intakes of energy and nutrients from local foods
BMC Nutrition volume 3, Article number: 26 (2017)
When food is available, the main obstacle to access is usually economic: people may not be able to afford a nutritious diet, even if they know what foods to eat. The Cost of the Diet method and software was developed to apply linear programming to better understand the extent to which poverty may affect people’s ability to meet their nutritional specifications. This paper describes the principles of the method; the mathematics underlying the linear programming; the parameters and assumptions on which the calculations are based; and then illustrates the output of the software using examples taken from assessments.
The software contains five databases: the energy and nutrient content of foods; the energy and nutrient specifications of individuals; predefined groups of individuals in typical households; the portion sizes of foods; and currency conversion factors. Data are collected during a market survey to calculate the average cost of foods per 100 g while focus group discussions are used to assess local dietary habits and preferences. These data are presented to a linear programming solver within the software which selects the least expensive combination of local foods for four standard diets that meet specifications for: energy only; energy and macronutrients; energy, macronutrients and micronutrients; and energy, macronutrients and micronutrients but with constraints on the amounts per meal that are consistent with typical dietary habits. Most parameters in the software can be modified by users to examine the potential impact of a wide range of theoretical interventions. The output summarises for each diet the costs, quantity and proportion of energy and nutrient specifications provided by all the foods selected for a given individual or household by day, week, season and year. When the cost is expressed as a percentage of income, the affordability of the diet can be estimated.
The Cost of the Diet method and software could be used to inform programme design and behaviour change communication in the fields of nutrition, food security, livelihoods and social protection as well as to influence policies and advocacy debates on the financial cost of meeting energy and nutrient specifications.
Undernutrition is a global public health problem that is estimated to be the underlying cause of about 35% of all deaths during early childhood . Although the United Nations has enshrined the right to food in the Universal Declaration of Human Rights, household food security is dependent on two main factors: the availability of food, which may be grown, raised, bought, traded or gathered from the wild; and the physical and economic access to sufficient amounts of food to meet all nutritional needs at all times. While it has been commonplace to blame malnutrition on people’s ignorance of what foods to eat, in circumstances in which foods are available to achieve a nutritious and balanced diet, the main obstacle to access is usually economic [2–5]: people may not be able to afford a diet that meets their needs for energy and nutrients even if they know what foods to eat, or aspire to eat.
With this in mind the Cost of the Diet (CotD) method was developed by Save the Children to apply linear computer programming to select a combination of local foods in amounts that would meet the average needs for energy of one or more individuals as well as their recommended intakes of protein, fat and micronutrients, all at the lowest possible financial cost. The method enables public health nutritionists and food security specialists to estimate the cost and affordability of meeting energy and nutrient specifications using local foods, as the software selects the most nutritious and least expensive. Users can then create models of the effect of interventions such as food subsidies or supplements, or of introducing novel or bio-fortified foods. As a practical tool it could be used to estimate the amount of a cash transfer to meet dietary specifications for example, or to estimate the cost of the additional energy and nutrients needed during pregnancy.
The method was conceived in 2005 and the initial tool, developed in Microsoft Excel © and Microsoft Visual Basic ©, underwent several years of development and testing. In 2013 Save the Children began to redevelop the software in a more stable format and, during that process, reviewed and updated the underlying parameters to provide a coherent scientific basis for the method.
The present paper describes the principles of the method, the mathematics underlying the calculations, the parameters and assumptions on which the calculations are based, and then illustrates the output of version 2 of the software using examples taken from assessments undertaken in a variety of situations. Details of how to obtain the software and a practitioner’s guide in both English and French to use the software, are provided.
The application uses linear programming to calculate the amounts of locally available foods that would need to be consumed to meet specifications for energy, macronutrients and micronutrients for any given individual or group of individuals at lowest possible cost. The application can also include and limit the total weight of each separate food to create a mixture that is similar to local dietary habits. The term ‘diet’ is used in this context to describe the foods selected by the software to meet the recommended intakes of energy and nutrients for a day, week, season or year, but which is limited in all calculations to prevent unrealistic amounts of foods being included and to prevent excessive amounts of some nutrients, to avoid toxicity.
Figure 1 shows a flow diagram of the data needed to conduct an assessment, which is separated into two streams: one related to the cost and amount of nutrients provided in foods and the other related to the specification of people’s intakes of energy and nutrients. The information on local foods, their cost per 100 g, and on dietary habits is collected in the location of the assessment using primary data collection methods. The nutrient composition of foods, their portion sizes, and the energy and nutrient specifications of individuals are embedded within the software. If the affordability of the diet is to be estimated, income and expenditure data are required either from a primary source, such as the household economy approach , or from a secondary source.
The software applies parameters from five in-built databases: the energy and nutrient content of foods, with the edible portions of raw foods; the energy and nutrient specifications for individuals, sometimes called energy and nutrient ‘requirements’; an optional collection of standard families of between 4 and 10 individuals that are aligned by their average energy intake with families described during a Household Economy Approach ; the portion sizes of foods; and currency conversion factors. These parameters are applied to data collected during a survey of all raw foods currently available for sale in local food markets plus some inexpensive processed foods, to obtain the average cost of the edible portion of each food per 100 g. The software then selects foods based on their cost, energy and nutrient content to meet the specifications for energy and nutrients of one or more individuals, but in amounts that can be limited by three factors: the portion size, defined as the maximum weight of any given food that can be eaten in one meal; the maximum weight of all food that can be consumed in one meal; and the number of times each food can be included in the diet in a week, set as minimum and maximum constraints. The basis of the calculations and the data required are described in more detail in the following sections.
Location and subjects of an assessment
A Cost of the Diet assessment is typically undertaken in an area in which people have a similar diet, such as a province or district, an urban or peri-urban area, an agro-ecological zone or a livelihood zone, especially when a household economy approach (HEA)  has recently been done. The links to an HEA are described below, but it is not a requirement of the method. The subjects of a Cost of the Diet assessment are usually the poor, who are reported to buy their foods in small amounts on a daily basis, so may pay a higher unit price than if it was bought in large quantities [7, 8]. The analysis of data for groups with specific dietary habits or needs, such as vegetarians or young children, can be done separately by excluding or selecting specific foods to be included in the assessment.
The software contains a database of the concentration of energy and nutrients in 3,580 food items and supplements, each categorised into one of 15 food groups and drawn from analyses in nine countries. The data are extracted from five main food tables: the WorldFood Dietary Assessment System published by the FAO ; a table of foods published by the United States Department of Agriculture (USDA) ; a table of foods from West Africa ; a table of foods from Bangladesh published by the University of Dhaka kindly included with permission ; and a table of average values of common foods calculated for the software, called a CotD food table, described in Additional file 1: Appendix 1. The Bangladesh food tables do not include values for vitamin B12 so average values from the other food tables for the same or similar foods were applied. Each entry in the food table also specifies the following: the proportion of each raw food that can be eaten, called the edible portion factor, described in Additional file 1: Appendix 2; a factor to convert liquid foods in millilitres to their weight in grams based on their specific gravity ; and iron bioavailability factors [14, 15].
Users may add new foods to the database provided that the edible portion of the food is known and that values for the concentration of energy and all nutrients per 100 g of the food are entered into the main food table that is used by the software to calculate a diet. This function allows users to add new raw foods, processed foods, fortified foods and food supplements, plus data on their cost per 100 g, and so to estimate their impact on the quality and cost of the diet.
Identifying local foods and seasons
Data on the foods consumed by people in the locality of an assessment are collected in the field. First, a list of locally available raw foods and commonly consumed processed foods is prepared, typically in consultation with local experts or key informants, to include all foods available in all seasons and including all imported, wild and home grown raw foods. Some commonly consumed canned foods such as fish or manufactured foods such as bread may be included, but they may rarely be purchased by the poor, while their cost usually excludes them from the calculations.
Each food is then identified in the food database in the software by selecting either the example that is geographically closest to the assessment site or the generic CotD food, and then transferred to a new screen to create a local food list. The list of foods can then be printed by the software and used to record current and retrospective prices in all seasons during a market survey.
The same local experts are also used to define up to six seasons of the year, depending on local conditions, as the season often affects the availability and price of foods. This is often done as a part of an HEA. The period covered by all seasons must add up to 365 days. This facility could be used to assess the impact of a short term change in the cost of specific foods, for example.
Market survey of foods: cost per 100 g
A map of the location of all food markets in the assessment area is prepared and an arbitrary minimum sample of six markets are chosen, ideally using a lot quality assurance method of sampling such as centric systematic area sampling method , so that markets in the whole area are covered. This serves to take into account the potentially higher cost of foods in small, distant, rural markets compared with markets in large towns.
In each market an arbitrary sample of up to four traders of each food are visited and asked if they are willing to provide information on the cost of foods, ideally during a quiet time of day so that their business is not disrupted. Each trader is asked the price of each item of food, which is recorded, and the weight of three samples are recorded using a battery operated scale with a precision of 1 g such as a Tanita KD 400 (Tanita Corporation, Japan) which weighs items up to 5 kg. This allows for the fact that many fruits and vegetables are sold in quantities that may differ in weight by season but are sold at a fixed price.
If retrospective data on prices are collected, each trader is asked the price of the same food in each preceding season to cover the whole year or, if the price remains fixed, how much of each food is sold in each season, as traders may adjust the amount or number of items sold rather than the price. The collection of retrospective data on prices is less accurate, but can be used to estimate seasonal changes in the cost of a diet during an assessment conducted at a single point in time.
The data on weights and prices are entered from the forms into the Cost of the Diet software which calculates the average cost per 100 g of each food and applies the values to the linear programming calculations.
After the four standard diets have been calculated (see below), users have the ability to alter the cost per 100 g for any or all foods in any or all seasons, by individual or collectively for a group of individuals. This allows an estimate of the impact of a change in food prices due to the season or a shock such as a natural disaster, or estimates of the effect of interventions such as providing free or subsidised food for a given period, for example.
Currency conversion rates
The price of foods per 100 g can be entered into the software in one of 135 currencies. A database in the software contains average currency conversion rates published by the World Bank for 2013  to allow costs to be calculated in any currency and are convertible into British pounds (GBP), United States dollars (USD) or Euros (EUR). The database will be updated when new values are released. Users can change the conversion factor for any currency or for purchasing power parity  and save this in the assessment, although it would override previous calculations.
Typical dietary habits
An interview is done in the locality of six of the markets with a group of eight to ten local women who prepare food for their family. If an HEA has been done, two women from each wealth group may be selected to assess their potential range in purchasing power.
Each woman is asked how often each week each individual food in the local food list is typically consumed and the answers are categorised to provide a constraint that can then be applied by the software as a maximum and minimum frequency with which each food is consumed in the food habits nutritious diet (see Additional file 1: Appendix 3 and below). For example if most women say that sweet potato is eaten once or twice a day the minimum constraint for sweet potato is set at seven and the maximum is set at 14 so that the software must include sweet potato in the food habits nutritious diet no less than 7 times a week (once a day) but no more than 14 times a week (twice a day). Users can change the minimum and maximum food frequency constraints for individuals or collectively for multiple individuals for each or all foods in any given season. This allows the impact to be assessed of introducing a new food to the diet, to increase or decrease the consumption of any given food, or to exclude specific foods from the diet by setting both constraints to zero.
The same eight to ten women then take part in a focus group discussion to explore whether any foods are taboo for any individuals or in particular periods of the life cycle such as infancy or pregnancy, and to ask if any foods are consumed by specific individuals. This allows individual foods to be excluded from the diet or included for specific individuals.
Portion size and total weight of food
To ensure that the software allows a realistic amount of food that can be consumed at a meal and to promote dietary diversity, a portion size for each food per meal has been calculated in grams and is applied by the software to each food for each individual in the database by a process of scaling. The portion size specifies the maximum weight of any given food per meal and is adjusted for each individual in proportion to their average energy requirement, a proxy for size.
A standard portion size in grams per meal for all food groups has been estimated for a child aged 1–3 years based upon the recommendation that the maximum percentage of energy should be 50% from carbohydrate foods, 30% from fats, 10% from fruit and vegetables and 10% from protein foods . The exceptions to this are: breast milk, milk powder, supplements, infant foods, sugar, honey, confectionary, herbs, spices, salt, flavourings, condiments, and beverages, as described in Additional file 1: Appendix 9.
The portion sizes of foods for all other individuals are calculated by applying a scaling factor calculated by dividing two standard deviations above the average energy requirement for each individual by the average energy requirement of the child aged 1–3 years. This increases the portion size per meal for the food in proportion to energy for someone with a large average energy specification. The method is described in more detail in Additional file 1: Appendix 9.
Users can adjust the portion sizes for each individual or collectively for all individuals for each or all foods in any given season. This parameter strongly influences dietary diversity and therefore cost, but allows an estimate of the effect of increasing or decreasing the amount in a given portion of food as a result of a programme intervention.
As no data on maximum stomach capacity could be found for all 237 individuals in the database, a uniform, empirical approach has been used to create an upper limit to the amount of food that can be consumed in a day based on the assumption that a given individual with an above average requirement for energy can satisfy their needs from a diet with a relatively low energy density. To calculate this upper limit, the mean plus two standard deviations of the energy specification for each individual has been divided by 1 kcal/g, a diet with a low energy density. The method used is described in more detail in Additional file 1: Appendix 10. This parameter cannot be changed by users at the moment but may in future versions of the software as evidence becomes available.
Selecting individuals and standard families
The software contains a database of the amounts of energy, protein, fat and 13 micronutrients for 237 individuals specified by the World Health Organization (WHO) and the Food and Agriculture Organization (FAO) [14, 20–22]. Data are specified separately for:
girls, boys and children of either sex aged between 1–5, 6–8, 9–11 and 12–23 months;
girls, boys and children of either sex aged between 2 and 18 years in 1-year intervals;
men aged 18–29, 30–59 or 60+ years with a body weight of between 50 and 90 kg in 5 kg divisions, each for three levels of physical activity, light moderate and vigorous;
women aged 18–29, 30–59 or 60+ years with a body weight of between 45 and 85 kg in 5 kg divisions, each for three levels of physical activity, light moderate and vigorous;
and for the additional energy and nutrients specified during three stages each of pregnancy or lactation.
The software allows the selection of an unlimited number of individuals to create a group, such as a family or a household, depending on local definitions. The composition of a family, who typically eat the same foods, can be defined by users based on local knowledge or published data.
Alternatively, if an HEA has been done in the same assessment area, users can select from a database of standard families that are aligned with the HEA in terms of their total average energy requirement, as described in Additional file 1: Appendix 4. Users can choose one of 14 such families consisting of between 4 and 10 individuals. All 14 families include a child aged 12–23 months, a lactating woman and an adult man as standard, plus from one to seven children; seven families also contain a woman aged 60+ years to represent a mother-in-law, plus one to six children. The household members are selected so that the total average energy requirement of the family is N x 2,100 kcal in which N is the total number of individuals in a typical family determined during an HEA, usually by wealth group. These standard families cannot be changed by users but the same method of alignment with an HEA could be applied by users to select another group of individuals for an assessment. This facility allows users to assess the impact of theoretical interventions on vulnerable individuals or groups, or on specific target households.
The needs of each individual for energy are specified as the estimated average requirement (EAR)  and are applied as a default value to be achieved, but not exceeded, by the software. When this specification is met it indicates that the probability that the energy needs of any given individual are met is 0.5 or 50%.
Users can adjust the default amount of energy for each individual or collectively for all individuals between the 1st and 99th percentile of the EAR. The factors and method used to calculate these values are described in Additional file 1: Appendix 5. This function allows users to calculate the impact on the cost of the diet of increasing or decreasing the probability that energy requirements are met, perhaps if an individual is inactive or very active, or of increasing energy intake during convalescence, for example.
The needs of individuals for protein are specified as the 95th percentile of the distribution of requirements per kg body weight  multiplied by body weight for each individual, and are applied as a default value to be achieved if possible, but can be exceeded by the software. When this specification is met it indicates that the probability that the protein needs of any given individual are met is 0.95 or 95%. The exceptions are children aged 1–6 months whose recommended daily intake of protein is calculated from the quantity of protein contained in the amount of breast milk required to meet the EAR based on an energy density of 0.67 kcal/ml . This is based on the assumption that the amount of protein in breast milk is sufficient to meet the needs of all infants in this age range.
Users can adjust the default amount of protein for each individual or collectively for all individuals between the 1st and 99th percentile of the recommended intake per kilogram of body weight for all individuals aged >12 months. The factors and method used to calculate these values are described in Additional file 1: Appendix 6. This function allows users to assess how protein specifications influence the cost of the diet.
The needs of each individual for fat are specified as a minimum and maximum percentage of their average energy intake, which is converted into grams of fat by applying an energy density of 9 kcal/g, and varies by age group . The software includes in the diet a minimum amount of fat as a percentage of energy depending on age, which is set at 20% for adults, and must not exceed a maximum, which is set at 35% for adults, as recommended by the WHO . The values applied to each age group are given in Additional file 1: Appendix 7. Users can adjust the default amounts of fat for each individual or collectively for all individuals to provide between 1 and 99% of energy from fat for all individuals aged >12 months. This function allows users to assess how fat specifications influence the cost of the diet.
Vitamins and mineral specifications
The needs of individuals for each of 13 vitamins and minerals are specified as the recommended nutrient intake (RNI)  and are applied as default values by the software to be achieved if possible but can be exceeded by the software unless upper limits are set because of toxicity or adverse effects (see below). The default amounts for all micronutrients except vitamin A, which is expressed as a recommended safe intake, are set at two standard deviations above the estimated average requirement. This indicates that the probability that any given individual’s needs are met is 0.97725 or 97.725%.
Users can adjust the default amount of each micronutrient for each individual or collectively for all micronutrients for all individuals to between the 1st and 99th percentile of the RNI. The factors and method used to calculate these values are described in Additional file 1: Appendix 8. The exceptions are pantothenic acid and magnesium, for which no factors are published to allow adjustments, and for all individuals <12 months of age. This function allows users to identify the micronutrients that most influence the cost of the diet and to examine the financial cost of setting the RNI at 2 SD above the mean in order to minimise the risk of deficiency.
Upper limits for specific nutrients
To prevent the software from creating a diet that exceeds specifications for specific micronutrients that might be toxic, upper limits have been set. The upper limits for vitamin A, vitamin C, niacin, calcium and iron are based upon published evidence of toxicity in excess [14, 24, 25]. The software will not allow these limits to be exceeded so if the limit is met for one nutrient, the specifications for other nutrients may not be reached despite the availability of foods that could provide these missing nutrients. This may mean that the linear programming may not achieve a solution (see below).
The absorption from the diet of iron and zinc is reduced by substances such as phytate and oxalate in plant foods, so a proportion of these nutrients are not bioavailable from foods consumed. Published absorption factors have been applied to each food take into account the bioavailability of iron [14, 15] and are described in the table in Additional file 1: Appendix 11. These parameters cannot be changed by users. For zinc, users have the ability to change both the percentile of the RNI and the degree of absorption of zinc from the diet between low, moderate and high bioavailability as defined by the WHO/FAO  depending on the quality of the diet of individuals in the assessment area. For example, if households typically consume a diet rich in vegetables containing oxalate or phytate such as spinach and cereals, the bioavailability setting for zinc could be changed from moderate, which is the default, to low, which increases the amount of this nutrient that the software needs to include from foods.
The Cost of the Diet software applies all parameters for all individuals and foods to a linear programming solver  to estimate the lowest possible cost of four theoretical diets. These diets provide standard points of reference for the purpose of comparison and allow the incremental cost of increasingly specific requirements to be estimated. The diets meet the following specifications:
The recommended average energy requirements of individuals, called an energy-only diet;
The recommended intakes of energy, protein and fat, called a macronutrients diet;
The recommended intakes of energy, protein, fat and 13 micronutrients, called a nutritious diet;
The recommended intakes of energy, protein, fat and 13 micronutrients but limited in amount by the typical dietary habits of households in the assessment area, called a food habits nutritious diet.
Linear programming calculations
In this context linear programming is a mathematical optimisation process that uses an objective function to minimise the cost of the four diets whilst satisfying constraints for:
the amount of energy as specified, which is met but not exceeded;
the proportion of energy from fat, as specified;
the amounts of protein and 13 micronutrients specified, which is met, but any upper limits are not exceeded;
the portion sizes, an upper limit to the amount of each food that can be included in the diet;
the weight of food, an upper limit to the total amount of food consumed;
the frequency of consuming each food, the number of times each food and each food group can be included in the diet per week.
The programme either establishes a feasible solution, which means that all the constraints listed above are met or adhered to, or an unfeasible solution, which means that a solution that respects all constraints cannot be achieved.
The equations for the cost optimisation and the six constraints listed above are described in detail below. For all following mathematical equations:
X ij represents the weight in grams of food item ‘i’ in food group ‘j’
The mathematic symbol ∑ r i = 1 is the sum of all items across all subscript ‘i’ from 1 to r.
For example, ∑ 3 i = 1 Ai = A1 + A2 + A3
The mathematical symbol ∑ r i = 1 ∑ n j = 1 represents the sum over all subscript ‘j’ from 1 to n and all subscript ‘i' from 1 to r
Swapping the place of Σ does not affect the final answer.
For X ij defined as above, ∑ r i = 1 ∑ n j = 1 X ij represents the sum of all weights of food items ‘i’ in food group ‘j’
The most important function of the linear programming routine is to minimise the total cost of the diet for each individual or group of individuals. The mathematical formula for this function is:
in which: cost ij is the cost of food item ‘i’ in food group ‘j’.
The solver is set to minimise the above expression, which represents the sum of cost for the corresponding amount of each food.
Energy constraints are used to select locally available foods for a diet that provides the estimated average requirements for energy per day, for each specified individual. The software should not create a diet that exceeds or falls below this requirement. The mathematical formula for this function is:
denergy is the desired total dietary energy content.
energy ij is the energy content of food item ‘i’ in food group ‘j’
Nutritional constraints are used to select locally available foods for a diet that provides the recommended intakes of protein, fat and 13 micronutrients specified by the WHO. These specifications are described as ‘desired’ nutrient specification. The software is allowed to exceed these specifications if necessary but it should not exceed the specific upper limits set for vitamin A, niacin, vitamin C, calcium and iron. The mathematical formulae for the constraints are:
N is the set of nutrients of interest.
n ϵ N is the nutrient ‘n’ within the set of nutrients ‘N’.
dnut n is the desired nutrient requirement for all nutrients ‘n’ of interest in ‘N’.
unut n is the upper limit for nutrient requirement for all nutrients ‘n’ of interest in N.
nut ijn is the nutrient ‘n’ content per gram of food item ‘i’ in food group ‘j’.
The mathematical formulae for calculating the portion size scaling factor and applying this factor to the standard portion size for an individual are:
The number of times per week a portion of food can be included in a diet is limited by applying minimum and maximum food frequency constraints. Using these constraints and the portion size as g/meal for each food, the software calculates the minimum and maximum weekly amount of each food in grams which can be selected for a diet by multiplying the portion size by the weekly frequency. The mathematical formulae for the constraints are:
min ij is the minimum portion size of food item ‘i’ in food group ‘j’
max ij is the maximum portion size of food item ‘i’ in food group ‘j’
The number of times per week a food from any given food group can be included in the diet is limited by applying a maximum food group constraint. This enables the user to adjust the frequency with which each food group can be consumed in a week. For all diets the maximum frequency is set at a default value of 105 times per week for all food groups. This gives the software the option to include up to five foods from a food group for three meals a day, 7 days a week. The mathematical formula for this function is:
av ij is the weight (in grams) of an average portion size of the specified food item ‘i’ in food group ‘j’.
S(s) is the food group ‘s’ within the set of food groups S.
fgmax s is the maximum number of servings in the food group ‘s’.
The total quantity of food (in grams) that the software can include in a diet is limited by applying a total food weight constraint. The mathematical formula for this constraint is:
in which TFW is the total food weight.
Cost of the Diet software
The design specified by Save the Children for the Cost of the Diet application determined the achitecture of the software. The specifications were: the application should be deployable without requiring any other software to function and should not require administrator rights to install it; the software should need only to be copied onto a hard disc from which it should run directly; and the software should run on low specification computers using a Microsoft Windows operating system from Windows XP to the latest version available in 2016.
The software is a database application using the Windows Single Document Interface (SDI) model. The user interface has been implemented to use a “wizard” type workflow whereby the user navigates backwards and forwards through a series of screens, building an assessment model on the way. Each screen is presented in the form of a spreadsheet with both data and most of the navigation links. A menu structure has been implemented to make the navigation familiar to Windows users, so it is intuitive.
The application has been written in Embarcardero’s Delphi (version XE7 ©) an object-orientated language based on Object Pascal. This was chosen because of Delphi’s reputation for rapid application development, its ability to be built with little modification for several platforms, and that fact that it runs independently without the need for installation. The application has three major components:
The user interface to enter data, to navigate through the system and to select reports, which includes third party software TMS Grid Pack © matrix utilities and FastReport © report generator.
The linear programming module (lp_solve version 18.104.22.168) that optimises the foods chosen within diets to minimise cost and within chosen dietary constraints .
The database back-end (SQLite) that stores all the data entered by the user to build the assessment, manipulate the data to feed into lp_solve, and store results for presentation.
The software can be downloaded from: http://www.heacod.net/countries/reports/cotd-software-version-2-2016/ Users are asked to register and agree to the licence conditions to use the software, which is free. Registration ensures that users will be informed of updates to databases and bug fixes. Bugs should be reported to firstname.lastname@example.org with a screen capture that includes any error message. The method and software are explained in a manual , which is available in English (http://www.heacod.net/countries/reports/cotd-practitioners-guide-v2-english/) or French (http://www.heacod.net/countries/reports/cotd-practitioners-guide-v2-french/).
Income and expenditure data
The cost of a nutritious diet becomes a more meaningful figure when compared with the income and essential expenditure of the poorest members of the community in which an assessment is done. A diet may be inexpensive in comparison with other contexts, but if it is beyond the means of the poor, then a risk of malnutrition exists. If an analysis is wanted of the affordability of the diets generated by the Cost of the Diet software, then information can be entered into the software on the annual income and non-food expenditure for one or more wealth groups. This allows an estimate to be made of the impact of an income generating activity or a social protection scheme such as a cash transfer, on the affordability of a nutritious diet. Such data are usually available from an HEA, a livelihoods based analytical framework which is designed to provide an estimate of household economy for arbitrary levels of wealth within a given community . An HEA also provides useful contextual data such as: the division of a region into livelihood zones; the location of markets and villages; the division of the population into wealth groups; the typical annual income and essential non-food expenditure by wealth group; the typical household size by wealth group; the sources of food for households including wild foods; and a seasonal calendar . For these reasons the two tools have been aligned as described in Additional file 1: Appendix 4. If an HEA has identified that different wealth groups typically contain a different number of individuals within a household, then the cost of the four standard diets will need to be calculated for each of the household sizes to ensure the estimates of affordability are accurate.
Results and discussion
The aim of the Cost of the Diet software is to identify a mixture of foods that meets the recommended energy and nutrient specifications for any given individual or group of individuals within the limits and constraints outlined in the previous section, at the lowest possible cost.
Output of the Cost of the Diet software
The results are presented in the form of tables and graphs that show for each of the four standard diets the cost and degree to which the specifications can be met using locally available foods. Every graph produced by the software can be exported into Microsoft Word© while all tables of data can be exported into either Word© or Excel© for editing if necessary.
Table 1 summarises the outputs of the software for each of the four standard diets for any given individual or selected group of individuals by day, week, season and year. These four standard diets apply the default values of all parameters in order to provide a basis to compare the results from different assessments and must be calculated first, before any changes are made to the parameters. The four diets are incremental: by adding specifications and placing restrictions on the frequency and amounts of each food, a mixture of foods is created that is more typical of a diet, so the cost typically rises. For example, the energy-only diet is the least expensive because the software needs only to meet the specification for the average energy intake of the individuals selected. The food habits nutritious diet is usually the most expensive because all the nutrient specifications need to be met without exceeding any upper limit, while constraints are imposed on the frequency and amounts of foods that can be added in order to create a mixture of foods that is similar to the typical food habits of the population in the assessment area. These limits act to increase the number of foods in the diet and, once the maximum weight of each food has been reached, foods of higher cost or lower nutritional quality are selected to meet the specifications.
The food habits nutritious diet may be less expensive than the nutritious diet if the software is not able to calculate a nutritious diet when typical dietary habits are imposed because a mathematical solution is not achieved. This indicates that local food habits, perhaps influenced by economic poverty, food taboos or food preferences, may affect the inclusion of nutritious foods in the diet. For example, if poor people say that they do not eat eggs, for whatever reason, the constraints should be set so as not to allow the software to include eggs in the diet, even if they are available.
Any comparisons of costs within or between assessment areas are valid only when all the specifications for a diet have been met. If any specification is not met, the total cost is therefore incomplete and costs cannot be compared.
Table 2 illustrates how data are displayed by the software on the weight of 1 day’s food for a nutritious diet in a given season for each of seven members of a household. The table shows the edible weight of each food for each individual and in total, and the total weight of raw food that the household would need to purchase in the market. In this instance the software selected 18 foods from seven food groups, including Bengal gram, milk and three different varieties of green leafy vegetables.
Table 3 illustrates how data are displayed by the software on the percentage of energy and nutrients for each food for a day in a given season for a food habits nutritious diet. The table shows that dried fish has been selected as an inexpensive and rich source of protein, vitamin B2, niacin, pantothenic acid, vitamin B12, calcium, iron, magnesium and zinc. Lentils have been selected by the software as an inexpensive source of vitamin B1, vitamin B6 and folic acid, and provide most of these nutrients in the diet. The software can produce a table of the same structure to summarise data for a week, again for each season.
Table 4 illustrates how data are consolidated and displayed by the software for a period of a year for a hypothetical family of seven individuals. The table shows the total edible weight and cost of the foods selected by the software for a food habits nutritious diet for a year with the percentage contributed by each food in terms of weight, cost, energy, protein and fat; the percentage contribution of each food for eight vitamins and four minerals; and the percentage of the total target met for each nutrient, for all seasons combined. In this example the software has selected eggplant leaves as an inexpensive source of B-group vitamins, vitamin C, vitamin A and calcium, while small dried fish and liver have been selected as rich sources of vitamin B12.
The data presented in Tables can also be displayed by the software in the form of simple graphs. Figure 2 is an example for a hypothetical family of six individuals for a food habits nutritious diet and shows that the specifications for all nutrients for which the software has met by 100% or more in all three seasons. The specifications for some micronutrients may exceed 100% as some have no upper limits. This occurs when amounts of foods are included by the software to meet the specification for another, less available micronutrient. For example, vitamin C, folate and B-group vitamins are often found in green leafy vegetables that contain carotenoid pigments that are converted into vitamin A. When the amount of a nutrient is met by exactly 100% it indicates that this specification is the hardest for the software to meet from locally available foods, but that a solution has been achieved. Any percentage <100% indicates that a solution has not been reached. This does not necessarily mean that the diet is not nutritionally adequate for some individuals, just that the high specification set by the WHO/FAO for the recommended nutrient intake  has not been met.
There are at least four reasons why the software cannot meet specifications for one or more nutrients.
The first is that foods are not available that can provide the nutrient in sufficient quantities, perhaps because the foods are seasonal. This outcome can occur for the nutritious diet, which is allowed to include any combination of foods for up to three meals a day in amounts limited only by their total weight, not by portion size, to meet nutrient specifications.
The second reason is that typical dietary habits, perhaps influenced by economic poverty, food taboos or food preferences, restrict the number of foods containing specific nutrients that can be included in the food habits nutritious diet. If the target for a particular nutrient is met by 100% or more in the nutritious diet but is met by less than 100% in the food habits nutritious diet, then this indicates that typical dietary habits are restricting the amount of a food or foods that the software can include to provide this nutrient. This could be because of food preferences or taboos, or because households cannot afford to buy the foods, both of which mean that specific foods should be excluded from the possible diet by setting the number of times the food can be eaten to zero. This can also be done for foods not given to specific individuals, such as very young children.
The third reason could be a combination of both availability and typical dietary habits, in which case the specification for a nutrient will not be met in either the nutritious diet or food habits nutritious diet.
The fourth reason is that an upper limit has been reached for a specific nutrient before the specifications for all individual nutrients have been met, so the software cannot add any more foods that would contribute to exceeding that limit. Upper limits are set for energy, for some micronutrients, and for the maximum weight of food that be consumed in a meal, as described above. If the upper limit for energy or a nutrient has been met, the software will flag the total percentage of energy or the specific nutrient with a yellow border in the daily or weekly report (see example in Table 3). If the upper limit for the weight of food has been reached, the software will display a warning: ‘This diet cannot be calculated, because an upper limit was reached, this will be either food weight or one of the nutrients’.
Identifying the food groups that contribute the most to the cost of a food habits nutritious diet is another useful way of emphasising the cost, nutrient targets and composition results for this diet. Figure 3 illustrates how the software summarises these data using an example for a household of five individuals in which milk and fish products contribute most to the cost of a food habits nutritious diet because they are the main and least expensive sources of calcium, one of the most difficult nutrient specifications to meet.
The affordability of the energy-only, nutritious and food habits nutritious diets, plus essential non-food expenditure, can be shown as graphs by season and year for individuals or households. This requires data on annual income and essential non-food expenditure for any wealth group, although normally a Cost of the Diet assessment will estimate affordability of each diet for the four wealth groups identified during an HEA, typically described as very poor, poor, middle and better-off wealth groups. These are relative categories, not absolute.
Figure 4 presents an example for four wealth groups consisting of a household of eight individuals, and shows the cumulative percentage of income that would be spent on the energy-only, nutritious and food habits nutritious diets, plus non-food expenditure. This can be used to estimate the percentage of households that might not meet their energy and nutrient specifications after essential non-food expenditure is met, and to estimate the amount of money required to close the gap between income and the cost of each of the three diets. Affordability is not calculated for the macronutrients diet.
The effect of changing underlying parameters
Version 2 of the Cost of the Diet allows users to change almost all of the parameters applied by the software to:
Add foods and supplements;
Change the price of any food or make it free;
Change the portion sizes of foods;
Change the minimum and maximum number of times a specific food or a food group is consumed in a week;
Select any number of predefined individuals to create groups such as families or households;
Change the amount of energy provided by fat to between 1% and 99%;
Change the amounts of energy, protein and micronutrients from the 1st to the 99th percentile of specifications for any given individual or collectively for a group of individuals;
Add or delete wealth groups and change their annual income and annual non-food expenditure.
Once the standard diets have been calculated using the default parameters, models can be created so that, by adding foods or changing parameters, the potential effect on the cost of the diet, on dietary diversity and on nutrient sufficiency can be modelled for a wide range of theoretical interventions for individuals, families or households.
For example: add novel, rare, unusual, improved or fortified foods to the diet ; examine the impact of supplements on the cost of meeting nutrient specifications; support households with food security or livelihoods interventions to increase dietary diversity, food intake or income; test the potential impact of shocks that affect the prices of food or decrease food availability; identify the most nutritious food in a food group by equalising the cost per 100 g to see which foods are included in the diet; test the effect of improved child feeding practices on the cost, composition, quality and affordability of a nutritious diet for children older than 6 months. This list is not exhaustive and users may identify novel uses for the software.
The results that the Cost of the Diet produces are based on the values of the underlying parameters that are applied by the linear programming solver. Changes to these parameters can greatly influence the results that the software produces. In particular, the portion sizes play a key role in determining the number of foods and the cost of the diet. When the portion size is relatively large (>100 g) the software can meet nutrient specifications from a few foods, the dietary variety is small and the cost is minimised by including relatively large amounts of the least expensive foods. When the portion size is small (20 g) then the software is forced to add additional foods in similarly small amounts, some of which are more costly than the least expensive but most nutritious alternatives. This parameter thus increases the diversity of the diet and increases the cost, as more expensive foods are included in the solution.
The number and choice of individuals to include in a family also has an impact on the cost of the diet produced by the software. Figure 5 illustrates the potential range in cost in Bangladesh Taka (BDT) using an example from an assessment. It shows the annual cost of a nutritious diet for the seven standard CotD and HEA families of between four and ten members with an average energy specification of 2,100 kcal per person, the basis of the calculations in an HEA . The costs are also shown for two other families with the same number of members but specified to cover the highest and lowest possible energy specification for all individuals in each hypothetical family. The minimum or low energy family was selected by choosing the lightest and least active family of between four and ten individuals, while the maximum or high energy family was selected by choosing the heaviest and most physically active family of between four and ten individuals. Figure 5 shows that by selecting different individuals to create a hypothetical family with the same number of individuals the cost of a nutritious diet could be 6,570 BDT (14.5 to 5.7%) higher than the cost of a CotD/HEA diet for all high energy requiring families, to 1,970 BDT (4.4 to 1.7%) lower for all low energy requiring families. The fact that households contain more individuals could include an effect of economies of scale when purchasing food, especially staples. This effect could also be modelled in the software by reducing the price per 100 g of foods, but the unit cost of buying in bulk to achieve a lower unit price should be recorded during the market survey.
The ability to set the amounts of energy, protein and micronutrients to any value between the 1st to the 99th percentile of specifications allows the effect of the WHO/FAO recommended nutrient intake to be assessed. This is set for most micronutrients at 2 SD above the mean, equivalent to the 97.725th percentile, to minimise the rise of deficiency in a population, but is an amount which probably exceeds the actual needs of >95% of all individuals. Figure 6 shows the impact that changing the specifications for calcium has on the cost of a nutritious diet for a hypothetical family of seven individuals. The curve is sigmoidal in shape and shows that above the 85th percentile, the annual cost of the nutritious diet increases exponentially as the software includes more, expensive foods to meet the higher specification for calcium. There was no effect on cost when adjusting the amounts of any other micronutrients, so the cost of the diet was driven by the specifications for calcium. This facility could be used to determine the amount of a cash transfer to buy foods that meet micronutrient specifications with a less stringent probability, or to estimate the cost of a high energy specification perhaps due to the needs of greater physical activity or in convalescence.
Comparison with other software
The use of linear programming optimisation to create mixtures of foods is not a new method in animal [30–32] or human nutrition [33–35]. Optifood software is similar to the Cost of the Diet in that it applies linear programming to formulate and test population-specific food-based recommendations to meet the nutritional needs of specific human individuals . Whilst the Cost of the Diet software produces a hypothetical diet for individuals or families based upon the lowest cost combination of all available foods, Optifood aims to formulate food-based dietary guidelines using foods currently eaten or acceptable to the target population based on observed portion sizes and 24 h or longer recalls of foods eaten [37, 38].
Limitations of the method and software
The starting point of the Cost of the Diet software is not the diet of individuals, so it is not a tool to plan a diet nor does it analyse the nutrient content of the foods in a given diet. The software determines the amounts of the least expensive, locally available foods that meet the energy and nutrient specifications of selected individuals or a group of individuals such as a family. Depending on the foods available and their cost, the software may not include animal source foods if nutrients can be obtained less expensively from plant foods. In these circumstances, animal source foods would need to be included purposefully by setting the number of times a food is to be eaten in a week.
The software does not take into account the distribution of foods within a household, which may be unequal. The software does not take into account the loss of nutrients that occur during cooking, though these may be covered to a degree by the high specifications set for micronutrients. The software does not include in its calculations the needs of individuals for iodine and vitamin D because no values for their concentrations in food are published in food tables. The software also does not calculate needs for essential fatty acids or amino acids because such data for foods are not commonly available and because no daily intakes are recommended by the WHO.
The software does not distinguish between native substances with retinol activity and retinol derived from beta-carotene and other carotenoids. Users may therefore find that in diets in which the software has selected green leafy vegetables and orange flesh fruit and vegetables to provide vitamin A, the upper limit for vitamin A may be reached within the software, even though these foods contain beta-carotene, which is not toxic in excess, unlike native retinol from animal products such as liver. This issue will be rectified in a future version of the programme.
Future development of the Cost of the Diet tool and software
Version 2 of the software was rewritten in Delphi ® to provide a platform on which to develop it further and include new functions, dependent on funding. These may include versions in a language other than English and the ability to import food price data from handheld devices to which the market survey forms can be exported. Another facility that may be added is the ability to express the amounts of micronutrients provided by the mixture of food as percentiles of the RNI as well as percentages of the RNI, as they are substantially different and not linearly related. Users are asked to propose additional functions and improvements to email@example.com.
The Cost of the Diet is a tool to develop thinking and stimulate debate about foods, nutrient sufficiency and nutrition security. The flexibility of the software to change the underlying parameters gives the potential to understand what nutrients drive the cost of meeting the RNI in any given locality and to examine the potential effects of changes in food availability and the importance of economic access to nutritious foods. The underlying food and nutrient databases are useful reference material.
The results from a Cost of the Diet assessment could be used in conjunction with other contextual information and data from nutrition and food security surveys to inform nutrition, food security, livelihoods and social protection programmes delivered by development agencies; to inform and influence nutrition and food security related policy; and to inform advocacy processes and debates. Conducting periodic market surveys to collect data on the prices of the relatively small number of foods selected by the software in an assessment as they change by season or due to shortages could potentially enable the tool to be used as an indicator within food security and nutrition early warning systems, although this has not been tested. Data on food prices could be provided each season or periodically by traders who send a text message on a mobile telephone for a small reward of credit, so an assessment could be updated regularly and at low cost, and changes in the cost of the foods selected by the software could be tracked over time.
The description of the method in the present paper and the release of the free software developed by Save the Children will allow practitioners to undertake standard Cost of the Diet assessments and describe novel applications of the method. This could contribute to a new body of knowledge on the actual financial cost in both developing and developed countries of meeting human energy and nutrient specifications from inexpensive, locally available foods.
Cost of the Diet
Estimated average requirement
European Union euros
Food and Agriculture Organization
Great Britain pounds
Household Economy Approach
Recommended nutrient intake
United States dollars
United States Department of Agriculture
World Health Organization
Black RE, Allen LH, Bhutta ZA, Caulfield LE, de Onis M, Ezzati M, et al. Maternal and child undernutrition: global and regional exposures and health consequences. Lancet. 2008;371(9608):243–60. doi:10.1016/S0140-6736(07)61690-0.
Jones HA, Charlton KE. A cross-sectional analysis of the cost and affordability of achieving recommended intakes of non-starchy fruits and vegetables in the capital of Vanuatu. BMC Public Health. 2015;15:301. doi:10.1186/s12889-015-1644-2.
Barosh L, Friel S, Engelhardt K, Chan L. The cost of a healthy and sustainable diet--who can afford it? Aust N Z J Public Health. 2014;38(1):7–12. doi:10.1111/1753-6405.12158.
Newell F, Williams P, Watt C. Is the minimum enough? Affordability of a nutritious diet for minimum wage earners in Nova Scotia (2002–2012). Can J Public Health. 2014;105(3):e158–65.
Geniez P, Mathiassen A, de Pee S, Grede N, Rose D. Integrating food poverty and minimum cost diet methods into a single framework: a case study using a Nepalese household expenditure survey. Food Nutr Bull. 2014;35(2):151–9.
Boudreau T, editor. The Practitioners’ Guide to the Household Economy Approach. London: The Food Economy Group, the Regional Hunger and Vulnerability Programme, Save the Children; 2008.
World Food Programme. Timore Leste: market profile for emergency food security assessments. Rome: World Food Programme; 2006.
Ruel MT, Garrett JL, Morris SS, Maxwell D, Oshaug A, Engle P, et al. Urban challenges to food and nutrition security: a review of food security, health, and caregiving in the cities. Washington: International Food Policy Research Institute; 1998.
WorldFood dietary assessment system [database on the Internet] 1992. Available from: ftp://ftp.fao.org/es/esn/infoods/Wfood2.exe. Accessed: 15 Jan 2017.
USDA National Nutrient Database for Standard Reference [database on the Internet] 2014. Available from: https://fnic.nal.usda.gov/food-composition Accessed: 15 Jan 2017.
Stadlmayr B, Charrondiere UR, Enujiugha VN, Bayili RG, Fagbohoun EG, Samb B, et al. West African Food Composition Table. Rome: Food and Agriculture Organization; 2012.
Shaheen N, Rahim A, Mohiduzzaman M. Food Composition Table for Bangladesh. Dhaka: Institute of Nutrition and Food Science, University of Dhaka; 2013.
FAO/INFOODS Density Database Version 2.0. [database on the Internet] 2012. Available from: http://www.fao.org/infoods/infoods/tables-and-databases/faoinfoods-databases/en/. Accessed: 15 Jan 2017.
WHO/FAO. Vitamin and mineral requirements in human nutrition. 2nd ed. Geneva: World Health Organization; 2004.
Hallberg L, Asp N. Iron nutrition in health and disease. London: John Libbey & Co; 1996.
Coverage Monitoring Network. http://www.coverage-monitoring.org/centric-systematic-area-sampling/. Accessed 15 Jan 2017.
The World Bank. http://databank.worldbank.org/data/reports.aspx?source=2&series=PA.NUS.FCRF&country=. Accessed: 15 Jan 2017.
World Bank purchasing power parity database [database on the Internet]. Available from: http://data.worldbank.org/indicator/PA.NUS.PRVT.PP Accessed: 15 Jan 2017.
Institute of Medicine. Dietary reference intakes for energy, carbohydrate, fiber, fat, fatty acids, cholesterol, protein, and amino acids. Washington, D.C.: National Academies Press; 2005.
WHO/FAO. Human energy specifications. Geneva: World Health Organization; 2001.
WHO/FAO. Protein and amino acid specifications in human nutrition. Geneva: World Health Organization; 2007.
WHO/FAO. Fats and fatty acids in human nutrition. Geneva: World Health Organization; 2008.
FAO/WHO/UNU. Human energy requirements. Report of a joint FAO/WHO/UNU expert consultation, Rome, 17–24 October 2001. Rome: Food and Agriculture Organization; 2002.
Institute of Medicine. Dietary Reference Intakes for Vitamin A, Vitamin K, Arsenic, Boron, Chromium, Copper, Iodine, Iron, Manganese, Molybdenum, Nickel, Silicon, Vanadium, and Zinc. Washington, D.C.: National Academy Press; 2001.
European Union Scientific Committee on Food. Tolerable upper intake levels for vitamins and minerals (updated in February 2006). http://www.efsa.europa.eu/sites/default/files/efsa_rep/blobserver_assets/ndatolerableuil.pdf. Accessed: 15 Jan 2017.
Berkelaar M, Eikland K, Notebaert P. lp_solve: Open source (mixed-integer) linear programming system. 2004. http://lpsolve.sourceforge.net/5.5/.
lp_solve. http://lpsolve.sourceforge.net/5.5/. Accessed 15 Jan 2017.
Deptford A, Hall A. Cost of the Diet. A Practitioner’s Guide. Version 2. London: Save the Children; 2014.
Termote C, Raneri J, Deptford A, Cogill B. Assessing the potential of wild foods to reduce the cost of a nutritionally adequate diet: an example from eastern Baringo District, Kenya. Food Nutr Bull. 2014;35(4):458–79.
Esteban MB, Garcia AJ, Ramos P, Marquez MC. Evaluation of fruit-vegetable and fish wastes as alternative feedstuffs in pig diets. Waste Manag (New York, NY). 2007;27(2):193–200. doi:10.1016/j.wasman.2006.01.004.
Tedeschi LO, Fox DG, Chase LE, Wang SJ. Whole-herd optimization with the Cornell Net Carbohydrate and Protein System. I. Predicting feed biological values for diet optimization with linear programming. J Dairy Sci. 2000;83(9):2139–48. doi:10.3168/jds.S0022-0302(00)75097-1.
VandeHaar MJ, Black JR. Ration formulation using linear programming. Vet Clin North Am Food Anim Pract. 1991;7(2):541–56.
Okubo H, Sasaki S, Murakami K, Yokoyama T, Hirota N, Notsu A, et al. Designing optimal food intake patterns to achieve nutritional goals for Japanese adults through the use of linear programming optimization models. Nutr J. 2015;14:57. doi:10.1186/s12937-015-0047-7.
De Carvalho IS, Granfeldt Y, Dejmek P, Hakansson A. From diets to foods: using linear programming to formulate a nutritious, minimum-cost porridge mix for children aged 1 to 2 years. Food Nutr Bull. 2015;36(1):75–85.
Ryan KN, Adams KP, Vosti SA, Ordiz MI, Cimo ED, Manary MJ. A comprehensive linear programming tool to optimize formulations of ready-to-use therapeutic foods: an application to Ethiopia. Am J Clin Nutr. 2014;100(6):1551–8. doi:10.3945/ajcn.114.090670.
Optifood. http://www.fantaproject.org/tools/optifood. Accessed: 15 Jan 2017.
Hlaing LM, Fahmida U, Htet MK, Utomo B, Firmansyah A, Ferguson EL. Local food-based complementary feeding recommendations developed by the linear programming approach to improve the intake of problem nutrients among 12-23-month-old Myanmar children. Br J Nutr. 2015:1–11. doi:10.1017/s000711451500481x
Skau JK, Bunthang T, Chamnan C, Wieringa FT, Dijkhuizen MA, Roos N, et al. The use of linear programming to determine whether a formulated complementary food product can ensure adequate nutrients for 6- to 11-month-old Cambodian infants. Am J Clin Nutr. 2014;99(1):130–8. doi:10.3945/ajcn.113.073700.
Version 1 of the Cost of the Diet tool and software was conceptualised and developed at Save the Children by Arabella Duffield with the support of Anna Taylor and Claire Chastre, who piloted the first version. Version 2 of the software was developed by Save the Children with the support of Naveed Alam, Michael Grosvenor, Phil Hudson, Vasantha Mountford, Claire Smith and Bob Walkden. The software was developed initially by Management Systems Modelling Ltd (MSM Software) led by Jeff Rayment with Thomas Coles, and the code was written by Matthew Green with support from Mark Reed and Ian Russell.
The Cost of the Diet software and the writing of most of this paper was funded by Save the Children, a non-profit making children’s charity.
Availability of data and material
The Cost of the Diet assessments described in this paper are available as cod files, the CotD format, which are readable by the software, from firstname.lastname@example.org
The original method was conceptualised by Arabella Duffield and Anna Taylor, who are acknowledged below at their request, and were supported by AP; AD and AH developed the specification for version 2 of the software and its underlying parameters with support from AR; EF developed the mathematics of the method which was re-specified for version 2 by TA and PP; RC developed the methods to collect food price data and developed the links with the HEA which were specified by AD and AH; JH developed the portion sizes and food frequency constraints for version 1 and AD and AH developed them further for version 2; JS refactored version 2 of the software code; AD and CD tested the new software and developed the examples for the paper; AD and AH drafted the paper with technical help from TA on the mathematics and from JS on the software. All authors have reviewed and approved the paper.
The authors declare that they have no competing interests.
Consent for publication
Ethics approval and consent to participate
Not applicable. The cost of the diet assessments were undertaken by Save the Children as a part of routine operations and do not apply any data on individuals. All families in the analyses are hypothetical.
About this article
Cite this article
Deptford, A., Allieri, T., Childs, R. et al. Cost of the Diet: a method and software to calculate the lowest cost of meeting recommended intakes of energy and nutrients from local foods. BMC Nutr 3, 26 (2017). https://doi.org/10.1186/s40795-017-0136-4
- Computer software
- Linear programming
- Cost of the diet