Policies and programs often aim to improve the affordability of nutritious diets, but existing food price indexes are based on observed quantities that may not meet nutritional goals. To measure changes in the cost of reaching international standards of diet quality, we introduce a new cost of diet diversity index based on the lowest-cost way to include at least five different food groups as defined by the widely used minimum dietary diversity for women (MDD-W) indicator and compare that to a Cost of Nutrient Adequacy indicator for the lowest-cost way to meet estimated average requirements of essential nutrients and dietary energy. We demonstrate application of both indexes using national average monthly prices from two very different sources: an agricultural market information system in Ghana (2009–14) and the data used for national consumer price indexes in Tanzania (2011–15). We find that the cost of diet diversity index for Ghana fluctuated seasonally and since mid-2010 rose about 10% per year faster than national inflation, due to rising relative prices for fruit, which also drove up the cost of nutrient adequacy. In Tanzania there were much smaller changes in total daily costs, but more adjustment in the mix of food groups used for the least-cost diet. These methods can show where and when nutritious diets are increasingly (un)affordable, and which nutritional criteria account for the change. These results are based on monthly national average prices, but the method is generalizable to other contexts for monitoring, evaluation, and assessment of changing food environments.