Goal Seek in Excel: Find the Input for a Target

How-to basics · Updated November 21, 2026

Goal Seek in Excel finds the value a single input cell must have to make a formula cell reach a target. In Microsoft Excel for Microsoft 365 on Windows, select the formula cell, open Data > What-If Analysis > Goal Seek, then enter the target and the input cell Excel may change.

What Goal Seek does

Goal Seek is a built-in what-if analysis tool for working backward from a result. You provide three things: a formula cell, the result you want that formula to show, and one input cell Excel is allowed to adjust. Excel changes that input repeatedly until the formula reaches the target or gets as close as its calculation method permits.

For example, instead of asking what profit a particular price produces, you can ask what price would produce a chosen profit. The formula that calculates profit stays in place; Goal Seek searches for the required price. This is useful when a formula is easy to calculate in the forward direction but solving it algebraically would be inconvenient.

Goal Seek is part of Excel’s What-If Analysis tools. It does not create a separate scenario or preserve a record of the old and new input values. It changes the worksheet’s input cell, so note its original value first if you may need to restore it.

How Goal Seek works

Goal Seek needs a live relationship between the changing input and the formula result. The formula cell must calculate from the changing cell, either directly or through other cells. If the formula does not depend on the selected input, changing that input cannot move the result toward the target.

Its three dialog fields mean:

  • Set cell: the cell containing the formula whose result you want to control.
  • To value: the desired result, entered as a number. For a target of 5,000, enter 5000, not a formula.
  • By changing cell: the one input cell Excel may alter. It must be a value cell, not a formula cell.

Excel uses a numerical search, rather than rewriting your formula or proving that a solution is unique. For a straightforward formula, it usually finds a useful answer quickly. With nonlinear formulas, rounding, thresholds, or several possible solutions, the starting value and structure of the calculation can affect the result.

Prepare the worksheet

Before opening the dialog, build and check the calculation you want Excel to work backward through. Keep assumptions in their own cells and make the result formula easy to identify. A clear layout also makes it less likely that you will select a label or the wrong input as the changing cell.

For a simple pricing model, you might use units sold in B2, selling price per unit in B3, variable cost per unit in B4, fixed costs in B5, revenue in B6, total costs in B7, and profit in B8. Enter example values of 250 units, 40 dollars per unit, 24 dollars per unit, and 3,000 dollars in fixed costs. With that layout, and with units in B2 and price in B3, calculate revenue in B6 with =B2*B3.

With the same layout, where B2 is units, B4 is variable cost per unit, and B5 is fixed costs, calculate total costs in B7 with =B2*B4+B5.

With the same layout, where B6 contains revenue and B7 contains total costs, calculate profit in B8 with =B6-B7.

These formulas return revenue of 10,000 dollars, total costs of 9,000 dollars, and profit of 1,000 dollars. They also make the dependency clear: changing B3 affects revenue and profit, while the other assumptions remain fixed.

Run Goal Seek in Excel

On Excel for Microsoft 365 for Windows, use this sequence:

  1. Click the formula cell that contains the result you want to target, or remember its address.
  2. Choose Data > What-If Analysis > Goal Seek.
  3. In Set cell, enter the formula cell address, such as B8.
  4. In To value, type the target result, such as 5000.
  5. In By changing cell, enter the input cell address, such as B3.
  6. Select OK. Review the proposed result in the Goal Seek Status dialog, then choose OK to keep it or Cancel to return to the previous worksheet value.

For the pricing example, set cell B8 to 5000 by changing B3. The dialog should find a price of 56 dollars per unit. At that price, revenue is 14,000 dollars; total costs remain 9,000 dollars; and profit is 5,000 dollars. This result assumes the example’s units, costs, and simple profit model do not change when price changes.

There is no dedicated, universal keyboard shortcut for Goal Seek that works consistently across Excel installations. On Windows, use the ribbon path above; KeyTips can vary by version, language, or ribbon configuration. In Excel for Mac, look under Data > What-If Analysis > Goal Seek; labels and placement can vary slightly by release. Goal Seek is not available in Excel for the web, so open the workbook in the desktop app to use it.

Understand the result and keep control

When Excel reports that Goal Seek has found a solution, inspect both the changed input and the formula result. The target may be reached to the displayed precision while the stored value has more decimal places. Set the cell’s number format to show enough detail for the decision you are making, and check the underlying formula rather than relying only on a rounded display.

Goal Seek changes the worksheet itself; it does not make a second copy of the model. To compare several targets, record each resulting input and target in a separate table, or save copies of the workbook. A simple table of prices and profits is often easier to review than repeatedly running Goal Seek when you want to compare many possible inputs.

Also check whether the answer is plausible. A price of 56 dollars may be mathematically correct for the stated assumptions, but the calculation says nothing by itself about customer demand, taxes, discounts, or other real-world factors. Goal Seek answers the model question you specify, not whether the model is a complete description of a business situation.

Limits and common problems

The main constraint is that Goal Seek changes only one cell. If a target depends on changing several assumptions at once—for example, price, staffing, and advertising—Goal Seek cannot optimize all of them together. It also does not impose practical rules such as a minimum price, whole-number units, or a required margin. Those constraints need to be handled in the model or with a more suitable tool.

  • Goal Seek is unavailable or disabled: confirm that you are using desktop Excel, not Excel for the web, and that the workbook is open in a compatible desktop version.
  • The result does not move: verify that the set cell contains a formula and that the formula depends on the changing cell. Check for a misspelled or incorrect cell reference.
  • Excel says it cannot find a solution: the target may be unreachable with the current formula, or the input may have little effect on the result. Try a reasonable starting value and check the formula for errors or discontinuities.
  • The answer is unexpected: confirm that the correct cell is set as the input, and look for percentage-versus-decimal, unit, sign, or cell-reference mistakes.
  • The answer contains fractions: Goal Seek does not automatically require whole numbers. If the input must be an integer, the model or a different method must enforce that condition.

Rounding can also make a target appear impossible. A cell formatted to show two decimal places may display the target even if the stored value differs slightly. Conversely, a formula using ROUND or IF thresholds may change in jumps rather than smoothly, making a precise target harder to reach.

Goal Seek compared with other Excel tools

Goal Seek is best when you have one target formula and one adjustable input. Scenario Manager, also under Data > What-If Analysis, stores named sets of input values so you can compare different cases. It does not search automatically for the value that achieves a specified result.

Data Tables can show how one or two inputs affect a formula across a range of values. They are useful for sensitivity analysis—for example, comparing profit at many prices—but they do not solve for a single target in the way Goal Seek does.

Solver is the more appropriate choice when the task involves multiple changing cells, constraints, or an optimization objective such as maximizing profit. Solver may need to be enabled as an Excel add-in through File > Options > Add-ins on Windows. Goal Seek is simpler for a single-input calculation and does not require setting up a Solver model.

A manual formula or a small input table may be preferable when the relationship is simple or when you need to show many alternatives. For a straight-line equation, algebra can produce an exact answer directly. For a complex model with limits or several adjustable decisions, use Solver or another method that can represent those requirements.

Frequently Asked Questions

Can Goal Seek change more than one cell?
No. Goal Seek adjusts one changing cell at a time. Use Solver when several inputs must vary together or when the answer needs to obey constraints.

Does Goal Seek replace the formula in the result cell?
No. The set cell remains a formula cell. Goal Seek changes the selected input cell and recalculates the formula based on that new value.

Can I use Goal Seek in Excel for the web?
No. Goal Seek is a desktop Excel feature. Open the workbook in Excel for Windows or Mac to run it.

Why does Goal Seek return a different answer when I run it again?
For a nonlinear formula, multiple solutions may exist, and the numerical search can depend on the starting input. Check the model, try a sensible starting value, and confirm that the answer meets your practical requirements.

Can Goal Seek find a whole-number answer?
Not by itself. It can return a decimal input. If the result must be an integer, use a model or method that enforces whole-number values, such as Solver with an integer constraint.

When to use it

Use Goal Seek when you can state a target result, point to the formula that calculates it, and identify one input that should change. Check that the formula references that input, review the proposed answer, and keep track of the original value. If you need to vary multiple assumptions, enforce constraints, or compare a range of possibilities, Scenario Manager, a Data Table, or Solver may fit the question better.

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.