Goal Seek in Excel: How to Find the Input You Need

How-to basics · Updated November 21, 2026

Goal Seek in Excel finds the input value that makes a formula return a result you specify. In Microsoft Excel for Microsoft 365 on Windows, choose Data > What-If Analysis > Goal Seek, then enter the formula cell, the target result, and the single input cell Excel may change.

What Goal Seek Does

Goal Seek is a built-in What-If Analysis tool. Instead of asking what result a formula produces from known inputs, you start with a result you want and ask Excel to find an input that produces it. For example, you might know the total number of items you need to pack and want to find how many boxes to prepare.

It works by changing one cell repeatedly and recalculating a formula that depends on that cell. When the formula’s result gets sufficiently close to your target, Excel reports the input value it found. This is useful for questions that can be expressed in a worksheet formula but are awkward to solve by rearranging the equation yourself.

Goal Seek changes a cell value; it does not rewrite the formula or explain the mathematics behind the answer. You can review the result in the worksheet and decide whether the proposed input makes sense for your situation.

Set Up a Simple Example

Suppose you are packing identical boxes. Cell B2 contains the number of boxes, starting at 12, and B3 contains 24 items per box. Cell B4 calculates the total number of items. With those values in B2 and B3, enter this formula in B4:

With the box count in B2 and the items per box in B3, enter =B2*B3 in B4. The current result is 288 items. If the target is 360 items and the number of items per box must stay at 24, Goal Seek can find the required number of boxes: 15.

This example works because B4 is a formula cell that depends on B2, and B2 is a single input that Excel can adjust. Before using Goal Seek, check that your formula reflects the relationship you actually mean to model. A wrong formula can still produce a precise-looking answer to the wrong question.

How to Use Goal Seek in Excel for Windows

  1. Enter your inputs and formula, and confirm the formula cell currently shows a calculated result.
  2. Select Data on the ribbon, then choose What-If Analysis > Goal Seek.
  3. In Set cell, enter or select the cell containing the formula you want to reach.
  4. In To value, type the target result as a number. For the packing example, enter 360.
  5. In By changing cell, enter or select the one input cell Excel is allowed to adjust. In the example, choose B2.
  6. Select OK. Excel calculates a proposed value and displays a Goal Seek Status message. Choose OK to keep the result in the worksheet or Cancel to restore the previous value.

Use a numeric target in To value, rather than typing a formula or a descriptive label. The changing cell should be an ordinary input value, not a formula cell. If the dialog cannot use your chosen cells, check that the Set cell contains a formula and that the formula refers, directly or indirectly, to the changing cell.

What Goal Seek Can—and Cannot—Solve

Goal Seek is designed for one target formula and one changing cell. It can handle many formulas, including nonlinear calculations, as long as Excel can recalculate the formula as the input changes. It does not require you to rearrange a formula into a particular algebraic form.

The one-cell limit matters. If a desired result depends on changing several independent inputs at once, Goal Seek is not the right tool. It also does not let you add conditions such as “the input must be an integer” or “this value cannot exceed a limit.” In those cases, you may need Solver, a different worksheet design, or a manual calculation.

Goal Seek does not necessarily find the only possible answer. A formula can have more than one input value that produces the same result, or it may have no solution in the range of values that make sense for your model. Excel’s result is a numerical solution based on its calculation process, not proof that the answer is unique or practically valid.

Accuracy, Starting Values, and Multiple Solutions

Because Goal Seek searches by adjusting values and recalculating, the starting value in the changing cell can influence the result. For straightforward formulas, this is rarely a concern. For formulas with curves, thresholds, or multiple roots, different starting values may lead to different solutions—or may make it harder for Excel to find one.

After a successful calculation, inspect the formula cell. The displayed result may be extremely close to the target without matching it exactly, particularly when the calculation involves decimals or complex formulas. You can increase the number of displayed decimal places to inspect the result more closely, but formatting changes what you see, not the underlying calculation.

If the result seems unexpected, try a reasonable alternative starting value and run Goal Seek again. Also check whether the input must be a whole number or fall within a practical range. Goal Seek does not automatically enforce those requirements, so a mathematically acceptable value may not be usable in the real situation you are modeling.

Common Problems and How to Fix Them

  • Goal Seek is unavailable or the command is missing: Confirm you are using the Excel desktop app. Goal Seek is not available in Excel for the web. In the desktop app, look on the Data tab for What-If Analysis.
  • The Set cell is rejected: Select a cell containing a formula, not a typed number or text. The formula should depend on the changing cell, either directly or through other formulas.
  • The answer is not plausible: Check the formula, units, and starting input. Try another realistic starting value, especially if the formula can produce multiple solutions.
  • The target cannot be reached: The formula may not be capable of returning that value for any usable input. Check for limits, rounding, fixed values, or errors such as a division by zero.
  • The result is close but not exact: Goal Seek is a numerical search. Review the calculated difference and consider whether the required precision is realistic for the model.

Also check that calculation is enabled and the worksheet does not contain errors that prevent the formula from producing a usable result. If your workbook uses formulas that depend on volatile or external data, results can change when those inputs update, so validate the answer with the workbook in its intended calculation state.

Goal Seek vs. Solver and Data Tables

Goal Seek is the simplest choice when you have one output target and one input to vary. Solver is better suited to optimization problems: it can change multiple decision cells and apply constraints, such as limits or whole-number requirements. Solver is an Excel add-in, so its availability may depend on whether it has been enabled in your desktop installation.

A one-variable or two-variable Data Table answers a different kind of question. It shows how formula results change across a range of trial inputs, which is useful for comparing scenarios. It does not search for one input that hits a specified target in the same direct way Goal Seek does. For a single target and a single changing value, start with Goal Seek; switch tools when the problem needs multiple inputs, constraints, or a broader scenario comparison.

Windows, Mac, and Excel for the Web

In Excel for Microsoft 365 on Windows, the ribbon path is Data > What-If Analysis > Goal Seek. In Excel for Microsoft 365 for Mac, look for Goal Seek under Data > What-If Analysis; ribbon labels and placement can vary somewhat by release. If you do not see the command, confirm that you are in the desktop Excel app and check the Data tab.

Excel for the web does not provide the desktop Goal Seek command. If you need to run Goal Seek, open the workbook in the Excel desktop app. There is no dedicated, universal keyboard shortcut for opening Goal Seek, so use the ribbon path rather than relying on a shortcut that may differ by version or customized ribbon settings.

Frequently Asked Questions

Is Goal Seek the same as Solver?
No. Goal Seek changes one input cell to make a formula reach a target. Solver can handle more complex optimization tasks, including multiple changing cells and constraints.

Can Goal Seek change more than one cell?
No. Goal Seek has one By changing cell field. For a problem with multiple adjustable inputs, consider Solver or redesign the calculation so the question can be answered with one input.

Does Goal Seek work in Excel for the web?
No. Use the Excel desktop app to run Goal Seek. You can open a workbook from Excel for the web in the desktop app if you have access to it.

Why does Goal Seek return a different answer when I start with another value?
Some formulas have multiple solutions or behave differently across different input ranges. Goal Seek’s numerical search can converge on a different solution depending on its starting point.

Can I use Goal Seek to find an exact whole number?
Goal Seek does not impose an integer constraint. It may return a decimal value; check whether rounding is appropriate, or use Solver if the model requires an integer input.

Before You Accept the Result

Use Goal Seek as a way to explore a formula, then verify the proposed input against your assumptions. Confirm the formula, check the target and units, and make sure the changing value is allowed in the real situation. For a simple one-input question, it can save time; for constrained or multi-input decisions, choose a tool designed for that larger problem.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.