A farmer will provide a company sales representative with information about previous crop yields and his or her target yields and the company representatives will visit the farm to obtain soil samples, which are analyzed in the company labs. A report is generated, which indicates the soil requirements for nutrients, including nitrogen, phosphorus, potassium, boron, magnesium, sulfur, and zinc. Given these soil requirements, company experts determine an optimal fertilizer blend, using a linear programming model that includes constraints for the nutrient quantities required by the soil (for a particular crop) and an objective function that minimizes production costs.