Excel Goal Seek: How It Works and When to Use It

How-to basics · Updated November 7, 2026

Excel Goal Seek: How It Works and When to Use It

In Excel, Goal Seek is a What-If Analysis tool—not a worksheet function—that finds the input value needed to make a formula cell return a specified result. In Microsoft 365 for Windows, choose Data > What-If Analysis > Goal Seek, then specify the formula cell, the result you want, and the one input cell Excel may change.

What Goal Seek Does

Goal Seek works backward from a result. In a normal spreadsheet calculation, you enter inputs and a formula calculates an output. With Goal Seek, you already have a formula and a desired output, and Excel adjusts one input until the formula reaches that target.

For example, if a profit formula depends on the number of units sold, Goal Seek can find the unit count that produces zero profit or a chosen profit amount. You provide the target; Excel searches for a value in the changing cell that makes the formula cell match it.

The word “function” can be misleading here. Goal Seek is a built-in Excel command, not something you type into a cell like SUM or AVERAGE. It changes an existing input cell, and the workbook’s formulas recalculate as it searches. This makes it useful for answering practical questions such as “How many units do I need to sell?” or “What price would produce this total?”

How to Use Goal Seek in Excel

In Excel for Microsoft 365 on Windows, prepare a worksheet with a formula that depends on the input you want Excel to adjust. Select the formula cell, then go to Data > What-If Analysis > Goal Seek. In the Goal Seek dialog, fill in these fields:

  • Set cell: The cell containing the formula whose result you want to control.
  • To value: The target result. Enter a number, such as 0 or 5000.
  • By changing cell: The input cell Excel is allowed to adjust. This must be a cell, not a formula.

Click OK to let Excel search. A status box reports whether it found a solution. If the result is acceptable, choose OK to keep the changed input; choose Cancel to restore the value that was there before the search. You can also select the formula cell first and use the command afterward; Excel fills the Set cell field with your selection.

The changing cell needs to affect the set cell, either directly or through other formulas. For instance, a sales quantity may feed a revenue formula, which in turn feeds a profit formula. Goal Seek can change that quantity if the chosen set cell ultimately depends on it. If the cells are unrelated, Excel cannot use the changing cell to influence the target.

On Excel for Mac, look for Goal Seek under Data > What-If Analysis; the precise ribbon arrangement can vary by release. Excel for the web does not provide the same desktop Goal Seek dialog, so open the workbook in the desktop app to run it. You can still view workbook values in a browser, but do not assume that means the Goal Seek command is available there.

A Break-Even Example

Suppose a small business wants to estimate the number of units it must sell to cover its costs. Put fixed costs of 12000 in B2, selling price per unit of 50 in B3, variable cost per unit of 20 in B4, and an initial unit estimate in B5. The profit formula goes in B6. With that layout, enter this formula in B6:

=(B3-B4)*B5-B2

The formula calculates contribution per unit, multiplies it by units sold, and subtracts fixed costs. At 400 units, contribution is 30 per unit, so total contribution is 12000 and profit is zero. To make Excel find that break-even point, open Goal Seek and use B6 as the Set cell, 0 as the To value, and B5 as the By changing cell. Excel should find 400, assuming the starting value and calculation settings allow it to converge.

The same model can answer a different question. If the target is a profit of 6000, use 6000 as the To value while keeping B6 and B5 as the set and changing cells. The arithmetic is 30 per unit times 600 units, minus 12000 fixed costs, which equals 6000. The example treats costs and prices as fixed inputs; it is a simplified spreadsheet illustration, not a forecast or business recommendation.

This distinction matters: Goal Seek does not decide whether the assumptions are realistic. It solves the relationship represented by the formulas. If costs rise with sales, discounts change at higher volumes, or there are capacity limits, those details must be included in the model for the answer to reflect them.

When Goal Seek Is Useful

Goal Seek is most helpful when a spreadsheet already calculates a result and you want to find one unknown input that would produce a particular target. Common uses include:

  • Finding the sales volume needed to reach break-even or a target profit.
  • Finding a price that produces a specified revenue, provided the model links price to revenue.
  • Working out the score needed on a remaining assignment to reach a target course average, if the grading formula is represented in the sheet.
  • Finding the interest rate or term that matches a payment amount in an existing loan model.
  • Determining the quantity required to meet a production-cost or inventory target.

These are model-based calculations. For money questions, results depend on the assumptions and terms entered in the workbook; they are not financial, tax, investment, or legal advice. For an actual loan, check the lender’s terms or consult a qualified professional. A Goal Seek result can be mathematically consistent with a simplified model while still differing from real-world charges, rounding, timing, or contract rules.

What Goal Seek Cannot Do

Goal Seek changes only one input cell in a single search. It is therefore not a general optimizer. If a target depends on several choices—for example, both price and advertising spend—Goal Seek cannot vary both at once. You would need to simplify the question to one changing input, run separate scenarios, or use Solver for a model that requires multiple adjustable cells.

It also does not enforce business rules or constraints. If a calculated answer must be a whole number, stay below a capacity, or fall within a permitted range, Goal Seek may return a value that violates that condition. It does not automatically know that units cannot be fractional or that a price must be positive. Check the output against the real constraints, and use a suitable model or optimization method when those restrictions need to be part of the calculation.

Finally, a target may have no solution, or there may be more than one possible input that gives the same result. A formula with a flat or discontinuous relationship can also make it hard for the search to find a useful answer. Goal Seek returns a numerical result based on its search, not a proof that the answer is unique or the best possible choice.

Understanding the Result and Its Limits

After the search, inspect both the changing cell and the formula cell. A success message means Excel found a value close enough to the target for its calculation process; it does not certify that the model is accurate. If the target is not met exactly, the remaining difference may reflect numerical tolerance, rounding in the displayed cells, or limitations in the formula’s behavior.

Check the underlying value rather than relying only on the number of decimal places shown. A cell formatted to show no decimals can display 400 even if its stored value has a fraction. Likewise, a target displayed as zero may contain a small nonzero value. Increase displayed precision or inspect the formula bar if the distinction matters.

Goal Seek changes the workbook’s input cell when you accept the result. It does not create a separate scenario record or automatically preserve the previous value. Before running it, note the original input or save a copy if you need an audit trail. To compare several targets, record each resulting input and target in a small table, then rerun Goal Seek for each target.

Goal Seek Compared With Other Excel Tools

Goal Seek, Solver, and data tables all support what-if analysis, but they answer different questions. Goal Seek is the straightforward choice when one input must be adjusted to reach one output target. It is built into desktop Excel and does not require choosing an optimization objective or adding constraints.

Solver is more appropriate when you want to maximize or minimize an objective, adjust multiple cells, or apply constraints such as limits and whole-number requirements. Solver is an Excel add-in, and availability or setup can depend on the desktop installation. A one-cell target question usually does not need Solver, but a constrained planning problem may.

A data table is useful when you want to see how a formula changes across a range of possible input values, rather than ask Excel to find one value for a target. For example, a table can show profit at many sales volumes or prices. It presents a sensitivity comparison; Goal Seek searches for a target-matching input. If you need to understand the shape of a relationship before trusting one result, a data table can provide useful context.

Common Problems and Checks

If Goal Seek gives an unexpected answer or fails, review the model before changing the target. A small setup issue can make an otherwise sensible question impossible to solve.

  • Wrong set cell: Confirm that the selected cell contains the output formula, not an input or a nearby label.
  • Wrong changing cell: Choose a blank or numeric input cell that the formula actually depends on; do not choose a cell containing a formula.
  • Broken dependency: Check whether changing the input recalculates the target cell. A hard-coded value or a reference to another cell may interrupt the link.
  • Unrealistic starting value: Try a reasonable initial value near the likely answer. A very distant starting point can make some relationships difficult to solve.
  • Formula errors or calculation settings: Resolve errors such as #VALUE! or #DIV/0! and confirm that the workbook is calculating as expected.
  • Impossible target: Test whether the formula can plausibly reach the requested result. A target outside the model’s possible range will not become valid merely by rerunning the search.

Also check signs and units. Entering a target in dollars when the model is in thousands, or confusing monthly and annual amounts, can produce a technically valid but practically meaningless result. Make units explicit in labels and verify the final output against the assumptions.

Frequently Asked Questions

Is Goal Seek a formula in Excel?
No. Goal Seek is a What-If Analysis command. It adjusts an input cell so a formula in another cell reaches a target; you do not type a Goal Seek function into a worksheet cell.

Can Goal Seek change more than one cell?
No. A single Goal Seek run changes one By changing cell. For multiple changing cells or constraints, consider Solver or restructure the analysis into separate scenarios.

Why is Goal Seek greyed out or unavailable?
Check that you are using desktop Excel rather than Excel for the web, and that a workbook is open. In the desktop app, look under Data > What-If Analysis. If the command is still unavailable, check the Excel version and the workbook’s state, then try opening a normal editable workbook.

Can Goal Seek return a decimal when I need a whole number?
Yes. Goal Seek solves for a numerical input and does not automatically impose an integer restriction. If the input must be a whole number, round or test feasible integers in the model, or use Solver with an integer constraint when the problem calls for optimization.

Does Goal Seek save the answer as a new scenario?
No. If you accept the result, Excel changes the input cell in the current workbook. Record the original value and each result separately if you want to compare scenarios or preserve a history.

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.