Solver is an Excel add-in you turn on in settings, then access from the Data tab
Solver is a built-in tool in Excel that finds the best answer to a problem by testing different numbers. It comes with Excel but is turned off by default, so you have to switch it on before you can use it. Once enabled, Solver appears as a button on the Data tab in your ribbon.
Solver works by letting you set a goal (like "maximize profit" or "minimize cost"), then telling it which numbers it can change to reach that goal. It tests combinations automatically instead of you trying numbers one by one. This is useful when you have a spreadsheet with many connected formulas and you need to find the single best answer.
The process takes three steps: turn Solver on, set up your spreadsheet with a goal cell and changeable cells, then run Solver and accept the answer it finds.
Key Takeaways
- Solver is turned off by default in Excel and must be enabled through File > Options > Add-ins before you can use it.
- You need three things set up in your spreadsheet before running Solver: a goal cell with a formula, cells that Solver can change, and constraints that limit what answers are acceptable.
- Solver appears on the Data tab once it is enabled, and you access it by clicking the Solver button in the Analysis group.
- After Solver finds an answer, you choose whether to keep it or go back to your original numbers.
Turning Solver on in Excel
Open Excel and go to File in the top left. Click Options at the bottom of the menu. In the Options window, click Add-ins on the left side. You will see a list of add-ins with checkboxes next to them.
Look for Solver Add-in in the list. If you see it, click the checkbox next to it to turn it on. At the bottom of the window, there is a dropdown that says "Manage:" and next to it a button that says "Go...". Make sure the dropdown shows "Excel Add-ins" before you click Go. A small window will open showing available add-ins. Check the box next to Solver Add-in and click OK.
Close the Options window. Solver is now enabled. Go to the Data tab in your ribbon at the top of the screen. In the Analysis group (on the right side of the Data tab), you should see a Solver button. If you do not see it, close Excel completely and open it again — sometimes the ribbon does not update until you restart.
Setting up your spreadsheet before running Solver
Solver needs three things to work: a goal cell (the number you want to reach), changeable cells (the numbers Solver is allowed to adjust), and constraints (rules about what answers are acceptable). Before you open Solver, build these into your spreadsheet.
The goal cell must contain a formula, not just a number. For example, if you are trying to maximize profit, the goal cell might contain a formula like =Revenue - Costs. Write down the cell address (like B10) because you will need it when you open Solver.
Identify which cells Solver can change. These are usually input cells — the numbers you control. If you are maximizing profit, these might be the price you charge or the quantity you produce. These cells should contain numbers, not formulas. Write down their addresses as a range (like B2:B5) or as individual cells separated by commas.
Add constraints if your answer needs to follow rules. For example, "price cannot be less than $10" or "production cannot exceed 1000 units". You will enter these directly in Solver, so you do not need to build them into the spreadsheet first, but knowing what they are ahead of time makes the process faster.
Opening Solver and entering your settings
Click the Solver button on the Data tab. The Solver Parameters window opens. At the top, you see three fields: "Set Objective", "To", and "By Changing Variable Cells".
In the "Set Objective" field, type or click the address of your goal cell (the cell with the formula you want to reach a target). Next to "To", choose what you want Solver to do: click the radio button for Max (maximize), Min (minimize), or Value Of (reach a specific number). If you choose "Value Of", type the target number in the box next to it.
In the "By Changing Variable Cells" field, type the addresses of the cells Solver can adjust. Use a colon to show a range (B2:B5) or separate individual cells with commas (B2,B4,B6). These are your input cells.
If you have constraints, click the Add button under "Subject to the Constraints". A small window opens where you enter one constraint at a time. Type the cell address, choose an operator (=, <=, >=, <, >, or "int" for whole numbers), and type the limit. Click Add to enter another constraint, or OK when you are done.
Running Solver and keeping the results
Once your settings are entered, click the Solve button at the bottom of the Solver Parameters window. Solver runs and tests different combinations of numbers in your changeable cells. This usually takes a few seconds, though complex spreadsheets may take longer.
When Solver finishes, a window appears showing the result. It tells you whether Solver found an answer that meets all your constraints. If it did, you see the message "Solver found a solution" and two buttons: Keep Solution and Restore Original Values. Click Keep Solution to accept the answer Solver found and update your spreadsheet with those numbers. Click Restore Original Values to go back to the numbers you started with.
If Solver could not find an answer that meets all your constraints, it tells you that too. This usually means your constraints are too strict or contradict each other. Go back and loosen a constraint, then run Solver again.
Common reasons Solver does not work the way you expect
If Solver gives you an answer that does not seem right, check that your goal cell contains a formula, not just a number. Solver cannot optimize a cell that is not calculating something. Also check that your changeable cells contain numbers, not formulas — Solver changes the numbers themselves, so it cannot work with cells that pull data from somewhere else.
If Solver says it found a solution but the answer looks wrong, your constraints may be too loose or missing. Solver finds the mathematically best answer given the rules you set, so if the rules do not match what you actually want, the answer will not match either. Review your constraints and run Solver again.
If Solver takes a very long time or seems to freeze, your spreadsheet may be too complex or your changeable cells may be too many. Solver works best with 10 to 20 changeable cells. If you have more, consider breaking the problem into smaller pieces.
When to use Solver instead of just trying numbers yourself
Solver is worth using when you have more than a few changeable cells or when the relationship between your inputs and goal is not obvious. If you are adjusting one or two numbers and can see the pattern, trying them yourself is faster. If you have five cells that all affect the goal in different ways, Solver saves time.
Solver is also useful when you need to find the absolute best answer, not just a good one. If you are trying to maximize profit and you have ten pricing options, you could try each one, but Solver tests them all at once and tells you which is truly best.
For straightforward "what if" questions — like "what happens if I raise the price by 10 percent" — you do not need Solver. Just change the number and look at the result. Solver is for finding the number that gives you the best result, not for exploring what different numbers do.
Frequently Asked Questions
Why do I not see Solver on the Data tab even after I turned it on?
Close Excel completely and open it again. The ribbon sometimes does not refresh until you restart. If you still do not see it after restarting, go back to File > Options > Add-ins and make sure the dropdown at the bottom says "Excel Add-ins" before you click Go. Some versions of Excel hide Solver in the add-ins list if it is not checked.
Can I use Solver on a Mac version of Excel?
Yes, but the steps are slightly different. On Mac, go to Tools in the menu bar instead of File, then look for Add-ins. The Solver button appears in the same place on the Data tab once it is enabled. The Solver window and how it works are the same.
What does it mean if Solver says "Solver could not find a feasible solution"?
This means no combination of your changeable cells can meet all your constraints at the same time. Your constraints may contradict each other, or they may be impossible to satisfy. Try loosening one constraint — for example, if you said "price must be at least $50" and "profit must be at least $10,000", but those two things cannot happen together, Solver will fail. Adjust one of them and try again.
Can I save a Solver setup so I do not have to enter it again next time?
Yes. In the Solver Parameters window, click the "Save Model" button to save your current setup. Solver saves it as a named range in your spreadsheet. Next time you open Solver, click "Load Model" to bring back that setup. This is useful if you run the same optimization regularly with updated numbers.
What is the difference between Solver and Goal Seek?
Goal Seek (also on the Data tab) works backward from a target number — you tell it what result you want and it finds the one input that produces it. Solver is more powerful: it can change multiple inputs at once and follow multiple constraints. Use Goal Seek for straightforward one-input problems; use Solver when you have many inputs or rules to follow.