Excel Goal Seek works backward from a formula result: you specify the result you want, and Excel adjusts one input cell until the formula reaches that target. In Microsoft Excel for Microsoft 365 on Windows, open Data > Forecast > What-If Analysis > Goal Seek, then enter the formula cell, target value, and input cell.
What Goal Seek does
Goal Seek is a built-in what-if analysis tool for answering questions such as, What value would make this formula equal 500? Instead of changing an input repeatedly and watching the result, you tell Excel the desired result and identify the single input it is allowed to change. Excel then recalculates the formula as it searches for a suitable input.
The tool works with a formula already in the workbook. The result cell must contain a formula, and that formula must depend, directly or indirectly, on the input cell you choose. Goal Seek changes the input value; it does not rewrite the formula or create a separate scenario table. When it finds a solution, it places that value in the changing cell and updates the workbook.
For example, a worksheet might calculate total sales from a unit price and number of units. You can ask what price would produce a particular sales total while holding the units constant. Or you can ask how many units would be needed to reach a profit target while leaving the price and costs unchanged. In both cases, Excel changes just one variable.
How the calculation works
Goal Seek starts with the current value in the changing cell, recalculates the formula, and adjusts that value in search of the target. It repeats the process until it gets sufficiently close or cannot find a usable solution. The underlying search is automatic; you do not need to specify a step size or write a separate formula for the search.
That process is why a well-structured model matters. The formula cell needs to respond to the changing cell. If you select an unrelated input, changing it will not move the result toward the target. A direct relationship, such as multiplying price by quantity, is usually easy to follow. More complicated formulas can still work, but they may have multiple possible solutions or produce results that are sensitive to the starting value.
Goal Seek is a numerical search, not a proof that a solution is unique or meaningful. It aims for a result close enough to the target under Excel’s calculation settings. The returned value may therefore contain decimals, and the displayed number may be rounded even when the stored value has more digits.
Set up the worksheet first
Before opening the dialog, make the inputs and result easy to identify. Put assumptions in their own cells, label them, and keep the formula in a separate result cell. This makes it simpler to select the right cells and check what Goal Seek changed afterward.
Suppose a simple sales model uses B2 for unit price, B3 for units sold, and B4 for sales revenue. With the price in B2 and units in B3, enter this formula in B4:
=B2*B3
With price set to 24 and units set to 350, the result is 8,400. That calculation gives Goal Seek a formula to work backward from. If B4 were a typed number rather than a formula, Excel would have nothing to recalculate and Goal Seek could not solve the question.
Check these basics before proceeding:
- The target cell contains a formula, not a manually entered result.
- The formula depends on the changing cell you plan to select.
- The target is expressed in the same units as the formula result, such as dollars, units, or a percentage.
- The changing cell is an input you are willing to replace with the calculated value.
Run Goal Seek in Excel for Windows
In the Microsoft 365 desktop app for Windows, use the Goal Seek dialog this way:
- Select Data > Forecast > What-If Analysis > Goal Seek.
- In Set cell, enter or select the cell containing the formula you want to reach.
- In To value, type the target as a number. For a target of 10,000, enter 10000, not a formula.
- In By changing cell, enter or select the input cell Excel may adjust.
- Select OK to start the search. Review the result in the Goal Seek Status dialog, then select OK to keep the solution or Cancel to dismiss the result.
For the sales example, set B4 as the formula cell, enter 10000 as the target, and choose B2 as the changing cell. Excel holds B3 at 350 and calculates a price of about 28.5714. Multiplying that price by 350 gives approximately 10,000. If prices must be whole cents, round the result appropriately and check the revenue again; rounding the input can make the final result differ slightly from the target.
On Excel for Mac, Goal Seek is also available from the Data tab under What-If Analysis; the dialog uses the same three fields. Excel for the web does not provide the desktop Goal Seek command, so open the workbook in the Excel desktop app to run it.
A second example: solving for a profit target
Goal Seek can also solve a formula with several fixed assumptions and one changing input. Imagine a simplified model with price in B2, units in B3, variable cost per unit in B4, and fixed costs in B5. Put profit in B6. With those cells arranged as described, enter this formula in B6:
=B2*B3-B4*B3-B5
For an illustrative case, enter 20 as the price, 500 as units, 12 as variable cost per unit, and 1,200 as fixed costs. The formula returns 2,800: sales of 10,000, less variable costs of 6,000 and fixed costs of 1,200. To ask how many units produce 5,000 in profit, set B6 to 5000 and change B3. Goal Seek returns 775 units because each unit contributes 8 before fixed costs, and 775 multiplied by 8, less 1,200, equals 5,000.
This is an illustrative spreadsheet calculation, not financial, tax, investment, or business advice. Real costs and business decisions may involve assumptions the simple formula leaves out. Use verified inputs and consult an appropriate qualified professional when a decision requires advice.
When Goal Seek is useful
Goal Seek is most useful when you know the output you want, already have a formula that calculates that output, and need to solve for one input. Common examples include:
- Finding the sales volume needed to reach a revenue or profit target.
- Working out the score needed on a final assessment to reach a course average, if the average formula is set up correctly.
- Finding the discount rate that makes a calculated price or total equal a specified amount.
- Determining how many units, hours, or materials are needed to reach a worksheet target.
- Solving for one assumption in a forecast while holding the other assumptions fixed.
It is also helpful for sensitivity questions: instead of asking only what happens if an input changes, you can ask what input would be required to produce a chosen result. Keep a note of the target and assumptions, though. Goal Seek changes a cell value, and the workbook does not automatically record why that value was chosen.
What Goal Seek cannot do
The main limitation is that Goal Seek changes only one cell at a time. If a target depends on both price and volume and you want Excel to adjust both, Goal Seek is not the right tool for that job. It also does not impose business rules such as whole numbers, minimum or maximum values, or a requirement that one input stay within a particular range. It can return a mathematically suitable value that is impractical for your situation.
It does not search for every answer or tell you which solution is best. A nonlinear formula might reach the same target at more than one input value. Depending on the formula and starting point, Excel may find one solution, fail to converge, or stop near a solution that does not satisfy your real-world constraints. Check the result against the model and the context rather than treating the status message as validation of your assumptions.
For more complex problems, Excel’s Solver add-in can optimize an objective while changing multiple cells and applying constraints. Solver is intended for broader optimization problems; Goal Seek is faster to set up when there is one target formula and one changing input. For comparing several fixed input combinations, a data table may be more useful than repeatedly running Goal Seek.
Common problems and how to fix them
If Goal Seek does not produce the expected result, check the model before assuming the tool is broken. Many issues come from a cell selection error, a formula that does not depend on the chosen input, or a target that cannot be reached under the model’s assumptions.
- The result does not change: Confirm that the selected changing cell is referenced by the formula, either directly or through another formula.
- Excel reports that it cannot find a solution: Check whether the target is mathematically possible. Try a sensible starting value and make sure the formula returns a numeric result rather than text or an error.
- The answer looks unreasonable: Check units, signs, cell references, and assumptions. A formula can be valid Excel syntax while still representing the wrong model.
- The displayed answer misses the target slightly: Inspect the underlying value and number format. Display rounding can hide decimals, and a rounded input may not produce an exact target.
- The answer changes after recalculation: Look for volatile functions, circular references, or other formulas that depend on changing workbook state. Verify that calculation settings and model inputs are stable.
After a successful run, review both the changing cell and the formula result. If you need to preserve the original assumption, copy it somewhere safe before running Goal Seek or record it in a separate scenario. Undo may not be a reliable way to manage a sequence of what-if changes, especially after other workbook actions.
Goal Seek compared with other Excel tools
Choose the tool based on the question. Goal Seek is a good fit for one output target and one variable. A one-variable data table shows how a formula changes across many possible values for one input; a two-variable data table shows results across combinations of two inputs. Those tables are better for comparing a range of scenarios than finding one target value.
Solver is the better choice when the question involves multiple changing cells, constraints, or maximizing or minimizing an objective. You might use it to maximize profit while limiting labor hours and materials, for example. A regular formula is often enough if you can rearrange a simple equation yourself, but Goal Seek is convenient when the formula is long or has nested calculations. These tools complement one another; they are not interchangeable ways to solve every spreadsheet problem.
Frequently Asked Questions
Does Goal Seek change the formula?
No. It adjusts the value in the changing cell and recalculates the existing formula. The formula remains in the set cell.
Can Goal Seek change more than one cell?
No. Goal Seek accepts one changing cell. Use Solver if your model requires multiple changing cells or constraints.
Why is Goal Seek greyed out or unavailable?
You may be using Excel for the web, which does not include the desktop Goal Seek command. Open the workbook in Excel for Windows or Mac and check the Data tab.
Can Goal Seek return a decimal when I need a whole number?
Yes. Goal Seek does not automatically enforce integer or other practical constraints. You can round and check the result, or use Solver when the problem requires a constraint such as whole units.
Does Goal Seek guarantee the only correct answer?
No. Some formulas have multiple possible solutions, and Goal Seek does not prove that a result is unique. Check whether the answer makes sense and whether other solutions may exist.
Related
- Excel Split Cell Color in Half: What Works
- Excel Split Cell in Half Horizontally: Real Options
- Excel Split Cell Shortcut: The Fastest Ways to Separate Data
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Convert Text to Numbers in Excel in BulkTo convert text-stored values to numbers in bulk in Excel for Microsoft 365 on Windows, select the cells…
- How to Freeze the Top Row in ExcelTo freeze the top row in Excel for Microsoft 365 on Windows, open the worksheet, select View >…
- Compound Interest Spreadsheet: Build One in Excel EasilyA compound interest spreadsheet in Excel can calculate how an investment may grow as interest earns interest. Put…
- How to Make Columns the Same Width in Microsoft WordTo make columns the same width in Microsoft Word, open Layout > Columns > More Columns, choose the…
- Excel Shortcut Cheat Sheet for Windows and MacAn Excel shortcut cheat sheet is a quick reference to keyboard commands for editing cells, moving around worksheets,…
- How to Record a Presentation in Microsoft PowerPointTo record in Microsoft PowerPoint, open your presentation, choose Record > From Beginning (or From Current Slide), allow…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.