Performance Management · Limiting factors
Shadow Prices and Slack in Linear Programming
Updated 11 October 2026 · Fact-checked
A shadow price is the extra contribution you earn from one more unit of a scarce resource. Find it by increasing that resource by one unit, re-solving the binding constraints and comparing total contribution. It holds only within a valid range. Slack is unused resource on a non-binding constraint, so its shadow price is zero.
Understand Shadow Prices and Slack
Linear programming finds the production plan that maximises contribution when several resources are limited. At the optimal solution, some constraints are fully used. These are binding constraints. Others still have spare capacity.
The shadow price of a resource is the increase in total contribution if you had one more unit of it. It tells you how valuable the resource is at the margin. If labour has a shadow price of $10 per hour, one extra hour lets you earn $10 more contribution. It is also the most you should pay as a premium above the normal cost of that hour.
Slack is the unused amount of a resource at the optimal solution. A constraint with slack is not binding, so more of that resource is worthless to you. Its shadow price is zero. Surplus is the mirror image for a minimum requirement (a 'at least' constraint): the amount by which the requirement is exceeded.
A shadow price is only valid over a range. Add enough of a resource and a different constraint starts to bind. The optimal mix then changes, and the old shadow price no longer applies. Outside the range, you must re-solve.
The shadow price is close to the idea of opportunity cost. It is the contribution you give up if you lose one unit of the resource, or gain if you get one more. In relevant costing, a scarce resource has a relevant cost equal to its normal purchase price plus its shadow price. The contribution figures used in the model already allow for the normal price, so the shadow price is the premium above that.
Key rules to remember
- Shadow price
- Shadow price = change in total contribution ÷ change in the resource (one unit)
- Calculated at the optimal solution, only for a binding constraint and only within the valid range.
- Slack
- Slack = resource available − resource used at the optimal solution
- For a maximum-type (≤) constraint. Slack on a constraint means its shadow price is zero.
- Surplus
- Surplus = amount used or produced − minimum required
- For a minimum-type (≥) constraint. Surplus also means a zero shadow price.
- Maximum premium for extra resource
- Maximum extra price per unit = normal cost per unit + shadow price
- Valid only for units within the shadow price range. Pay less than this and contribution rises.
- Relevant cost of a scarce resource
- Relevant cost = purchase cost per unit + shadow price per unit
- Use when the resource is fully used up and cannot be freely bought.
How to solve Shadow Prices and Slack questions
Use this method for any question that asks for a shadow price, slack or valid range, once the optimal solution is known.
- 1Write each constraint as an equation and identify the optimal point, usually where two lines cross. Solve the equations to get the optimal quantities.
- 2Calculate the optimal total contribution.
- 3Compute the usage of each resource at the optimum and compare it with the amount available. Any difference is slack (or surplus). Slack means a shadow price of zero.
- 4For each binding constraint, increase its availability by one unit. Keep the other binding constraint unchanged and re-solve the two equations.
- 5Recalculate contribution. The shadow price is the new contribution minus the old contribution.
- 6To find the valid range, express the quantities in terms of the resource level, L. Find the values of L at which a quantity falls to zero or another constraint becomes binding.
- 7Apply the answer: for extra units inside the range, shadow price × units is the extra contribution. Compare any premium paid with the shadow price before deciding.
Quickest way: Simultaneous equations for shadow prices
When to use it: When two constraints bind at the optimum and the question asks for both shadow prices. It is quicker than re-solving the whole problem twice.
- Let the shadow prices be a and b for the two binding resources.
- For each product, write: (usage of resource 1 × a) + (usage of resource 2 × b) = contribution per unit.
- Write one such equation for each product made at the optimum. Solve the pair.
- Give zero to any resource with slack.
- Check by increasing one resource by one unit and confirming the contribution change matches.
Common mistakes in Shadow Prices and Slack
Giving a non-zero shadow price to a constraint that has slack.
Students assume every resource is valuable.
Fix: Check usage against availability first. If any is left over, the shadow price is zero.
Quoting the total contribution gained instead of the gain per unit.
Students stop after finding the new total.
Fix: Subtract the old contribution from the new and divide by the change in the resource. Use a one-unit change to keep it simple.
Changing both constraints when testing one resource.
Students re-solve from scratch and mix up the data.
Fix: Change one resource only. Keep every other constraint at its original value.
Ignoring the valid range.
The shadow price looks like a fixed price.
Fix: State the range and check that any extra units stay within it. Beyond the range, the optimal mix changes and the shadow price no longer applies.
Treating the shadow price as the total cost of the resource.
It is confused with the opportunity cost in relevant costing.
Fix: Remember it is the premium above the normal price, because contribution is already after normal cost. The relevant cost is normal cost plus the shadow price.
Rounding the optimal quantities too early.
Answers look neater but then do not tie out.
Fix: Keep exact values through the working and round only the final answer.
Worked examples
Example 1
A company makes products X and Y. X earns contribution of $40 per unit and Y earns $30 per unit. Each X needs 2 labour hours and 1 kg of material. Each Y needs 1 labour hour and 1 kg of material. Available: 100 labour hours, 70 kg of material, and demand for X is at most 40 units. The optimal plan makes 30 units of X and 40 units of Y. Calculate the shadow prices of labour and material and the slack on each constraint.
Show the solution
- Check usage. Labour: (30 × 2) + (40 × 1) = 100 hours, so no slack. Material: 30 + 40 = 70 kg, so no slack. Demand for X: 30 against 40, so slack of 10 units.
- Optimal contribution = (30 × $40) + (40 × $30) = $1,200 + $1,200 = $2,400.
- Labour and material both bind, so solve with shadow prices a (labour) and b (material).
- For X: 2a + b = 40. For Y: a + b = 30.
- Subtract the second from the first: a = 10. Then b = 30 − 10 = 20.
- Check labour: raise it to 101 hours. Solve 2x + y = 101 and x + y = 70. So x = 31 and y = 39. Contribution = (31 × 40) + (39 × 30) = 1,240 + 1,170 = $2,410, an increase of $10.
- Check material: raise it to 71 kg. Solve 2x + y = 100 and x + y = 71. So x = 29 and y = 42. Contribution = (29 × 40) + (42 × 30) = 1,160 + 1,260 = $2,420, an increase of $20.
Answer: Shadow price of labour is $10 per hour. Shadow price of material is $20 per kg. Labour and material have no slack. The demand constraint for X has slack of 10 units, so its shadow price is zero.
Example 2
Using the same business, the labour shadow price is $10 per hour. (a) Find the range of labour hours over which this shadow price is valid, assuming the material constraint stays at 70 kg. (b) The company can buy 8 extra labour hours at a premium of $4 per hour above the normal rate. Should it buy them?
Show the solution
- Let labour available be L. The binding equations are 2x + y = L and x + y = 70.
- Subtract: x = L − 70. Then y = 70 − x = 140 − L.
- Quantity of X must not be negative: L − 70 ≥ 0, so L ≥ 70.
- Quantity of Y must not be negative: 140 − L ≥ 0, so L ≤ 140.
- Demand for X must not exceed 40: L − 70 ≤ 40, so L ≤ 110.
- The tightest limits are 70 and 110, so the shadow price is valid from 70 to 110 hours.
- Extra hours: 100 + 8 = 108, which is within the range.
- Gain from extra labour = 8 × $10 = $80. Extra premium cost = 8 × $4 = $32. Net gain = $80 − $32 = $48.
- Check by re-solving: at 108 hours, x = 38 and y = 32. Contribution = (38 × 40) + (32 × 30) = 1,520 + 960 = $2,480, which is $80 more than $2,400.
Answer: The labour shadow price is valid for 70 to 110 hours. The company should buy the 8 extra hours. The premium of $4 is below the shadow price of $10, giving a net gain of $48.
Exam tips
- In objective test questions, shadow price answers are all or nothing. Always check the one-unit change by re-solving before you pick an option.
- If the question gives you the optimal solution, do not re-solve the full problem. Use the usage figures to find slack and the simultaneous equations to find shadow prices.
- When asked whether to buy extra resource, compare the premium with the shadow price and check the extra units are within the valid range.
- In written answers, state the meaning in plain words: 'one more hour increases contribution by $10, as long as the plan stays within the range'.
- Show the working for slack: available, used, difference. Marks go for each line even if one number is wrong.
Practice questions from Limiting factors
- A company makes products X and Y. Machine hours are the only scarce resource. X has a contribution of $24 per unit and uses 3 machine hours;…
- Brenner Co needs 1,000 units each of components P and Q. Machine hours available are 3,000 and the machine time needed is 2 hours per unit o…
- In a linear programme, the shadow price of machine hours is $5 per hour and the constraint currently limits output to 100 hours. Which state…
- A company has a single limiting factor of skilled labour. Product M has contribution of $40 per unit and uses 5 hours. Product N has a selli…
- A company uses linear programming to plan production of two products. Which statement about the feasible region and the optimal solution is …
Shadow Prices and Slack in other exams
The same ground in other exams, if you are preparing for more than one or want another angle on it.
Shadow Prices and Slack: frequently asked questions
What is the difference between a shadow price and opportunity cost?
The shadow price is the extra contribution from one more unit of a scarce resource. The opportunity cost is the contribution lost when you use a unit elsewhere. For a binding resource they measure the same marginal value. In relevant costing you add the shadow price to the normal purchase cost.
Why is the shadow price of a resource with slack zero?
Slack means some of the resource is already unused. Extra units would stay unused, so contribution would not rise. That makes the value of an extra unit zero.
What is the difference between slack and surplus?
Slack is the unused part of a resource on a maximum (≤) constraint. Surplus is the amount by which a minimum (≥) requirement is exceeded. Both mean the constraint is not binding and its shadow price is zero.
How do I find the valid range of a shadow price?
Write the optimal quantities in terms of the resource level. Then find the levels at which a quantity falls to zero or another constraint starts to bind. The tightest of these limits give the range. Outside it the optimal mix changes and the shadow price is no longer correct.