The focus of this study is on feed optimization for pigs and broilers; these feeds are among the top feeds produced in Europe . Optimizing feeds for price and environmental footprint requires three main steps (Fig. ). First, we predict the environmental footprints of feed ingredients by combining multivariate classification and global spatially explicit LCA. In classification, NIRS fingerprints are used to predict the country of origin of the ingredients. These predictions are the basis on which the LCA determines the environmental footprints of crop production. We focus on land stress (i.e., the effect of land occupation and transformation) and climate change, as they are the two key environmental impacts of agricultural production . In our study, the geographical origin is directly linked to the location of the factory where the spectra were measured. This specification is included both in the classification model and in the LCA analysis by considering the transport from the country of origin to the factory location and, if needed, processing into miscible feed ingredients. Second, we predict accurate nutritional compositions of feed ingredients from NIRS fingerprints by using multivariate regression. By incorporating the nutritional composition, environmental footprint, and price of feed ingredients into a multi-objective optimization, we obtain quality-compliant mixture ratios that minimize the environmental and monetary costs of feed production in real time. The optimization step produces Pareto fronts that reveal the effect of nutritional variation on the final feed costs. The technique for order preference by similarity to ideal solution (TOPSIS) then provides trade-off mixture ratios for each front that leverage optimality for the environmental footprint and monetary price under the constraint of quality compliance. Fig. . Workflow of the approach presented in this study. The approach uses the near-infrared (NIR) spectra of eight feed ingredients used in feed production, which were harvested in six different countries of origin and whose spectra were measured at four factory locations. After measurement, the feed ingredients were transported to a common production location where they were mixed into feed. The exact production location was unknown and hence excluded from the study. NIR spectra were assigned to 18 different classes, characterized by feed ingredient, country of origin and measurement location. We predicted environmental footprints by combining multivariate classification with LCA and nutritional content via multivariate regression of each class of feed ingredients from the spectra. The predicted nutritional content was used for 1000 simulations with varying nutritional compositions for each class of feed ingredients. These simulations, together with the predicted environmental footprints, the target feed, and the price of feed ingredients, comprising commodity price and transport cost, became the input for the multi-objective optimization framework. This framework aims to find, for each simulation, the trade-off mixture ratio that minimizes environmental footprints and monetary costs while meeting the quality standards. The figure was created using an existing world map .