Excel Goal Seek finds the input value that makes a formula return a result you specify. In Excel for Microsoft 365 on Windows, choose Data > What-If Analysis > Goal Seek, enter the formula cell, the target value, and the single input cell Excel may change, then select OK.
What Excel Goal Seek does
Goal Seek is a built-in What-If Analysis tool for working backward from a result. Instead of asking, “What result will these inputs produce?”, you ask, “What input would produce this result?” Excel repeatedly recalculates a formula while adjusting one value until the formula is close to your target.
The three fields in the Goal Seek dialog describe that relationship:
- Set cell: The cell containing the formula whose result you want to control.
- To value: The numeric result you want the formula to return.
- By changing cell: The one input cell Excel is allowed to adjust.
The set cell must contain a formula, and that formula must depend on the changing cell, either directly or through other formulas. The changing cell is an input, not a second formula cell. Goal Seek is designed for one changing value at a time, so it is useful for questions such as what price reaches a sales target, what score is needed to reach a course average, or what interest rate produces a particular payment.
How Goal Seek works
Goal Seek uses numerical iteration rather than rearranging a formula symbolically. It tries a value in the changing cell, recalculates the workbook, compares the set cell’s result with the target, and then tries another value. It stops when it reaches a sufficiently close result or cannot make further progress under the workbook’s calculation settings.
This matters because the answer is generally a numerical approximation, not a guarantee of an exact match. The result depends on the shape of the formula and the starting value. A straightforward relationship, such as multiplying a fixed quantity by a price, is usually easy to solve. A complex formula with thresholds, rounding, or several possible solutions can be harder to solve reliably.
Goal Seek does not know the business meaning of your model. It simply changes the selected input to get the formula toward the target. It does not impose conditions such as “the price must be at least $10” or “the result must be a whole number.” Review the answer and decide whether it makes sense for the real situation.
How to use Goal Seek in Excel
On Windows in Excel for Microsoft 365, prepare the formula and input cells first. Then use the Data tab’s What-If Analysis menu. In the Goal Seek dialog, fill in the three fields and run the calculation. Excel displays a status message describing whether it found a solution; choose OK to keep the result in the worksheet, or Cancel to leave the previous input unchanged.
- Build and check the formula you want to reach. Confirm that its result changes when you edit the intended input cell.
- Open Data > What-If Analysis > Goal Seek.
- Enter the formula cell in Set cell. You can select the cell on the worksheet instead of typing its address.
- Enter the desired numeric result in To value.
- Enter the input cell Excel can adjust in By changing cell.
- Select OK, review the result and status, and choose OK again to keep the calculated input.
The commands are also available in the desktop version of Excel for Mac, though ribbon placement and appearance can vary by release. Goal Seek is not available in Excel for the web; open the workbook in the desktop app to use it. There is no need to enable an add-in for the standard Goal Seek command.
Worked example: find a price that meets a sales target
Suppose a shop sells 800 units and wants to know the unit price that would produce $12,000 in revenue. Put the unit price in B2, the number of units in B3, and revenue in B4. With those cell assignments, enter this formula in B4:
=B2*B3
For an illustrative starting price of $10 in B2 and 800 in B3, B4 initially returns $8,000. Open Goal Seek and set the fields as follows:
- Set cell: B4
- To value: 12000
- By changing cell: B2
Goal Seek should set B2 to 15, because 800 multiplied by 15 equals 12,000. B4 will then show 12,000. Format B2 and B4 as currency if you want the worksheet to display dollar signs; formatting affects appearance, not the underlying calculation. This example assumes the number of units stays fixed. If changing the price would also change demand, the model would need to represent that relationship before the answer could reflect it.
What kinds of questions suit Goal Seek?
Goal Seek is most useful when you already have a formula and only one input is unknown. It can help explore a model without manually trying many values. For example, a teacher could use a weighted-grade formula to find the exam score needed for a target course average, or a project manager could find the number of units needed to reach a break-even result. In each case, the worksheet must contain a formula that calculates the outcome from the adjustable input.
For a money-related model, treat the output as a calculation based on the assumptions entered, not as financial advice. For example, an illustrative loan-payment model would need appropriate inputs such as rate, term, and principal, and the actual payment depends on the lender’s terms, fees, timing, and other details. Check real terms with the lender or a qualified professional. Goal Seek can solve a formula you provide; it cannot verify that the formula or assumptions match a real contract.
It is also useful for sensitivity questions that have a single unknown, but it is not a general-purpose optimizer. If the question involves several adjustable inputs, restrictions, or a best possible outcome rather than one specified target, another tool may fit better.
Goal Seek, Solver, and data tables compared
These Excel tools all support what-if analysis, but they answer different questions:
- Goal Seek works backward from one target formula result by changing one input. Use it when you know the target and have one variable to solve for.
- Solver can adjust multiple variable cells and apply constraints. Use it for a more involved optimization or a model with limits, such as maximizing a result while staying within resource constraints. Solver is an add-in, so availability and setup may differ from the built-in Goal Seek command.
- Data tables show how formula results change across one or two sets of trial input values. Use them to compare scenarios or see a range of outcomes, rather than to find one input that reaches a target.
For instance, if you want to know the price that produces exactly a given revenue with a fixed unit count, Goal Seek is the direct choice. If you want the best product mix subject to labor and material limits, Solver is more appropriate. If you want to compare revenue at a range of prices and quantities, a two-variable data table can show the pattern.
Common problems and how to resolve them
If Goal Seek reports that it could not find a solution, first check the workbook structure. A common mistake is selecting a set cell that contains a typed value rather than a formula, or choosing a changing cell that the formula does not reference. Also confirm that the target is possible under the formula. A formula that can never reach the requested result has no solution for Goal Seek to find.
- The result is unexpected: Check units, signs, cell references, and the starting value. A model using dollars in one place and cents in another can produce a technically valid but meaningless result.
- The answer is close but not exact: Goal Seek works iteratively, so a small difference can remain. Check the formula’s precision and the workbook’s calculation settings before interpreting the displayed rounded value as exact.
- The input becomes negative or otherwise unrealistic: Goal Seek does not enforce practical bounds. If the input must be nonnegative, whole-number, or within a range, inspect the result and consider Solver or a redesigned model.
- The formula includes rounding or IF conditions: Discontinuous changes can make iteration less predictable. Test nearby input values manually and consider whether the formula should be adjusted for the question.
Excel’s iterative calculation settings are under File > Options > Formulas on Windows. They include controls such as maximum iterations and maximum change. These settings can affect how iterative calculations are handled, but increasing them does not make an impossible target possible. If you change calculation settings, consider the effect on the workbook’s other formulas too.
Practical tips before accepting a result
Save or record the original input before running Goal Seek if you need to compare the answer with the starting assumption. The tool writes its solution into the changing cell when you accept it; it does not create a separate scenario history. You can run it again with another target, but note the assumptions and outputs if you need an audit trail.
Check the model at the returned value and at nearby values. In the revenue example, testing prices just below and above $15 confirms how the result responds. This is especially helpful when formulas contain rounding, lookup logic, or thresholds. Keep input cells visually distinct from formula cells, label units clearly, and avoid hard-coding assumptions inside a complicated formula when separate cells would make the model easier to inspect.
Finally, distinguish the displayed value from the stored value. A cell formatted to show two decimal places may display 15.00 even if the underlying value has additional decimal places. If a decision requires a whole-number input or a particular precision, evaluate that requirement explicitly rather than relying on the number format alone.
Frequently Asked Questions
Can Excel Goal Seek change more than one cell?
No. Goal Seek changes one input cell per run. For multiple changing cells or constraints, use Solver if the model calls for an optimization approach.
Why is Goal Seek greyed out or unavailable?
Check that you are using the desktop version of Excel; Goal Seek is not available in Excel for the web. In the desktop app, open a workbook and use the Data tab’s What-If Analysis menu. Ribbon layout can vary slightly by platform or release.
Can Goal Seek find an answer if the set cell is not a formula?
No. The set cell must contain a formula whose result depends on the changing cell. If it contains a fixed number, changing another cell cannot make that number recalculate to a target.
Does Goal Seek guarantee the only or best answer?
No. It searches numerically from the model’s current values and does not promise a unique solution or an optimal one. A formula may have no solution or more than one possible solution, so validate the result against the model and the real-world constraints.
Can I use Goal Seek for a target that is text?
No. The target in the Goal Seek dialog is a numeric value. If your question is about text, build a suitable numeric formula or use a different Excel feature.
Related
- Excel Remove Duplicates: Steps and Safer Options
- Excel Data Heat Map: Create, Read, and Troubleshoot One
- Excel Custom Print Area: Set, Adjust, and Troubleshoot
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel COUNTIF Range Examples: Text, Numbers, and DatesUse Excel’s COUNTIF function to count cells in a range that match one condition: for example, =COUNTIF(A2:A20,"East") counts…
- Excel COUNTIF and SUMIF Examples That Actually WorkIn Excel, use COUNTIF(range, criteria) to count cells that meet one condition and SUMIF(range, criteria, sum_range) to add…
- Revit IF Formula Examples for Family ParametersIn a Revit family, an IF formula tests a condition and returns one value when it is true…
- How to Copy Formulas in Excel to a New Workbook SafelyTo copy formulas into a new Excel workbook, open both workbooks, copy the formula cells in the source,…
- Outlook Rules: Filter Your Incoming Mail AutomaticallyCreate an Outlook rule by choosing a condition, such as who sent a message or a word in…
- SUMIF Formula Criteria Examples for Excel: Rules and TipsUse Excel’s SUMIF function to add values that match one condition, such as a product name, a minimum…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.