Field Guide

Goal Seek in Excel: find the input that hits your target

Updated

Goal Seek runs a formula backward: you already know the answer you want, and it finds the input that produces it. On the Data tab, select What-If Analysis, then Goal Seek, and fill three boxes. Set cell points to the cell holding your formula, To value is the numeric result you want that formula to reach, and By changing cell is the one input cell Goal Seek may adjust. Select OK, and Excel changes that input until the formula lands on your target.

It sits alongside Scenario Manager and Data Tables under What-If Analysis, but this page stays on Goal Seek itself: the three boxes, the single-input rule, why the answer often is not a round number, and the fact that it writes its result straight over your input cell.

What does Goal Seek actually do?

Most of the time you feed a formula its inputs and read off the result. Goal Seek reverses that. As Microsoft frames it, Goal Seek takes a result and determines possible input values that produce that result. You supply the target and the formula, and Excel searches for the input value that gets the formula there.

That maps onto the three boxes in the dialog:

How do I use Goal Seek? A worked example

Say you are pricing a product at 25 per unit and want to know how many units you have to sell to bring in revenue of 10000. Put the units in B1, the price in B2, and the formula =B1*B2 in B3. Then run Goal Seek with Set cell B3, To value 10000, and By changing cell B1.

B3
fx
=B1*B2
A B
1 Units sold 400
2 Price per unit 25
3 Revenue 10000
Set cell B3 (holds =B1*B2), To value 10000, By changing cell B1. B3 (green) is the formula; B1 (amber) is the single input Goal Seek adjusts. With the price in B2 held at 25, Goal Seek writes 400 into B1 so revenue reaches 10000, since 400 times 25 is 10000.

To open the dialog, on the Data tab select What-If Analysis, then Goal Seek. On Windows the What-If Analysis button lives in the Forecast group; on a Mac it sits on the Data tab directly. Enter B3 in Set cell, type 10000 in To value, enter B1 in By changing cell, and select OK. Because B2 stays fixed at 25, the only lever Goal Seek has is B1, and it settles on 400.

Why is the answer often not a round number?

This example lands on a clean 400 because the model is a straight multiplication. Most models are not that tidy. Goal Seek reaches your target by controlled iteration, trying values and closing in, rather than by solving the equation on paper. Microsoft groups it with Solver on that point: “Both commands use iteration in a controlled way to obtain desired results.” So on a model with interest, growth, or anything nonlinear, the value Goal Seek writes into the changing cell is usually a long decimal rather than a neat figure.

Two things follow. First, Excel reports whether the run succeeded, and on some models it stops near the target without matching it exactly, so it is worth checking the result cell against the value you asked for. Second, the answer is only as good as the model: Goal Seek finds an input that makes the formula hit the number, which is not the same as finding the input you meant if the formula itself is off.

What Goal Seek will not do

Goal Seek handles exactly one variable. Microsoft is explicit that it solves for a single input at a time, so you get one By changing cell and one To value. If you need to solve for two inputs at once, or keep an input within a range, the Solver add-in is the tool for that: Microsoft describes Solver as a close relative of Goal Seek that can take on more variables.

The other catch is that Goal Seek is destructive to your input cell. It writes the result over the value in the By changing cell in place, and the workbook keeps no record of what was there before. If the original number matters, save a copy of the file first. Point By changing cell at a genuine input, one that holds a value rather than a formula, because whatever was in that cell is replaced by the number Goal Seek settles on.

The remaining two What-If tools are out of scope here. Scenario Manager stores named sets of input values so you can switch between them, and a Data Table shows how a formula responds across a row or column of inputs. Both answer a different question from Goal Seek’s single backward solve, and each is its own topic.

The short version

Frequently asked questions

How do I use Goal Seek in Excel?
On the Data tab, select What-If Analysis, and then select Goal Seek. In the Set cell box enter the cell that holds your formula, in the To value box type the numeric result you want that formula to reach, and in the By changing cell box enter the single input cell Goal Seek is allowed to adjust, then select OK. On Windows the What-If Analysis button sits in the Forecast group.
What do the three boxes in the Goal Seek dialog mean?
Set cell points at the cell that holds your formula, so it must contain a formula, not a typed number. To value is the numeric result you want that formula to reach. By changing cell is one input cell that holds a value for Goal Seek to adjust, and the Set cell formula has to refer to it, otherwise changing it would not move the result.
Can Goal Seek change more than one cell?
No. Goal Seek solves for only one input at a time, so it adjusts a single changing cell to hit a single target. If you need to solve for more than one input, or add constraints such as a minimum or a maximum, use the Solver add-in instead.
Does Goal Seek overwrite my input cell?
Yes. Goal Seek writes its answer into the By changing cell in place, replacing whatever value was there, and the workbook keeps no copy of the original number. If the starting value matters, save a copy of the file before you run Goal Seek so you can get it back.
Why did Goal Seek return a long decimal instead of a round number?
Goal Seek reaches the target by controlled iteration rather than by solving the equation exactly, so the value it writes into the changing cell is often not round. It also reports whether it found a solution, and on some models it lands close to the target without matching it precisely.
What is the difference between Goal Seek and Solver?
Goal Seek adjusts one input cell to make one formula reach one target value. The Solver add-in does the same kind of job but can take on more variables, and it can honor constraints. Both are What-If Analysis tools; Scenario Manager and Data Tables are the other two that come with Excel.

Catch the errors before they ship

Reviewing a change to a model? Compare the two versions in your browser and see every changed cell, formula, and value. It's free, and nothing leaves your computer.