Solver, Scenarios and Break-Even Analysis
Spreadsheet Optimization with Solver
Spreadsheet Optimization with Solver turns a business decision into a search for the best permitted plan. You choose what Excel may change, calculate the outcome you want to improve, and describe the business limits. Applications include allocating a marketing budget, scheduling staff, and selecting a production mix. Solver's recommendation depends on the model you supply.
Build a linked decision model
The decision variables are the quantities Solver may change, such as kilograms of two products made each week. Put these quantities in input cells. Keep assumptions, such as contribution per kilogram and available production time, in separate cells.
The objective cell contains a formula linked to the decision cells. For two products with constant contribution rates, the governing objective is
Here, x and y are weekly quantities, cx and cy are contribution per unit, and Z is total weekly contribution. Multiplying dollars per kilogram by kilograms per week gives dollars per week. Use a minimum objective instead when the business aim is to reduce cost.
Changing either quantity should recalculate the objective and the relevant resource totals. If a formula does not depend on the decision cells, Solver cannot improve that formula by changing those cells.
Translate business limits into constraints
A feasible solution satisfies every constraint in the model. A resource ceiling uses ≤, a minimum commitment uses ≥, and an exact requirement uses =. Match units on both sides: minutes used must be compared with minutes available.
For illustration, suppose two blends use one kilogram of shared material per kilogram produced. Blend A requires two labour hours per kilogram; blend B requires one. With weekly limits of 60 kilograms of material and 80 labour hours, the numerical quantities satisfy
The permitted plans lie in the overlap of these restrictions.
Use continuous variables for divisible quantities. Add integer restrictions for whole items. A binary restriction permits only zero or one, appropriate for a yes-or-no decision.
Configure Solver for the model
In desktop Excel's Solver add-in, select the formula cell under Set Objective and choose Max or Min. Identify the input cells under By Changing Variable Cells. Add resource limits, bounds, and any integer restrictions, including nonnegativity where appropriate.
Choose the solving method to match the formulas, not merely the appearance of the worksheet.
Model structure | Suitable Solver method |
|---|---|
Linear objective and linear constraints | Simplex LP |
Smooth nonlinear formulas | GRG Nonlinear |
Non-smooth formulas | Evolutionary |
A linear expression adds constant multiples of decision variables. Multiplying a variable by a fixed unit contribution is linear; multiplying two decision variables together generally is not. Linear models with integer restrictions can also use Simplex LP.
Validate and interpret the result
Read the completion message before keeping the solution. Recalculate the objective independently and substitute the returned quantities into every constraint. Check units, nonnegativity, and integer requirements.
For a resource ceiling, unused capacity equals availability minus usage. A constraint is binding when usage equals its limit, within numerical tolerance. A binding limit does not by itself prove that buying more of that resource would improve the result.
An infeasible model has no plan satisfying all its constraints. An unbounded maximization model permits the objective to increase without a finite maximum; this can signal a missing limit. Solver's stopping reason matters, especially for nonlinear models: a local optimum need not be the global best.
What to remember
- Link the objective and resource formulas to the decision cells.
- Encode every relevant business limit with matching units.
- Match the solving method and variable restrictions to the model.
- Check feasibility and the stopping message before accepting the recommendation.
Example: Optimize a gift-box production plan
A gift company chooses weekly quantities of standard and premium boxes. Each box must be produced whole. All boxes produced within the stated demand limit can be sold, and contributions and processing times remain constant.
Item | Standard box | Premium box | Weekly limit |
|---|---|---|---|
Contribution | $32 per box | $24 per box | — |
Assembly time | 3 min per box | 2 min per box | 180 min |
Labelling time | 1 min per box | 2 min per box | 100 min |
Demand | At most 50 boxes | No additional ceiling | — |
These are the only production limits. Let x be standard boxes per week and y be premium boxes per week.
a) Build the spreadsheet formulas and specify the Solver settings needed to maximize weekly contribution.
Use B2 and C2 as the standard and premium quantity cells. Enter zero initially so the starting plan is feasible. Store contribution and time assumptions separately, then calculate the objective and resource usage from the quantities.
- B2:C2: enter 0 and 0 initially for standard and premium box quantities.
- B3:C3: enter 32 and 24 for contribution in dollars per box.
- B4:C4: enter 3 and 2 for assembly minutes per box.
- B5:C5: enter 1 and 2 for labelling minutes per box.
- E3: enter =SUMPRODUCT(B2:C2,B3:C3) for weekly contribution in dollars.
- E4: enter =SUMPRODUCT(B2:C2,B4:C4) for weekly assembly minutes used.
- E5: enter =SUMPRODUCT(B2:C2,B5:C5) for weekly labelling minutes used.
Each SUMPRODUCT formula multiplies the two quantities by their corresponding per-box values and adds the products. The mathematical model is
Set Objective to E3 and choose Max. Set By Changing Variable Cells to B2:C2. Add E4 ≤180, E5 ≤100, B2 ≤50, and nonnegative integer restrictions on B2:C2. Choose Simplex LP because the objective and resource expressions are linear.
At the initial quantities, contribution is 32(0)+24(0)=$0 per week and both resource totals are zero. This checks the totals for the feasible starting plan, although it does not establish optimality.
b) Find the optimal production quantities and verify the maximum weekly contribution.
First consider the continuous version of the linear model. Its best objective occurs at a feasible vertex. If a best continuous solution also contains whole quantities, it is feasible and optimal for the integer model as well.
Find the intersection of the assembly and labelling boundaries:
Subtract the second equation from the first:
Substitute into the labelling equation:
Now find the other feasible vertices. With y=0, assembly permits ________ standard boxes, labelling permits ________, and demand permits only 50. Thus the standard-only endpoint is (50,0). With x=0, assembly permits ________ premium boxes but labelling permits only 50, giving (0,50).
At the demand boundary x=50, assembly permits
while labelling permits y≤(100−50)/2=25. The feasible upper endpoint on that boundary is therefore (50,15). Together with the origin and the resource intersection, these are all feasible vertices.
Evaluate weekly contribution at each vertex, with coordinates written as standard boxes and premium boxes per week:
- At (0,0): Z=32(0)+24(0)=$0 per week.
- At (50,0): Z=32(50)+24(0)=$1,600 per week.
- At (50,15): Z=32(50)+24(15)=1600+360=$1,960 per week.
- At (40,30): Z=32(40)+24(30)=1280+720=$2,000 per week.
- At (0,50): Z=32(0)+24(50)=$1,200 per week.
The largest contribution is
The maximizing quantities, 40 standard boxes and 30 premium boxes per week, are whole numbers. They therefore attain the continuous upper bound while satisfying the integer restrictions, verifying the integer optimum too.
c) Calculate unused capacity and identify the binding constraints at the optimal plan.
Substitute 40 standard boxes and 30 premium boxes into each business limit. For a ceiling constraint, subtract actual usage from the available amount.
Assembly usage and unused time are
Labelling usage and unused time are
Unused standard-box demand allowance is
The assembly and labelling ceilings are binding because their unused capacities are zero. The standard-box demand ceiling is not binding because production is 10 boxes below it. That unused demand allowance does not provide the processing time needed to produce extra boxes; any revised plan must still satisfy both time limits.
A campus merchandise shop is building a spreadsheet to compare sales assumptions and assess whether revenue covers costs. Match each planning term with its meaning in the model.
Selling price per unit minus variable cost per unit
A named, saved set of input values that can be substituted into a worksheet model
The sales level at which total revenue equals total cost
Break-even point
Scenario
Unit contribution margin
A workshop chooses weekly quantities x and y of two assembled kits. Kits cannot be divided, and production quantities cannot be negative. Each kit of type A requires 4 labour hours and contributes $18; each kit of type B requires 3 labour hours and contributes $16. The workshop has at most 120 labour hours per week. Demand limits production to 24 type A kits and 30 type B kits per week.
The objective is to maximize 18x+16y, with demand bounds x≤24 and y≤30. Which additional configuration correctly represents the remaining requirements?