BackgroundA transition to healthy and sustainable diets has the potential to improve human and planetary health but diets need to meet requirements for nutritional adequacy, health, environmental targets, and be acceptable to consumers.ObjectiveThe objective of this study was to derive a nutritionally adequate and healthy diet that has the least deviation possible from the average observed diet of Danish adults while aiming for a greenhouse gas emission (GHGE) reduction of 31%, corresponding to the GHGE level of the Danish plant-rich diet, which lays the foundation for the current healthy and sustainable food-based dietary guidelines (FBDGs) in Denmark.MethodsWith an objective function minimizing the departure from the average observed diet of Danish adults, four diet optimizations were run using quadratic programming, with different combinations of diet constraints: (1) nutrients only (Nutri), (2) nutrients and health-based targets for food amounts (NutriHealth), (3) GHGE only (GHGE), and finally, (4) combined nutrient, health and GHGE constraints (NutriHealthGHGE).ResultsThe GHGE of the four optimized diets were 3.93 kg CO2-eq (Nutri), 3.77 kg CO2-eq (NutriHealth) and 3.01 kg CO2-eq (GHGE and NutriHealthGHGE), compared to 4.37 kg CO2-eq in the observed diet. The proportion of energy from animal-based foods was 21%–25% in the optimized diets compared to 34% in the observed diet and 18% in the Danish plant-rich diet. Moreover, compared to the average Danish diet, theNutriHealthGHGEdiet contained more grains and starches (44 E% vs. 28 E%), nuts (+230%), fatty fish (+89%), eggs (+47%); less cheese (−73%), animal-based fats (−76%), total meat (−42%); and very limited amounts of ruminant meat, soft drinks, and alcoholic beverages (all-90%), while the amounts of legumes and seeds were unchanged. On average, the mathematically optimizedNutriHealthGHGEdiet showed a smaller deviation from the average Danish diet compared to the Danish plant-rich diet (38% vs. 169%, respectively).ConclusionThe final optimized diet presented in this study represents an alternative way of composing a nutritionally adequate and healthy diet that has the same estimated GHGE as a diet consistent with the climate-friendly FBDGs in Denmark. As this optimized diet may be more acceptable for some consumers, it might help to facilitate the transition toward more healthy and sustainable diets in the Danish population.