Microsoft Excel Goal Seek works backward from a result you want: provide a formula cell, a target value, and one input cell Excel may change. In Microsoft 365 for Windows, open Data > What-If Analysis > Goal Seek, then fill in the three fields; Excel calculates an input that makes the formula reach the target.
What Goal Seek does
Goal Seek is an Excel what-if analysis tool for answering a question such as, “What value would this input need to have for my formula to return 85?” Instead of changing an input repeatedly and watching the result, you specify the desired result and let Excel search for an input that produces it.
It works with a formula already in the workbook. Goal Seek changes one other cell, recalculating the formula as it searches. For example, it can find the exam score needed to reach a course average, the number of units needed to meet a production target, or the number of hours needed to reach a planned total. It does not write a new formula into the result cell; it changes the input cell’s value.
Goal Seek is part of Excel’s What-If Analysis tools. It is useful when a relationship is already represented by worksheet formulas and you want one unknown input. It is not a forecasting method: it does not decide whether the target or the assumptions behind the formula are sensible.
Prepare the worksheet first
Before opening Goal Seek, build and check the calculation as you normally would. The target cell must contain a formula that depends, directly or indirectly, on the cell Excel will change. The changing cell should contain a number, not a formula. Keep the model understandable so you can tell whether the proposed result is meaningful.
- Choose a formula cell whose result you want to set.
- Choose one numeric input cell that the formula uses and that Excel is allowed to alter.
- Make sure the units match. A target of 85 in a percentage-style calculation means 85 in the underlying scale, not necessarily 0.85.
- Keep a note of the original input if you may want to restore it after the calculation.
Cell formatting can make values look different from their stored numbers. For example, a cell formatted as a percentage may display 85% while its stored value is 0.85. Goal Seek works with the stored value, so inspect the formula and number format when a target appears off by a factor of 100.
How to use Goal Seek in Excel
In Excel for Microsoft 365 on Windows, select Data > What-If Analysis > Goal Seek. The Goal Seek dialog has fields named Set cell, To value, and By changing cell. You can type cell references or select the cells on the worksheet. The Set cell field should point to the formula result; To value is the desired numeric result; By changing cell is the input to adjust.
- Enter the formula in the result cell and a starting value in the input cell.
- Open Data > What-If Analysis > Goal Seek.
- In Set cell, select the formula cell. In To value, type the target number. In By changing cell, select the input cell.
- Select OK to let Excel calculate. Review the Goal Seek Status message and the changed worksheet value.
- Select OK in the status dialog to keep the result, or Cancel to restore the previous worksheet values.
Excel for Mac has the Goal Seek command under Data > What-If Analysis > Goal Seek in current desktop versions; dialog labels and behavior are substantially the same. Goal Seek is not available as a direct command in Excel for the web, so open the workbook in the desktop app to run it. There is no dedicated, universal Goal Seek keyboard shortcut; use the ribbon path. Ribbon key-tip sequences can vary between installations.
Worked example: find a required exam score
Suppose a student has a coursework score of 80, worth 60% of the course grade, and a final exam worth 40%. The aim is to find the final exam score that would produce a weighted course grade of 85. This is an illustrative calculation, not a claim about any particular school’s grading policy.
With the coursework score 80 in A2 and the exam score input in B2, enter the weighted-grade formula in C2: =A2*0.6+B2*0.4. Start B2 at any reasonable score, such as 70; C2 then displays 76. With C2 as the Set cell, 85 as To value, and B2 as By changing cell, Goal Seek returns 92.5. The arithmetic checks: 80 × 0.6 + 92.5 × 0.4 = 48 + 37 = 85.
The answer is a score on the same numeric scale as the inputs. If the school requires whole-number exam marks, 92.5 may not be attainable as an actual mark; Goal Seek does not automatically round the result or enforce grading rules. You would need to check the policy and, if necessary, test the allowed whole-number scores in the worksheet.
What happens during the calculation
Goal Seek repeatedly changes the input cell and recalculates the formula until it gets close enough to the target or cannot find a suitable result. It is a numerical search, not symbolic algebra: Excel does not rearrange your formula into an exact equation and provide a guaranteed answer. The current input can influence the path of the search, especially when the formula is nonlinear.
The result may be approximate within Excel’s calculation tolerance. A success message means Excel found a value that brings the formula sufficiently close to the target; it does not certify that the model is correct. After accepting the result, inspect the formula cell’s actual value and the changed input. If the target is important, calculate the result independently or test it using the worksheet’s formulas.
Goal Seek changes the workbook’s input value. It does not create a record of the assumptions or preserve the original value automatically once you accept the result. Save a copy, note the starting input, or use a separate scenario sheet if you need to compare multiple outcomes.
Limits and when to use another tool
The key limitation is one changing cell. If a target depends on several unknown inputs, Goal Seek cannot adjust all of them together. It also does not provide a built-in way to impose restrictions such as “the result must be an integer,” “the input cannot be negative,” or “these two inputs must add to 100.” It may return a mathematically useful input that is impossible or inappropriate in the real situation.
For a more involved model, use Solver, an Excel add-in designed to optimize an objective while changing multiple cells and applying constraints. Solver is available in desktop Excel, although it may need to be enabled through Excel’s add-in settings. For comparing outcomes across a range of one or two inputs, a one-variable or two-variable data table may be more useful than solving for a single target. For a simple model that can be rearranged safely, direct algebra may be clearer than an iterative search.
Goal Seek is best when there is one unknown, one target, and a formula that links them. Solver is better for constrained optimization; data tables are better for scenario comparisons. These tools answer different questions, so choosing among them depends on whether the task is finding one input, finding an optimum, or seeing many possible outputs.
Common problems and how to fix them
- Set cell is rejected: Check that it contains a formula, not a typed number. Confirm that the formula depends on the changing cell.
- By changing cell is rejected: Choose a single input cell containing a value rather than a formula. Make sure it is not locked by worksheet protection.
- Excel reports it cannot find a solution: The target may be unreachable, the formula may have a discontinuity, or the starting value may lead the search in an unhelpful direction. Try a more suitable starting value and verify the model.
- The answer is unexpected: Check cell references, units, percentage formatting, and whether the formula includes rounding or conditions. Goal Seek optimizes the formula as written, including any modeling mistakes.
- The answer violates a real-world rule: Goal Seek does not enforce bounds or business rules. Validate the input separately or use Solver when constraints are part of the question.
If the workbook uses manual calculation, formula results may not update as expected until calculation is triggered. Check Formulas > Calculation Options and select Automatic if automatic recalculation is appropriate for the workbook. In a large workbook, changing calculation settings can affect performance, so restore the intended setting after troubleshooting.
Frequently Asked Questions
Is Goal Seek the same as Solver?
No. Goal Seek changes one input cell to reach a specified formula result. Solver can change multiple cells and apply constraints while maximizing, minimizing, or targeting an objective.
Can Goal Seek change more than one cell?
No. Its By changing cell field accepts one changing cell. If several inputs must vary together, consider Solver or redesign the calculation so the unknown is represented by one input.
Why does Goal Seek give a decimal answer?
It searches for a numeric value and does not know that your real-world input must be a whole number. Check the rules for the problem, then round or test permitted values separately rather than assuming the decimal answer is usable.
Does Goal Seek work in Excel for the web?
Goal Seek is a desktop Excel feature, not a command available directly in Excel for the web. Open the workbook in the Windows or Mac desktop app to run it.
Does Goal Seek permanently change my formula?
No. It changes the selected input cell and recalculates the existing formula. Accepting the result keeps the changed input in the workbook; canceling the status dialog restores the prior value.
Related
- Excel Slicer: Connect One Slicer to Multiple PivotTables
- Excel Shortcut to Go to a Named Range
- Excel Showing Page Break Lines? How to Hide Them
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Vertical Box and Whisker Plot in Excel: How to Make OneYes. In Excel for Microsoft 365 on Windows, select your data, then choose Insert > Insert Statistic Chart…
- Most Used Excel Shortcut KeysThe most used Excel shortcut keys on Windows are Ctrl+C and Ctrl+V to copy and paste, Ctrl+Z to…
- Block an Email Sender by Name in Outlook: What WorksOutlook cannot reliably block a sender using only the display name shown in the From line. To block…
- Google Sheets Identify Duplicates: A Practical GuideYes. Google Sheets can identify duplicate values with conditional formatting or a COUNTIF formula, and it can remove…
- Excel Scatter Plot Bubble Size: Set It Up and Read ItIn Excel, a standard XY scatter plot uses markers of a fixed size; to make marker size represent…
- Merge or Unmerge Cells in Google Sheets? Choose WellIn Google Sheets, select the cells, then choose Format > Merge cells and pick a merge option; to…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.