Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Goal Seek in Excel: Formula, Steps, and Examples

· 6 min read · Home Tech

In this article
  1. What Goal Seek does
  2. Set up a simple example
  3. Run Goal Seek in Excel for Windows
  4. What happens during the calculation
  5. Limits and common problems
  6. Goal Seek compared with formulas and Solver
  7. Frequently Asked Questions

Excel’s Goal Seek is a What-If Analysis tool, not a worksheet formula: use Data > What-If Analysis > Goal Seek to find the input value that makes a formula cell return a target result. For example, you can find the sales quantity needed for a profit formula to reach $10,000 by changing the quantity cell.

What Goal Seek does

Goal Seek works backward from a result. You provide three pieces of information: the cell containing a formula, the value you want that formula to produce, and one input cell Excel may change. Excel then calculates an input that makes the formula result match the target as closely as it can.

This is useful when you know the outcome you want but do not know the necessary input. It can answer questions such as “What price gives me this revenue?” or “How many units must I sell to reach this profit?” The formula itself remains in the worksheet; Goal Seek changes the value in the selected input cell.

Goal Seek is a numerical calculation feature, not a special function you type into a cell. There is no built-in =GOALSEEK() worksheet formula. It also does not automatically create a permanent relationship between the target and the input: after it runs, the input cell contains the calculated value, which you can review or replace.

Set up a simple example

Suppose a small business sells a product for $25 per unit, has variable costs of $10 per unit, and pays $3,000 in fixed costs. Put the following values in a worksheet:

  • Enter the unit price, 25, in B1.
  • Enter the variable cost per unit, 10, in B2.
  • Enter the fixed costs, 3000, in B3.
  • Enter a trial sales quantity, such as 100, in B4.
  • In B5, calculate profit with =B4*(B1-B2)-B3.

With those cell values, B5 initially returns -$1,500: 100 units at a $15 contribution per unit produce $1,500, less $3,000 in fixed costs. To find the quantity that produces $10,000 in profit, Goal Seek should change B4 until B5 equals 10000. The arithmetic is (10,000 + 3,000) ÷ (25 − 10) = 866.6667 units. If units must be whole numbers, the practical target is 867 units, which gives $10,005 profit; 866 units gives $9,990.

Run Goal Seek in Excel for Windows

  1. Make sure the target cell contains a formula that depends, directly or indirectly, on the input cell. In the example, B5 depends on B4.
  2. Select Data > What-If Analysis > Goal Seek on the ribbon.
  3. In Set cell, enter or select the formula cell, such as B5.
  4. In To value, enter the desired result, such as 10000. Enter a number, not a formula.
  5. In By changing cell, enter or select the input cell, such as B4.
  6. Choose OK. Excel reports a solution or that it could not find one. Choose OK in the result dialog to keep the solution, or Cancel to restore the previous input value.

Goal Seek changes one input cell per run. The input must be a value Excel can adjust, rather than a formula cell, and the Set cell must contain a formula. If the command is not visible on a smaller ribbon, look under the Data tab’s What-If Analysis menu; the exact display can vary with window size and ribbon layout.

What happens during the calculation

Excel repeatedly tries values in the changing cell and recalculates the formula until the result is sufficiently close to the requested target or the calculation stops. It is an iterative numerical method, so it does not promise an exact answer for every model. Results depend on the formula’s behavior and the starting value, and a displayed solution may be an approximation.

For the example, the formula is linear, so the result is straightforward. In a nonlinear model, such as one involving compound growth or a percentage-based fee, there may be multiple possible inputs, no solution, or a solution that depends on the starting value. A result that looks plausible should still be checked against the worksheet’s assumptions and business rules.

Limits and common problems

  • More than one input needs to change: Goal Seek can alter only one cell. Use Solver for problems involving several changing cells, constraints, or a minimum/maximum objective. Solver is an Excel add-in and may need to be enabled.
  • The formula does not depend on the input: If changing the selected input cannot affect the Set cell, Goal Seek has no path to the target. Check the formula references and make sure the intended cell is selected.
  • The target cannot be reached: A formula may have a restricted range or may never return the requested value. For example, a model that caps output at 500 cannot reach a target that requires output of 600.
  • The answer is unexpected: Check units, signs, percentages, and the initial input. A percentage entered as 5 rather than 5% can radically alter a calculation. Review formulas and intermediate values before accepting the result.
  • The answer is fractional: Goal Seek does not automatically enforce whole numbers or other business constraints. Round or validate the resulting input separately, then recalculate the formula to see whether the target still holds.
  • Calculation settings interfere: Goal Seek relies on recalculation. If the workbook uses manual calculation, recalculate the workbook and check Formulas > Calculation Options. Avoid changing calculation settings without considering effects on the rest of the workbook.

Goal Seek compared with formulas and Solver

A normal formula calculates an output from inputs; Goal Seek finds an input for a chosen output. For example, a revenue formula might calculate sales dollars from price and quantity. Goal Seek can find the quantity needed for a specified revenue, but the resulting quantity is a value in the sheet, not a live formula that continuously responds to a changing target.

For a transparent calculation with a simple algebraic relationship, solving the equation directly in a worksheet formula can be easier to audit. Goal Seek is helpful when the formula is complicated or inconvenient to rearrange. Use Solver when you need to vary multiple cells, impose limits such as nonnegative quantities, or optimize an objective. Goal Seek does not provide those extra controls.

Frequently Asked Questions

Is there a Goal Seek formula in Excel?
No. Goal Seek is a command under Data > What-If Analysis, not a worksheet function. The target cell must contain a formula, and Excel changes a separate input cell to approach the result you specify.

Can Goal Seek change two cells at once?
No. Each Goal Seek run changes one cell. If your model needs multiple changing variables or constraints, use Solver rather than trying to run Goal Seek as if it controlled several inputs simultaneously.

Can Goal Seek find an exact answer?
Sometimes, especially for simple models, but not always. Excel uses iterative calculations and may return an approximate solution or fail to find one. Check the result by recalculating the target formula and assessing whether the remaining difference is acceptable.

Does Goal Seek work in Excel for Mac or the web?
In Excel for Mac, Goal Seek is available from the Data tab’s What-If Analysis tools; ribbon organization can differ from Windows. Excel for the web has fewer What-If Analysis capabilities than the desktop app, so use Excel for Microsoft 365 desktop if Goal Seek is unavailable in your web interface.

Can I save a Goal Seek result?
Yes. Accepting the result leaves the calculated input value in the changing cell, and the formula cell recalculates from it. Save the workbook to preserve that value. If you need to keep the original input as well, record it in another cell before running Goal Seek.