Excel Solver and Its Sensitivity Report: Shadow Prices for Finance
Operations asks whether to run Saturday overtime on the machining line, at 18 per extra machine hour. Finance has a product-mix model that says which products to make with the hours available. Nobody can say what an extra hour is worth, because the model only answers “what is the best mix”, not “what would one more hour change”.
Excel’s Solver answers both. It finds the best plan under constraints, and for linear problems it produces a sensitivity report that values each constraint: how much profit an extra unit of capacity adds, and over what range that holds. This post works through a two-product example in Excel 2021 or 365 and explains each column of the report. Solver is a free add-in; enable it under File, Options, Add-ins, Excel Add-ins.
The problem
Two products share two constrained resources.
| Product A | Product B | Available | |
|---|---|---|---|
| Contribution per unit | 40 | 30 | |
| Machine hours per unit | 2 | 1 | 1,000 |
| Labor hours per unit | 1 | 1.5 | 900 |
How many of each should the plant make to maximize contribution?
Set it up
Put the decision variables (units of A and B) in two input cells, say C5 and D5, starting at zero. Then:
Total contribution: =SUMPRODUCT(C5:D5, C6:D6)
Machine hours used: =SUMPRODUCT(C5:D5, C7:D7)
Labor hours used: =SUMPRODUCT(C5:D5, C8:D8)
Open Solver (Data, Solver):
- Set objective: the total contribution cell, To: Max.
- By changing: C5:D5.
- Subject to: machine hours used ≤ 1,000; labor hours used ≤ 900.
- Tick “Make unconstrained variables non-negative”.
- Solving method: Simplex LP.
Simplex LP is the method for problems where every formula is a sum of inputs times constants. It is exact and fast, and it is the only method that produces the sensitivity report described here.
Solve, and Solver returns 300 units of A and 400 of B, for contribution of 24,000. Both constraints are fully used: 1,000 machine hours and 900 labor hours. Making only A would give 20,000; only B, 18,000. The mix beats both.
In the Solver Results dialog, select Sensitivity under Reports before clicking OK. Excel adds a sheet with the report.
Reading the constraints section
| Constraint | Final value | Shadow price | Constraint R.H. side | Allowable increase | Allowable decrease |
|---|---|---|---|---|---|
| Machine hours | 1,000 | 15 | 1,000 | 800 | 400 |
| Labor hours | 900 | 10 | 900 | 600 | 400 |
Shadow price is the increase in the objective from one more unit of the constraint. One more machine hour adds 15 of contribution; one more labor hour adds 10. Check: 1,000 × 15 + 900 × 10 = 24,000, the total. Each binding constraint’s value accounts for its share of the result.
Allowable increase and decrease give the range over which the shadow price holds. Machine hours are worth 15 each anywhere from 600 to 1,800 hours. Beyond 1,800, the plant would be making only Product A and labor hours become the only limit; below 600, it would be making only B. Outside the range, rerun Solver.
So the overtime question has an answer: an extra machine hour is worth 15 of contribution, and Saturday overtime costs 18. Overtime on machining loses 3 an hour. An extra labor hour is worth 10, so labor overtime above 10 an hour does not pay either. A constraint that is not binding, with spare capacity, has a shadow price of zero: more of it is worth nothing until the plan uses it.
Reading the variable cells section
| Cell | Final value | Reduced cost | Objective coefficient | Allowable increase | Allowable decrease |
|---|---|---|---|---|---|
| Units A | 300 | 0 | 40 | 20 | 20 |
| Units B | 400 | 0 | 30 | 30 | 10 |
Objective coefficient is the contribution per unit used. The allowable increase and decrease say how far each product’s contribution can move before the optimal mix changes. Product A’s contribution can range from 20 to 60 and the plan stays at 300 and 400 units (total contribution changes, the mix does not). Product B’s can range from 20 to 60.
This is the pricing question in reverse. A 5 price cut on Product B leaves the mix unchanged. A cut of more than 10 makes the plant shift toward A.
Reduced cost applies to products the plan does not make. It is how much that product’s contribution would need to improve before it enters the mix. Both products are in the plan here, so both are zero.
What finance does with it
- Capacity investment. Shadow price times hours added is the annual value of a capacity expansion, as long as it stays inside the allowable range. Compare it with the cost.
- Overtime and outsourcing. Pay up to the shadow price for one more unit of a binding constraint; above it, the extra unit loses money.
- Pricing. The objective coefficient ranges show how much room there is on each product’s price before the plan changes.
- Which constraint to relieve first. The one with the higher shadow price per cost of relief.
Where it breaks
Non-linear models. If any formula multiplies two decision variables, uses IF, or rounds, Simplex LP refuses or the report is not available. GRG Nonlinear solves those problems but gives a less complete report, and its answers can depend on the starting values.
Integer constraints. Requiring whole units turns off the sensitivity report entirely. Solve without the integer constraint to get the report, then round and check feasibility.
Saved models. Solver settings save with the sheet, but a colleague without the add-in enabled sees nothing. Note on the cover tab that the model uses Solver and which settings to load.
Reading a shadow price outside its range. The 15 per machine hour holds from 600 to 1,800 hours. A plan to add 1,000 hours needs a new solve.
Shadow prices are the optimization version of breakeven analysis: both put a value on one more unit of something. For a single changing input, Goal Seek is usually enough.
