# Optimal Product Mix Under Constraints: Worked Examples

> Rank products by contribution per machine hour, not unit margin: five steps, a linear programming example with shadow prices, and product mix vs sales mix.

- Source: https://costandprofitability.com/methods/product-mix-optimization/
- Publisher: Cost and Profitability Consulting (https://costandprofitability.com)
- Author: Miguel Guimarães, Founding Partner
- Last updated: 2026-11-26
- Format: Markdown version of the web page, for AI agents and language models. The HTML page is canonical.

---

Method fileNº PMOEN · Global edition

Sales Mix and Product-Mix Optimization

**Quick answer.** Contribution per machine hour = (selling price − variable cost) ÷ machine hours per unit. Rank products by it and make the highest first, up to demand. In the illustrative example below, product B (€30 of contribution, 0.5 hours) earns €60 per machine hour against €40 for product A (€48, 1.2 hours), so B goes first and the mix earns about €110,000 a month instead of €96,000.

Family
:   Decision analysis

Reading
:   16 min

Editions
:   6 editions

Author
:   Miguel Guimarães

Key point

Product mix optimisation decides which products to make and sell when capacity is constrained. The intuitive rule - favour the product with the highest contribution margin per unit - is right only when nothing is scarce. Once a resource is binding (machine hours, a skilled crew, a raw material, a regulated batch), the correct rule is to rank products by **contribution margin per unit of the scarce resource**, not per unit of product. The product that earns the most margin for each hour, litre or kilogram of the bottleneck should be made first, up to the limit of demand, before any capacity goes to the next-best. The value of one more unit of that scarce resource is its **shadow price** - the extra contribution the business would earn if the constraint were relaxed by one unit - and it is the ceiling on what any expansion of the bottleneck is worth. When the actual mix drifts from the planned one, the profit effect is captured by the **sales-mix variance**. Rank by the constraint, and a mix that looked worse per unit can be the one that maximises profit.

The core idea

## Rank by the bottleneck, not by unit margin

Every business that sells more than one product faces a mix question: given the same factory, team and week, which products should absorb the effort? When capacity is comfortable, the answer is simple - make everything that carries a positive contribution margin, because each extra sale adds margin and nothing is given up. The mix problem only bites when a resource is **scarce**: there are not enough machine hours, not enough of a specialist, not enough of a key material to satisfy all the demand. Now making one product means *not* making another, and the ranking matters.

The mistake is to rank by contribution margin per unit of product. That treats a euro of margin as equally cheap to earn across products, when in a constrained plant it is not - the true cost of a product is the bottleneck capacity it consumes. The correct measure is **contribution margin per unit of the scarce resource**: divide each product's unit contribution by the amount of the bottleneck it uses. The product that returns the most contribution per bottleneck hour (or litre, or kilogram) is the most profitable use of scarce capacity, regardless of how its per-unit margin looks. Fill capacity in that order, up to each product's demand ceiling, and the mix maximises total contribution.

A worked example

## Two products, one bottleneck, and the mix flips

A workshop makes two products, A and B, both passing through one finishing machine that is the binding constraint at 2,000 machine hours a month (illustrative figures, not client data). Product A sells at €120 with variable cost €72, so its contribution is €48 per unit. Product B sells at €90 with variable cost €60, a contribution of €30 per unit. Ranked by unit margin, A wins comfortably - €48 against €30.

But A needs 1.2 machine hours per unit and B needs 0.5. Contribution per **machine hour** is what matters: A earns €48 / 1.2 = **€40 per hour**, while B earns €30 / 0.5 = **€60 per hour**. On the scarce resource, B is the better product by half again, and the ranking flips. Suppose monthly demand is capped at 1,000 units of A and 3,000 units of B. Filling B first uses 3,000 × 0.5 = 1,500 hours and earns €90,000 of contribution; the remaining 500 hours make about 417 units of A for a further €20,000 - total contribution roughly **€110,000**. Had the workshop trusted unit margin and made A first, 1,000 units of A would consume 1,200 hours (€48,000), and the remaining 800 hours would make 1,600 units of B (€48,000) - total **€96,000**. Same capacity, same demand, but the bottleneck-ranked mix earns €14,000 more a month. The **shadow price** of the finishing machine is €40 an hour - the contribution per hour of Product A, the product still queuing for it once B's demand is met - so an extra hour of capacity is worth €40, and no more, until the constraint or the demand ceiling moves.

Step by step

## How to find the optimal product mix: five steps

The workshop above can be solved in five steps, and the same steps apply to any business with a single binding constraint (all figures illustrative).

1. **Find the binding constraint.** Add up what full demand would need from each resource and compare it with what is available. Making 1,000 units of A and 3,000 of B would take 1,000 × 1.2 + 3,000 × 0.5 = 2,700 machine hours against 2,000 available, so the finishing machine binds.
2. **Compute contribution per unit.** Selling price − variable cost: €120 − €72 = €48 for A, €90 − €60 = €30 for B. Only costs that change with the decision belong in variable cost.
3. **Divide by the constraint each unit uses.** €48 ÷ 1.2 = €40 per machine hour for A; €30 ÷ 0.5 = €60 for B.
4. **Rank and fill capacity up to demand.** B first: 3,000 units use 1,500 hours. The other 500 hours make about 417 units of A.
5. **Price the constraint.** The next hour would go to A, so it is worth €40. Overtime or subcontracting at less than €40 an hour adds contribution, but only for the 700 hours it would take to meet the rest of A's demand; beyond that, an extra hour has nothing to make and its value falls to zero.

| Product | Contribution per unit | Machine hours per unit | Contribution per machine hour | Rank | Units made | Hours used | Contribution |
| --- | --- | --- | --- | --- | --- | --- | --- |
| A | €48 | 1.2 | €40 | 2 | about 417 | 500 | €20,000 |
| B | €30 | 0.5 | €60 | 1 | 3,000 | 1,500 | €90,000 |
| Total |  |  |  |  |  | 2,000 | €110,000 |

Ranked by contribution per unit instead, A would go first and the month would end at €96,000. The €14,000 gap comes entirely from the order in which the same hours are filled.

Two scarce resources

## When two resources are scarce: a linear programming example

Suppose the workshop's assembly team is also stretched: it has 2,600 hours a month, and assembly takes 1.0 hour for each unit of A and 0.75 hours for each unit of B (figures illustrative). The finishing machine still has 2,000 hours, and demand is still capped at 1,000 units of A and 3,000 of B. In linear programming terms: maximise 48A + 30B subject to 1.2A + 0.5B ≤ 2,000 (machine), 1.0A + 0.75B ≤ 2,600 (assembly), A ≤ 1,000, B ≤ 3,000 and A, B ≥ 0. A spreadsheet solver returns both the mix and the shadow prices. Now no single ranking gives the right answer, because A earns more per assembly hour (€48 against €40) while B earns more per machine hour.

| Mix tested | Units of A | Units of B | Machine hours | Assembly hours | Contribution |
| --- | --- | --- | --- | --- | --- |
| Rank by contribution per machine hour (B first) | 350 | 3,000 | 1,920 | 2,600 | €106,800 |
| Rank by contribution per assembly hour (A first) | 1,000 | 1,600 | 2,000 | 2,200 | €96,000 |
| Linear programming optimum | 500 | 2,800 | 2,000 | 2,600 | €108,000 |

Linear programming finds the mix at the corner where both constraints bind: 500 units of A and 2,800 of B, using every machine hour and every assembly hour, for €108,000. Neither ranking reaches it. Ranking by machine hours leaves 80 machine hours idle because assembly runs out first; ranking by assembly hours starves B of the machine time it uses so efficiently.

The shadow prices change too. With both resources binding, one more machine hour is worth €15, not €40: it lets the workshop make 1.875 more units of A and 2.5 fewer of B (assembly is full, so B must give way), which adds €90 and removes €75. One more assembly hour is worth €30: 3 more units of B and 1.25 fewer of A (+€90 − €60). These values hold only within a range, until another constraint or a demand cap starts to bind, and every linear programming solver reports them as the dual values of the constraints. As a check, 2,000 × €15 + 2,600 × €30 = €108,000, the optimal contribution.

How it works

## Shadow price and sales-mix variance

Two numbers turn the ranking rule into a management tool. The **shadow price** (or dual value) of a constraint is the extra contribution the business would gain from one more unit of the scarce resource - one more machine hour, one more shift, one more kilogram of the limiting material. With a single binding constraint, it is the contribution per bottleneck unit of the best product that demand would let you make with that extra capacity; with several, it is the dual value linear programming reports. The shadow price is the honest ceiling on what relieving the bottleneck is worth: pay up to it for overtime, subcontracting or a capacity upgrade, and no further. Once the constraint is relaxed enough that demand becomes binding instead, the shadow price drops to zero (with two scarce resources, another constraint usually binds first) - there is no longer anything valuable waiting for the resource.

The **sales-mix variance** looks backwards, explaining why actual profit differed from plan when the blend of products sold was not the blend budgeted. It isolates the profit effect of selling proportionally more of the richer products, or more of the leaner ones, holding total volume constant - separating a genuine mix shift from a simple change in total quantity. Together the two numbers close the loop: the shadow price tells you where to point capacity next, and the sales-mix variance tells you whether the mix you actually achieved helped or hurt.

Mix variances

## Product mix versus sales mix, and the sales-mix variance worked

The two terms are often used as synonyms, but they answer different questions. The **product mix** is the range a business chooses to make and offer, and how much of each, which is the decision this page is about. The **sales mix** is the proportion in which those products actually sell, and it is what the weighted average contribution margin, the break-even point and the sales-mix variance are measured on.

The sales-mix variance compares the actual mix with the budgeted one, at the actual total volume and at budgeted contribution per unit: (actual mix % − budgeted mix %) × actual total units × budgeted contribution per unit, summed over the products. Take an illustrative distributor with no capacity constraint. It budgets 8,000 units, 75% Standard (€20 of contribution each) and 25% Premium (€50 each), a weighted average of €27.50 a unit. It sells 9,000 units, 65% Standard and 35% Premium.

| Product | Budgeted mix | Actual mix | Contribution per unit | Sales-mix variance |
| --- | --- | --- | --- | --- |
| Standard | 75% | 65% | €20 | (65% − 75%) × 9,000 × €20 = −€18,000 |
| Premium | 25% | 35% | €50 | (35% − 25%) × 9,000 × €50 = +€45,000 |
| Total | 100% | 100% |  | +€27,000 favourable |

Under the weighted-average method used in some UK texts, the split by product differs (+€6,750 and +€20,250), but the total is the same. The sales-quantity variance accounts for the rest: 1,000 more units than budget at the budgeted average of €27.50 is +€27,500. Together they make a sales-volume variance of +€54,500, the same figure as comparing each product's actual and budgeted units at its own contribution.

One warning when capacity binds. A sales-mix variance valued at contribution per unit calls a shift towards the product with the larger unit margin favourable. In the workshop that is product A, yet every machine hour moved from B to A gives up €20 of contribution (€60 − €40). Where one resource is scarce, read the mix variance next to contribution per bottleneck hour, or it will praise the wrong mix.

Hidden bottleneck time

## Setups and changeovers: bottleneck time that per-unit figures miss

The ranking is only as good as its two inputs, and the one most often wrong is the bottleneck time per unit. Run times come from the routing; changeovers often do not, yet a changeover on the bottleneck uses the same scarce hour as production. Suppose product B in the workshop needs a one-hour changeover on the finishing machine for every batch (illustrative). Made in batches of 100, its 3,000 units need 30 changeovers, so B really takes 0.51 hours a unit and earns about €58.80 per machine hour. Made in batches of 20, it needs 150 changeovers, 0.55 hours a unit and about €54.55 an hour. B still ranks first here, but the gap between the two products narrows. B would fall below A's €40 only with batches of fewer than four, but in a closer contest the order can flip.

The same applies to the numerator. Contribution per unit should hold only the costs the mix decision actually changes, and products with many small orders, special packaging or heavy service carry costs that a standard variable cost misses. A time-driven model records changeover and handling time per batch and per order, which is how it sharpens both the numerator and the denominator; [time-driven activity-based costing](https://costandprofitability.com/methods/time-driven-activity-based-costing/) shows how the time equations are built.

Assumptions and limits

## When the simple ranking is enough, and when it is not

| What the per-bottleneck rule assumes | Why it can break |
| --- | --- |
| Exactly one resource is scarce | With two or more binding constraints the simple ranking fails; the mix needs linear programming to find the optimum |
| Contribution margins and resource use per unit are constant | Price waterfalls, learning effects and step-fixed capacity make per-unit figures move with volume |
| Each product's demand is independent and capped | Products that are substitutes, complements or bundled cannot be ranked in isolation |
| Only volume-driven variable cost is relevant | Complexity, changeovers and cost-to-serve differ by product, so a "high-margin" product can be expensive to run and sell |
| The bottleneck is known and stable | Constraints move; today's binding machine is relieved and tomorrow the queue forms somewhere else |

None of this makes the rule wrong; it makes it a first, powerful screen. The moment more than one resource binds, the ranking gives way to linear programming, as the two-resource example above shows. And a contribution margin is only trustworthy if the variable cost beneath it is real and the cost-to-serve of each product is understood. That is the bridge to the rest of this encyclopedia: a defensible cost split comes from [time-driven activity-based costing](https://costandprofitability.com/methods/time-driven-activity-based-costing/), the true economics of each product and customer come from [cost-to-serve](https://costandprofitability.com/cost-to-serve/) and [product- and customer-profitability analysis](https://costandprofitability.com/customer-profitability-analysis/), and the shape of where profit actually hides is what [the whale curve](https://costandprofitability.com/whale-curve/) reveals.

Strengths & limits

## When mix optimisation earns its keep

**Strengths.** Ranking by contribution per unit of the constraint is fast, intuitive and often worth real money - it turns "which product is most profitable?" into the correct question, "most profitable per scarce hour?", and frequently reverses the intuitive answer. It sizes the value of extra capacity through the shadow price, so overtime, subcontracting and investment decisions are anchored to a number rather than a hunch. It is the same logic that drives [throughput accounting](https://costandprofitability.com/methods/throughput-accounting/), where the throughput-per-bottleneck-minute ranking guides the whole factory.

**Limits.** It is a single-constraint, short-run model. With multiple binding resources it must hand off to linear programming; with a moving mix, substitute products or unequal cost-to-serve it oversimplifies. Treat it as the opening move - identify the bottleneck, rank by it, act - and then check that the margins and the demand caps feeding the ranking are real. Checking them on your own data is the work of our [profitability consulting](https://costandprofitability.com/profitability-consulting/): TDABC models that show where margin truly lives.

FAQ

## Frequently asked questions

Why rank products by contribution per bottleneck unit instead of per unit?
:   Because when capacity is scarce, making one product means not making another, so the true cost of a product is the bottleneck capacity it consumes. Ranking by contribution per unit of the scarce resource - contribution margin divided by the bottleneck time or material each unit needs - fills capacity with the products that earn the most for each unit of the constraint, which maximises total contribution. Ranking by per-unit margin ignores how much of the scarce resource each product eats.

How do you calculate the optimal product mix?
:   Find the binding constraint, compute each product's contribution per unit (selling price − variable cost), divide it by the units of the constraint each product uses, rank the products by that figure and fill capacity in that order up to each product's demand. In the illustrative example on this page, ranking by contribution per machine hour earns €110,000 a month against €96,000 when ranking by contribution per unit. With two or more binding constraints, use linear programming.

What is contribution margin per machine hour?
:   It is contribution per unit divided by the machine hours each unit uses: (selling price − variable cost) ÷ machine hours per unit. A product with €30 of contribution that needs 0.5 hours earns €60 per machine hour; one with €48 that needs 1.2 hours earns €40. When machine time is the scarce resource, the higher figure wins, whatever the margin per unit.

What is a shadow price?
:   The shadow price of a constraint is the extra contribution a business would earn from one more unit of the scarce resource - one more machine hour, shift or kilogram of limiting material. With a single binding constraint, it equals the contribution per bottleneck unit of the best product still waiting for capacity, and it is the most you should pay for overtime, subcontracting or extra capacity. Once the constraint is relaxed enough that demand becomes binding instead, the shadow price falls to zero.

What is the sales-mix variance?
:   It is the part of a profit variance caused by selling a different blend of products than budgeted, holding total volume constant. It isolates the effect of selling proportionally more of the richer or leaner products, separating a genuine mix shift from a simple change in total quantity, so managers can see whether the mix actually achieved helped or hurt profit.

What happens when more than one resource is scarce?
:   The single ranking stops working, because each resource would rank the products differently, and the optimal mix is found with linear programming. In the illustrative example on this page, ranking by machine hours earns €106,800 and ranking by assembly hours €96,000, while the linear programming optimum earns €108,000.

How is this related to throughput accounting and CVP?
:   Throughput accounting applies the same logic at factory scale: it ranks products by throughput - sales minus truly variable cost - per unit of the bottleneck, and manages the whole plant around that constraint. [Cost-volume-profit analysis](https://costandprofitability.com/methods/cost-volume-profit-analysis/) uses contribution margin too, but assumes a constant sales mix; product mix optimisation is what you reach for when that mix is exactly the decision, and capacity is what forces the choice.

What is product mix analysis?
:   Product mix analysis compares the products a business sells by the contribution each earns, per unit and per unit of any scarce resource, to decide which to grow, reprice or drop. Under a capacity constraint it becomes product mix optimisation: ranking by contribution per bottleneck hour and filling capacity in that order.

What is the difference between product mix and sales mix?
:   The product mix is the range a business decides to make and offer, and how much of each. The sales mix is the proportion in which the products actually sell. Product mix optimisation chooses the first; the weighted average contribution margin, the break-even point and the sales-mix variance are measured on the second.

How do you calculate the sales-mix variance?
:   For each product, multiply the difference between the actual and budgeted mix percentages by the actual total units sold and by the budgeted contribution per unit, then add the results. In the illustrative example on this page, a shift from 75/25 to 65/35 between a €20 and a €50 product, on 9,000 units, gives −€18,000 + €45,000 = +€27,000 favourable.

How do you solve a product mix problem with two constraints?
:   With linear programming. Write the contribution to maximise and one inequality per scarce resource and per demand cap; the optimum lies at a corner of the feasible region, often where both resources bind. In the illustrative example on this page, the optimum of 500 units of A and 2,800 of B earns €108,000, more than either single-resource ranking, and the shadow prices are €15 per machine hour and €30 per assembly hour.

Sources

## References

Horngren, C. T., Datar, S. M. & Rajan, M. V. *Cost Accounting: A Managerial Emphasis* (relevant costing, product-mix decisions under capacity constraints, sales-mix and sales-quantity variances). · Drury, C. *Management and Cost Accounting* (limiting-factor analysis and contribution per unit of scarce resource). · Goldratt, E. M. & Cox, J. *The Goal*, North River Press, 1984 (the theory of constraints and managing the bottleneck). · CIMA, *Official Terminology* (definitions of limiting factor, contribution and sales-mix variance). · Kaplan, R. S. & Norton, D. P. *The Balanced Scorecard* (linking operational constraints to strategic profitability). · Institute of Management Accountants (IMA), *Statements on Management Accounting* (capacity and constraint measurement). · Dantzig, G. B. *[Linear Programming and Extensions](https://press.princeton.edu/books/paperback/9780691059136/linear-programming-and-extensions)*, Princeton University Press, 1963 (linear programming and the dual values behind shadow prices).

Proof

A distributor in New Zealand. €1.335M of cost-to-serve made visible, then halved, and 830 loss-making customers brought down to 295.

[Read the case study →](https://costandprofitability.com/case-study/nz-distributor/)

Who you would be talking to

Miguel Guimarães, Founding Partner

Cost and profitability practitioner for 25+ years. Presented the Damco cost-to-serve case at Managing for Profit (Amsterdam RAI, December 2009), on the same programme as Robert S. Kaplan.

Call [+351 910 313 731](tel:+351910313731)
