Feedsoft
Feedsoft
Blog
Formulation12 min readJune 1, 2026

How Least-Cost Feed Formulation Works, Step by Step

A walkthrough of how least-cost feed formulation combines ingredient prices, nutrient requirements, and constraints to find the lowest-cost valid formula, with a worked example.

Ears of yellow corn stacked at a grain market, a core ingredient in least-cost feed formulation.
Key takeaways

Least-cost formulation searches every feasible ingredient combination to find the one that meets all nutrient requirements at minimum cost.

The quality of the answer depends entirely on the inputs: ingredient analyses, current prices, nutrient specs, and realistic ingredient limits.

The mathematically cheapest formula is not always the right one; availability, quality variation, and production realities must shape the constraints.

The question the solver answers

Every feed producer faces the same recurring question: of all the ingredient combinations that would meet this animal's nutritional requirements, which one costs the least today? Least-cost formulation answers that question with optimization instead of trial and error. If you are new to formulation tools in general, our overview of what feed formulation software does is a good place to start.

The setup is always the same. You tell the system what the feed must achieve, what ingredients are available, what they cost, and what limits apply. The solver then finds the mix with the lowest total cost that violates none of the rules. Change a price or a constraint and the answer may change; the logic never does.

Input one: ingredient prices

Each candidate ingredient enters the model with its current cost per unit of weight. Prices are the objective the solver minimizes, so stale prices produce formulas that are optimal for a market that no longer exists. Serious operations update prices continuously from purchasing data, which is one reason formulation works best when it is connected to inventory and purchasing.

Price alone never decides whether an ingredient enters the formula. An expensive ingredient with a dense nutrient profile can beat a cheap filler, because the solver evaluates cost per unit of nutrition delivered, not cost per kilogram.

Input two: nutrient requirements

The specification defines what the finished feed must contain: a minimum for crude protein, a range for calcium, minimums for digestible lysine and methionine, an energy target, and so on. These come from breed standards, research tables, and the nutritionist's own experience with the animals and the local conditions.

Each requirement becomes a constraint the solver cannot violate. Tighter constraints shrink the space of valid formulas and usually raise cost; looser constraints widen the space and lower cost but risk performance. Managing that tension is the nutritionist's craft, and the solver makes the cost of each decision visible.

Input three: ingredient limits and practical constraints

Beyond nutrition, real formulas need practical guardrails. Maximum inclusion rates keep palatability and digestive problems in check. Minimums can guarantee a carrier for a premix. Some limits reflect the mill rather than the animal: a bin that only holds one ingredient, a liquid system with limited capacity, a customer who refuses certain raw materials.

These constraints are where formulation experience lives. A model with only nutrient constraints will happily produce a formula that no mill can mix and no animal will eat. The skill is encoding reality without over-constraining the problem into needless cost.

A simple worked example

Imagine a broiler grower feed built from six ingredients: corn, soybean meal, canola meal, corn DDGS, limestone, and a vitamin-mineral premix. The spec demands a minimum of twenty percent crude protein, an energy floor, amino acid minimums, and a calcium range. The premix is fixed at half a percent, limestone is bounded to keep calcium in range, DDGS is capped at eight percent, and canola at ten percent.

Fed current prices, the solver might fill most of the formula with corn as the cheap energy source and use soybean meal to hit protein and lysine. If DDGS is cheap this week, the solver pushes it to its eight percent cap and trims soybean meal, saving a few dollars per tonne. If canola prices fall sharply, canola displaces part of the soybean meal until its own cap or an amino acid floor stops it. Limestone moves in small amounts to keep calcium in range, and the premix stays fixed.

The point of the example is not the exact numbers; it is that every shift has a reason. Each ingredient enters, leaves, or hits a limit because of an explicit price or constraint, and the solver can tell you which one.

Corn supplies low-cost energy and forms the base of the formula.
Soybean meal carries protein and lysine until cheaper sources compete.
DDGS and canola meal enter when their prices justify their caps.
Limestone fine-tunes calcium at minimal cost.
The premix is fixed by specification, not by optimization.

What the solver actually does

Under the hood, least-cost formulation is linear programming: the formula is a vector of inclusion levels, the constraints define a feasible region, and the solver minimizes the cost function over that region. Modern solvers handle thousands of variables and constraints in milliseconds, so re-optimizing after every price update is routine. For a deeper treatment of the math, see our guide to linear programming in feed formulation.

Speed changes behavior. When a re-optimization costs nothing, nutritionists explore scenarios freely: what happens if wheat replaces corn, what does this spec change cost, how sensitive is the formula to a soybean meal rally. Visual tools that show the feasible region make this exploration intuitive, which is the idea behind our work on teaching formulation with solver visualization.

Why the cheapest formula is not always the best

The solver optimizes the model it is given, not the world. A formula that is mathematically optimal can still be wrong: the winning ingredient may be out of stock or committed to another line, this season's lots may run below their book nutrient values, or an aggressive ingredient switch may upset animals that respond poorly to abrupt diet changes.

Experienced formulators treat the least-cost answer as a starting point and add judgment: availability constraints based on actual stock, quality adjustments based on recent lab results, and smoothing rules that limit how fast inclusion levels change between formula versions. The best systems make those judgments part of the model, with stock levels and lot quality flowing in automatically. Species-specific demands add further nuance, as we cover in poultry feed formulation software.

From solved formula to daily operations

A least-cost formula only saves money when it is produced. That means the formula must flow into purchasing plans, consume real inventory, scale into production batches, and leave a record for quality and traceability. Each manual hand-off between systems is a chance for the produced feed to drift away from the optimized formula.

This is why formulation belongs inside the operational platform rather than beside it. When the solver sees live prices and live stock, and production consumes the exact approved formula version, the optimization on screen becomes the margin on the books.

RELATED PRODUCTS

Explore where this guide fits in Feedsoft

These product lines connect most directly to the workflow covered in this article.