To use Solver in Excel, first turn on the free Solver add-in (File, Options, Add-ins, Go, then check Solver Add-in). Then click Data, Solver, choose the cell you want to maximize, minimize or hit a target value, pick the cells Solver is allowed to change, add your limits as constraints, and click Solve.
Solver is Excel’s optimization tool. Where Goal Seek changes one input to reach one answer, Solver can change many inputs at once while respecting rules such as budgets, capacity or minimum quantities. This guide walks through setup, every part of the Solver dialog box, a complete worked example, and how to read the reports.
Quick Answer
- Turn on the add-in: File, Options, Add-ins, choose Excel Add-ins in the Manage box, click Go, check Solver Add-in, and click OK.
- Build your model: input numbers, changing cells, a formula for the objective, and formulas for each limit.
- Click Data, then Solver in the Analysis group.
- Fill in Set Objective, choose Max, Min or Value Of, and enter the By Changing Variable Cells.
- Click Add to enter each constraint, pick a solving method, and click Solve.
- Choose Keep Solver Solution and, if you want, select reports before clicking OK.
In This Guide
- Before you start: versions and key terms
- Step 1: Turn on the Solver add-in
- Step 2: Build a worked example
- Step 3: Set up and run Solver
- Choosing a solving method
- Step 4: Keep the result and create reports
- Save models, scenarios and iteration results
- Solver or Goal Seek: which should you use?
- Troubleshooting
- Frequently Asked Questions
Before You Start: Versions and Key Terms
This guide covers Excel for Microsoft 365, Excel 2024, 2021 and 2019 on Windows, with notes for Mac, as of September 2026.
- Windows: Solver is included with Excel as an add-in. It’s off by default, so you need to turn it on once.
- Mac: Solver is also available as an add-in in desktop Excel for Mac. The menu used to turn it on is different from Windows (see Step 1).
- Excel for the web: Microsoft says add-in programs like this aren’t supported in Excel for the web, so the built-in Solver add-in won’t be available there. Open the file in the desktop app instead.
- Phones and tablets: Microsoft says the Solver add-in isn’t available on mobile devices.
Every Solver problem has three parts. Knowing these terms makes the dialog box much easier to fill in:
- Objective cell: the single cell you want to make as large as possible, as small as possible, or equal to a set value. It must contain a formula, such as total profit or total cost.
- Decision variable cells (Excel calls them Variable Cells): the inputs Solver is allowed to change, such as how many units to make. Microsoft’s documentation says you can specify up to 200 of them.
- Constraints: the rules the answer must follow, such as “labor hours used must be less than or equal to hours available.” Constraints usually compare a formula cell with a limit.
Solver only works if the objective and constraint cells are formulas that depend, directly or indirectly, on the variable cells. If changing a variable cell doesn’t change the objective, Solver has nothing to work with. It also helps to keep automatic calculation turned on; see our guide on turning on automatic calculation in Excel if your formulas don’t update.
Step 1: Turn On the Solver Add-in
On Windows
These steps follow Microsoft’s guide to loading the Solver add-in in Excel.
- Open Excel and click File, then Options. Expected result: The Excel Options window opens.
- Click Add-ins in the left pane.
- At the bottom, make sure the Manage box shows Excel Add-ins, then click Go. Expected result: A small Add-ins window lists the available add-ins.
- Check the Solver Add-in box and click OK. If Solver isn’t listed, click Browse to find it. If Excel says the add-in isn’t installed, click Yes to install it.
- Click the Data tab. Expected result: Solver now appears in the Analysis group, usually at the far right of the ribbon.
You only need to do this once. Solver stays enabled each time you open Excel.
On Mac
In Excel for Mac, add-ins are usually managed from the Tools menu in the menu bar at the top of the screen. Click Tools, then Excel Add-ins, check Solver Add-In, and click OK. Solver should then appear on the Data tab. Menu names can vary slightly between Excel versions, so check the macOS tab on Microsoft’s page if yours looks different.
Step 2: Build a Worked Example
The easiest way to learn Solver is with a small, clear model. In this example, a workshop makes chairs and tables. It wants to know how many of each to build to earn the most profit without using more labor or wood than it has.
- Each chair earns $45 profit, uses 2 labor hours and 4 units of wood.
- Each table earns $80 profit, uses 5 labor hours and 6 units of wood.
- The workshop has 400 labor hours and 600 units of wood available.
Enter the model in a new worksheet like this:
| Cell | Contents | What it means |
|---|---|---|
| B1, C1, D1, E1 | Chairs, Tables, Used, Available | Column headings |
| A2, B2, C2 | Profit per unit, 45, 80 | Profit for each product |
| A3, B3, C3 | Labor hours per unit, 2, 5 | Hours each product needs |
| A4, B4, C4 | Wood per unit, 4, 6 | Wood each product needs |
| A5, B5, C5 | Quantity to make, 0, 0 | Variable cells Solver will change |
| D3 | =SUMPRODUCT(B3:C3,B5:C5) | Labor hours used |
| E3 | 400 | Labor hours available |
| D4 | =SUMPRODUCT(B4:C4,B5:C5) | Wood used |
| E4 | 600 | Wood available |
| A6, B6 | Total profit, =SUMPRODUCT(B2:C2,B5:C5) | Objective cell |
SUMPRODUCT multiplies matching cells in two ranges and adds the results. For example, D3 calculates 2 times the number of chairs plus 5 times the number of tables. If you’re less comfortable writing formulas, our guide on using Copilot in Excel to create a formula can help.
Before running Solver, type a few test numbers into B5 and C5 and confirm that D3, D4 and B6 change. Then set them back to 0. This quick check catches most setup mistakes.
Step 3: Set Up and Run Solver
Microsoft’s page on how to define and solve a problem by using Solver describes each box in the dialog. Here’s how to fill them in for the example.
- Click Data, then Solver. Expected result: The Solver Parameters dialog box opens.
- In Set Objective, enter B6 (or click cell B6). Remember, the objective cell must contain a formula.
- Under To, click Max. Use Min for problems such as lowest cost, or Value Of and type a number when you need an exact target.
- In By Changing Variable Cells, enter B5:C5. Separate multiple ranges with commas if your model needs them.
- Next to Subject to the Constraints, click Add. Expected result: The Add Constraint dialog box opens.
- In Cell Reference, enter D3. Choose <= in the middle list. In Constraint, enter E3. Click Add to save it and start another.
- Enter D4 <= E4 for wood, then click OK. Expected result: Both constraints appear in the list.
- Make sure the quantities can’t go negative. If you see a checkbox labeled Make Unconstrained Variables Non-Negative, check it. Otherwise, add the constraint B5:C5 >= 0.
- In Select a Solving Method, choose Simplex LP, because every formula in this model is linear (explained below).
- Click Solve. Expected result: The Solver Results dialog box opens with a message saying Solver found a solution.
For this example, Solver should suggest 75 chairs and 50 tables. That uses exactly 400 labor hours (150 plus 250) and 600 units of wood (300 plus 300), for a total profit of $7,375. Making only chairs would earn $6,750 and making only tables would earn $6,400, so the mix beats either extreme.
Constraint types you can use
The middle list in the Add Constraint box offers these relationships:
- <=, = and >=: less than or equal to, equal to, and greater than or equal to a number or cell.
- int: the variable cells must be whole numbers. Excel shows “integer” in the constraint box. Use this when you can’t make half a table.
- bin: the variable cells must be 0 or 1. Excel shows “binary.” Useful for yes-or-no decisions, such as whether to fund a project.
- dif: all variable cells in the range must have different whole-number values, from 1 up to the number of cells. Excel may show it as “AllDifferent.” Useful for ordering or assignment puzzles.
To edit or remove a constraint later, select it in the list and click Change or Delete. Reset All clears the whole setup, so use it with care.
Choosing a Solving Method
Solver offers three methods. Picking the right one affects both speed and whether the answer can be trusted.
| Method | Use it when | Examples |
|---|---|---|
| Simplex LP | Your objective and constraints are linear: made only of numbers added together or multiplied by constants | Product mix, shipping, staff scheduling, blending |
| GRG Nonlinear | Your model is smooth but not linear, such as formulas with powers, division by a variable, or most standard Excel functions other than IF, CHOOSE and LOOKUP | Pricing with demand curves, curve fitting, loan and growth models |
| Evolutionary | Your model is non-smooth, such as formulas that use IF, CHOOSE or LOOKUP with arguments that depend on the variable cells | Tiered pricing, step costs, complex scheduling rules |
Some practical tips:
- Start with Simplex LP if your model is linear. It’s fast, and when it finds a solution, it’s the true best answer.
- GRG Nonlinear may find a “local” best answer that isn’t the overall best. Try running it again from different starting values in the variable cells and compare results.
- Evolutionary is slower and works by trial and improvement. Give the variable cells sensible upper and lower limits as constraints, which helps it search efficiently.
- If you choose Simplex LP and the model isn’t linear, Solver will tell you the linearity conditions aren’t satisfied. Switch to GRG Nonlinear.
Step 4: Keep the Result and Create Reports
When Solver finishes, the Solver Results dialog box gives you choices:
- Choose Keep Solver Solution to leave the new values in your worksheet, or Restore Original Values to put back what was there before. If you aren’t sure, keep a copy of the workbook first.
- In the Reports box, click one or more report types you want.
- Click OK. Expected result: Each report is created on a new worksheet in your workbook.
According to Microsoft’s Solver report documentation, the available reports depend on the method:
- Simplex LP and GRG Nonlinear: Answer, Sensitivity and Limits reports.
- Evolutionary: Answer and Population reports.
- When no feasible solution is found: a Feasibility report can help you see which constraints conflict.
- When linearity conditions aren’t met: a Linearity report.
What each main report tells you:
- Answer report: the original and final values of the objective and variable cells, plus each constraint and whether it’s “binding” (fully used, like the labor hours in the example) or “not binding” (has room to spare).
- Sensitivity report: how much the answer would change if an input changed. For linear models, it shows shadow prices, which estimate how much the objective would improve if a constraint’s limit increased by one unit. In the example, that tells you what one more labor hour is worth.
- Limits report: the range each variable cell can move through while the other constraints stay satisfied.
If the Sensitivity or Limits report is missing from the list, check whether your model has integer or binary constraints. These reports are generally not offered for models with those constraints. Try solving once without them to study sensitivity, then add them back.
Save Models, Scenarios and Iteration Results
Save your Solver setup
Excel saves the last Solver setup with the worksheet when you save the workbook. To keep several setups on one sheet, use Load/Save:
- Click Data, then Solver.
- Click Load/Save.
- Enter a range of empty cells for the model area and click Save. Excel writes the setup into those cells. To reuse one later, select that range and click Load.
Save a result as a scenario
In the Solver Results dialog box, click Save Scenario and type a name. This stores the variable cell values so you can compare different plans later with Excel’s Scenario Manager.
Watch Solver step through trial solutions
In the Solver Parameters dialog box, click Options and check Show Iteration Results, then click OK and Solve. Solver pauses after each trial solution. Click Continue to see the next one, or Stop to end and open the Solver Results dialog box. This is handy for learning, or for checking that a long-running model is moving in the right direction.
Solver or Goal Seek: Which Should You Use?
| Question | Use |
|---|---|
| What single input gives me exactly this result? | Goal Seek |
| What mix of several inputs gives the best result? | Solver |
| Do I need limits, such as budgets or capacity? | Solver |
| Do I need whole numbers or yes-or-no decisions? | Solver with int or bin constraints |
| Am I comparing a few hand-picked options? | Scenario Manager or a simple table |
A simple rule: if you can name the exact number you want and only one input needs to change, Goal Seek is quicker. If you’re asking “what’s the best way to do this within my limits,” use Solver.
Troubleshooting
The messages below are the ones Solver commonly shows. Exact wording can vary slightly by Excel version.
Solver isn’t on the Data tab
Repeat Step 1 and confirm Solver Add-in is checked. If it’s already checked, uncheck it, click OK, then turn it back on. If you’re using Excel for the web or a phone, switch to the desktop app.
“Solver could not find a feasible solution”
Your constraints conflict, so no answer can meet all of them. Check each constraint’s direction (for example, a >= entered as <=), look for typos in limit cells, and remove constraints one at a time to find the conflict. The Feasibility report can help.
“The Objective Cell values do not converge”
The objective can keep growing (or shrinking) without limit, usually because a constraint is missing. In the example, forgetting the wood or labor limit would let profit grow forever. Add the missing limit.
“The linearity conditions required by this LP Solver are not satisfied”
You chose Simplex LP for a model that isn’t linear. Switch to GRG Nonlinear, or Evolutionary if your formulas use IF or LOOKUP with the variable cells.
The answer has decimals I can’t use
Add an int constraint to the variable cells. Solving may take longer, and some reports won’t be available.
Results change each time I run it
This is normal for GRG Nonlinear from different starting points and for Evolutionary, which uses randomness. Run it several times and keep the best result, or reformulate the model as linear if possible.
Frequently Asked Questions
Is Solver free in Excel?
Yes. The standard Solver add-in comes with desktop Excel for Windows and Mac. You only need to turn it on.
Can I use Solver in Excel for the web?
Microsoft says the built-in Solver add-in can’t be used in Excel for the web because add-in programs like it aren’t supported there. Open the workbook in desktop Excel instead. Some third-party optimization add-ins exist, but check the publisher and privacy details before installing one.
How many variables can Solver handle?
Microsoft’s documentation says you can specify up to 200 variable cells. Larger problems need a more powerful optimization tool.
Does Solver change my data?
Only the variable cells, and only if you choose Keep Solver Solution. Choose Restore Original Values to undo. Saving a copy of the workbook first is still a good habit.
Which solving method should I pick if I’m not sure?
If every formula only adds values and multiplies them by fixed numbers, use Simplex LP. If you use powers, products of variables or most other functions, use GRG Nonlinear. If your formulas use IF, CHOOSE or LOOKUP on the variable cells, use Evolutionary.
Why does Solver say it found a solution but the numbers look wrong?
Solver optimizes exactly what you told it to. Check that the objective formula, the variable cell range and every constraint match the real problem, and that no limit cell contains a typo.
Summary
- Turn on Solver once through File, Options, Add-ins, Go, Solver Add-in.
- Build a model with variable cells, a formula-based objective, and formula-based constraint cells.
- Open Data, Solver, fill in Set Objective, Max, Min or Value Of, and By Changing Variable Cells.
- Add each constraint, pick Simplex LP, GRG Nonlinear or Evolutionary, and click Solve.
- Keep the solution, and use the Answer and Sensitivity reports to understand and explain it.
Next step: recreate the chairs and tables example in a blank workbook, run Solver, and confirm you get 75 chairs, 50 tables and $7,375 profit before applying the same steps to your own data.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.