Excel's Goal Seek: How to Use It (and When to Use Solver) – LicenceHouse guide

Excel's Goal Seek works backwards from a result. Go to Data > What-If Analysis > Goal Seek, set the formula cell in Set cell, type the result you want in To value, pick the input cell in By changing cell, then click OK. Excel changes that one input until the formula hits your target.

Tool Where to find it Best for
Goal Seek Data > Forecast group > What-If Analysis > Goal Seek One input, one target value
Solver Data > Analysis group > Solver (after you enable the add-in) Several inputs, constraints, maximise or minimise
Data Table Data > What-If Analysis > Data Table Seeing many results side by side

How do you do Goal Seek in Excel?

You do Goal Seek by pointing Excel at a formula, a target and one input cell. The formula must depend on the input, directly or through other cells. Here is a loan example you can copy into a blank sheet.

Goal Seek example using =PMT(B2/12,B3,-B1) for a 20000 loan over 60 months, solving for a 400 payment at about 7.42%

Cell Label Value or formula
B1 Loan amount 20000
B2 Annual rate 7%
B3 Months 60
B4 Monthly payment =PMT(B2/12,B3,-B1)

At 7% the payment in B4 is about 396.02. Say you can afford 400 a month and want to know the highest rate that fits.

  1. Click B4, the cell that holds the formula.
  2. On the Data tab, in the Forecast group, click What-If Analysis and choose Goal Seek.
  3. Check that Set cell shows B4.
  4. In To value, type 400.
  5. In By changing cell, click B2.
  6. Click OK. The Goal Seek Status box reports that it found a solution, and B2 changes to roughly 7.42%.
  7. Click OK to keep the new value, or Cancel to put the old one back.

Note the sign. PMT returns a negative number when the loan amount is positive, which is why the example uses -B1. If you leave the loan positive, the payment shows as negative and you must type -400 as the target. If you are new to PMT-style formulas, our guide to basic maths formulas in Excel covers the building blocks. Remember that Excel stores 7% as 0.07, which is why the rate is divided by 12 for a monthly figure.

When should you use Excel's Solver instead of Goal Seek?

Use Solver when you have more than one input to change, when you need limits on the answer, or when you want the biggest or smallest possible result. Goal Seek only ever changes a single cell and only aims for an exact value. Microsoft's Goal Seek article makes the same point: one variable only, and Solver for anything more.

Table comparing Goal Seek for one input and one target, Solver for several inputs and constraints, and Data Table for many results

Typical Solver jobs include a production mix that maximises profit within machine hours, a staff rota that keeps costs at a minimum, or a price and volume pair that hits a target margin. For the margin side of that, see our profit margin formula guide.

Where is Solver in Excel, and how do you enable it?

Solver is a free add-in that ships with Excel but is switched off by default. Once enabled, it appears on the Data tab in the Analysis group, at the far right of the ribbon.

Five steps to enable Solver in Excel via File > Options > Add-ins, ticking Solver Add-in, then finding it on the Data tab

  1. Go to File > Options > Add-ins.
  2. In the Manage box at the bottom, choose Excel Add-ins and click Go.
  3. Tick Solver Add-in and click OK.
  4. If Excel says Solver is not installed, click Yes to install it.

On a Mac, open the Tools menu, choose Excel Add-ins, tick Solver Add-in and click OK. Solver then shows on the Data tab as well. Microsoft's guide to loading Solver also notes that Solver is not available in the mobile apps.

How do you use Solver in Excel?

You use Solver by naming an objective cell, choosing whether to maximise it, minimise it or hit a value, and listing the cells Solver may change, plus any constraints. Work through this short profit example.

Cell Contents
B2, B3 Units of Product A and Product B (start with 0)
C2, C3 Profit per unit: 30 and 45
D2, D3 Machine hours per unit: 2 and 4
B5 Total profit: =SUMPRODUCT(B2:B3,C2:C3)
B6 Hours used: =SUMPRODUCT(B2:B3,D2:D3)
  1. Click Data > Solver.
  2. In Set Objective, select B5 and choose Max.
  3. In By Changing Variable Cells, select B2:B3.
  4. Click Add under Subject to the Constraints and enter B6 <= 400. Add B2:B3 >= 0, or tick Make Unconstrained Variables Non-Negative. Add B2:B3 int if you need whole units.
  5. For this linear model, pick the Simplex LP solving method.
  6. Click Solve, then choose Keep Solver Solution and click OK.

Pick the method to suit the model. GRG Nonlinear handles smooth curves, such as formulas with powers or division by a changing cell. Evolutionary copes with models that use IF, VLOOKUP or other jumps. You can save the model with Load/Save in the Solver dialog, so colleagues can rerun it. Microsoft's Solver walkthrough lists every constraint type, including bin and dif.

What we commonly see: Solver reports "Solver could not find a feasible solution" because the variable cells feed nothing. If B5 does not depend on B2:B3, through any chain of formulas, Solver has nothing to change. Check the links first with Formulas > Trace Precedents. The second most common cause is constraints that contradict each other, such as a minimum order larger than the capacity.

Why does Excel say it cannot locate the Solver file?

This message usually means the add-in list still points to a Solver file that has moved, been removed by an update, or was damaged. The fix is to reconnect the add-in, and if that fails, repair Office.

  1. Go to File > Options > Add-ins > Manage: Excel Add-ins > Go.
  2. Untick Solver Add-in, click OK, then close and reopen Excel.
  3. Repeat step 1 and tick it again. If Excel offers to delete the entry from the list, accept, then use Browse to find SOLVER.XLAM in the Library\SOLVER folder of your Office installation.
  4. Still failing? Run a repair. In Windows, open the installed apps list in Settings, select your Office product, choose Modify and run Quick Repair, then Online Repair if needed. Microsoft explains both in its repair an Office application article.

If a repair does not help, a clean reinstall usually does. Our guide to completely uninstalling Office covers the removal step before you install again.

How long does Solver take in Excel?

A small linear model solves in under a second, while a large Evolutionary or nonlinear model can run for minutes. Solver time grows with the number of variable cells, the number of integer constraints and how slowly your workbook recalculates, because Solver recalculates the sheet on every trial.

  • Press Esc to stop a run. Excel keeps the last values Solver tried.
  • Open Options in the Solver dialog to set Max Time (Seconds) and Iterations on the All Methods tab.
  • Integer constraints are slow. Try solving without them first, then add them back.
  • Remove volatile functions such as OFFSET, INDIRECT and TODAY from the model, as they force extra recalculation. Our guide to speeding up Excel lists other culprits.

Advanced nuance: Goal Seek and GRG Nonlinear both start from the value already in the changing cell, so the starting guess matters. A formula with two valid answers, such as a quadratic, returns whichever root is nearer the start. If Goal Seek says it "may not have found a solution", try a different starting value in the input cell, or raise Maximum Iterations under File > Options > Formulas. For nonlinear Solver models, the Multistart option on the GRG Nonlinear tab tries several starting points for you.

Do Goal Seek and Solver differ between Excel versions?

No, not in any way that matters for everyday use. Goal Seek and Solver work the same in Excel 2016, 2019, 2021, 2024 and Microsoft 365, on Windows and Mac. Only the ribbon group name has moved over the years, with Goal Seek now under the Forecast group. If your copy is old, note that Office 2021 support ended on 13 October 2026, and the Office 2024 range is supported until October 2029. For the wider model-fitting side of what-if work, see our guide to regression analysis in Excel.

Frequently asked questions

Can Goal Seek change more than one cell?

No. Goal Seek changes exactly one input cell per run. If you need two or more inputs to move together, or you want limits such as "no more than 400 hours", use Solver. You can run Goal Seek several times in a row on different cells, but each run ignores the others, so the result is rarely the best overall answer.

Why does Goal Seek say it may not have found a solution?

Goal Seek stops after a set number of tries, 100 by default, or when it gets close enough. It fails when the target is impossible, when the formula does not depend on the changing cell, or when the starting value is far off. Try a closer starting guess, raise Maximum Iterations under File, Options, Formulas, and check the formula really links to the input.

Can I undo Goal Seek?

Yes. When the Goal Seek Status box appears, click Cancel to restore the original value. If you already clicked OK, press Ctrl+Z straight away to undo the change. Solver offers a similar choice when it finishes: pick Restore Original Values instead of Keep Solver Solution. It is still wise to save a copy before running Solver on a large model.

Is Solver free with Excel?

Yes. The standard Solver add-in comes with desktop Excel at no extra cost, in both one-time purchase editions such as Excel 2024 and in Microsoft 365. You only need to switch it on under File, Options, Add-ins. It handles up to 200 variable cells per model, which covers most business planning sheets.

Does Goal Seek work on a Mac?

Yes. In Excel for Mac, open the Data tab, click What-If Analysis and choose Goal Seek. The dialog has the same three boxes as on Windows: Set cell, To value and By changing cell. Solver also works on the Mac after you enable it from Tools, Excel Add-ins, and then appears on the Data tab.

Related guides

Links in this guide

Link Type Why it helps
Microsoft Support: Use Goal Seek External Official Goal Seek steps and its one-variable limit
Microsoft Support: Load the Solver add-in External Official steps to enable Solver
Microsoft Support: Define and solve a problem with Solver External Full list of Solver settings and constraint types
Microsoft Support: Repair an Office application External Fixes a missing or damaged Solver file
Basic maths formulas in Excel Internal Formula basics behind the worked example
How to calculate percentages in Excel Internal How Excel stores and shows rates
Profit margin formula guide Internal Margin targets are a common Goal Seek job
Completely uninstall Office Internal Last-resort fix when Solver will not load
Speed up Excel Internal Faster recalculation means faster Solver runs
Office 2024 range Internal Supported desktop Excel with Goal Seek and Solver
Regression analysis in Excel Internal Next step for model-fitting what-if work
Data analysis, Excel, Excel tips, How-to