Goal Seek in Excel: A Practical Sample

How-to basics · Updated November 18, 2026

To use Goal Seek in Excel, create a formula, then choose Data > What-If Analysis > Goal Seek. Set the formula cell to the result you want and select one input cell for Excel to change. For example, Goal Seek can find how many units you must sell to reach a specified profit.

A Goal Seek sample: find units needed for a profit target

Suppose a small business sells a product for $50 per unit. Each unit costs $30 to make, monthly fixed costs are $6,000, and the desired monthly profit is $10,000. The question is not what profit a chosen sales volume produces, but what sales volume would produce the target profit. That is a natural Goal Seek problem: the profit is calculated by a formula, and the number of units is the input Excel can adjust.

Enter the following values in a worksheet. The labels in column A make it easier to identify each input, while the figures and formula go in column B:

  • A2: Units sold; B2: 500 as an initial estimate.
  • A3: Selling price per unit; B3: 50.
  • A4: Variable cost per unit; B4: 30.
  • A5: Fixed costs; B5: 6000.
  • A6: Profit; B6: formula shown below.

With units sold in B2, selling price in B3, variable cost in B4, and fixed costs in B5, enter this formula in B6: =B2*(B3-B4)-B5. At the initial estimate of 500 units, the result is $4,000: 500 multiplied by the $20 contribution per unit, less $6,000 in fixed costs.

Now Goal Seek can answer the question. It changes B2 until the formula in B6 returns $10,000. The result is 800 units, because 800 multiplied by the $20 contribution per unit produces $16,000, and subtracting $6,000 leaves $10,000. The numbers are illustrative; real businesses should verify their costs and assumptions with a qualified professional. This example is not financial or tax advice.

Set up the worksheet so Goal Seek can use it

The key requirement is a formula that depends, directly or indirectly, on the input you want Excel to change. In the sample, B6 depends on B2, so changing the units sold changes the calculated profit. If B6 contains a typed value instead of a formula, Excel has nothing to recalculate and Goal Seek cannot solve the problem.

Keep the changing input in its own cell. Do not put a formula in B2 for this example, because B2 is the value Excel must adjust. Also keep assumptions separate where practical: selling price, unit cost, and fixed costs are easier to inspect and update when each has its own cell. Use labels and appropriate number formats, such as currency for costs and whole numbers for units.

Before opening Goal Seek, check that the formula gives a sensible result for the starting input. A starting value is an estimate, not a required answer. Here, 500 units gives a valid profit of $4,000, making it clear that the model is working before Excel searches for the target.

Run Goal Seek in Excel for Microsoft 365 on Windows

With the sample worksheet ready, use these steps in Excel for Microsoft 365 on Windows:

  1. Select the formula cell B6. Selecting it first makes it easier to populate the Set cell field.
  2. On the ribbon, choose Data > What-If Analysis > Goal Seek.
  3. In Set cell, enter or select B6, the cell containing the profit formula.
  4. In To value, type 10000. Enter a number rather than a currency symbol or a formula.
  5. In By changing cell, enter or select B2, the units-sold input.
  6. Choose OK. Excel adjusts B2 and displays the Goal Seek Status dialog when it has found a result.
  7. Review the values, then choose OK in the status dialog to keep the result in the worksheet, or Cancel to return to the prior value.

After accepting the result, B2 should be 800 and B6 should show $10,000 if the worksheet uses the stated inputs. The exact display depends on number formatting. If the result is not obvious, inspect the underlying cell values rather than relying only on rounded display formats.

What Goal Seek is doing behind the scenes

Goal Seek is a form of one-variable what-if analysis. You provide a formula result you want, and Excel repeatedly recalculates the worksheet while adjusting one input cell. You specify the destination—the formula cell and target value—and the variable Excel may change. You do not need to rearrange the formula algebraically yourself.

It does not create a permanent rule that keeps the target result in place. Once Goal Seek finishes, Excel leaves the adjusted input value in the worksheet. If you later change the selling price or costs, profit recalculates, but Excel does not automatically change units sold again to preserve the $10,000 target. Run Goal Seek again when assumptions change.

Goal Seek also is not a forecast. It answers a mathematical question based on the formula and inputs you provide. In the sample, it assumes the $50 price, $30 unit cost, and $6,000 fixed costs remain constant as sales volume changes. If those assumptions do not hold—for example, if costs rise at higher production levels—the worksheet needs a more realistic formula before the result can be useful.

A second sample: find the fee needed for a revenue target

Goal Seek can solve for a price or rate as well as a quantity. Imagine a subscription service with 240 subscribers and a revenue target of $5,000 per month. Put the subscriber count in B2, the monthly fee in B3, and the revenue formula in B4. With subscriber count in B2 and fee in B3, enter this formula in B4: =B2*B3.

Choose Data > What-If Analysis > Goal Seek, set B4 to 5000, and set B3 as the changing cell. Goal Seek returns a monthly fee of about $20.83, because 240 multiplied by $20.8333 is approximately $5,000. If the fee must be a whole number of dollars or a specific price increment, Goal Seek will not enforce that business constraint automatically. You would need to choose an acceptable rounded fee and check the resulting revenue, or use Solver if the problem requires formal constraints.

This pattern applies to many ordinary worksheet questions: target a calculated result, then vary one input that affects it. Examples include finding a break-even sales volume, the number of attendees needed to cover event costs, or the price needed to reach a revenue goal. Each result depends on the quality of the worksheet’s formulas and assumptions.

Common Goal Seek problems and how to fix them

  • The Set cell is not a formula. Goal Seek needs a formula result to adjust. Replace a typed result with a formula that references the changing input.
  • The changing cell does not affect the formula. Check the formula references. If the selected input is not used in the calculation path, changing it cannot move the target result.
  • The target seems impossible. Test whether the target is mathematically possible under the current formula. For instance, a model with a fixed maximum capacity cannot reach revenue that exceeds capacity multiplied by price.
  • The answer is unexpected or depends on the starting value. Some formulas are nonlinear and can have more than one solution, or no solution. Try a different reasonable starting estimate and inspect whether the model has multiple plausible results.
  • The result has decimals when a whole number is required. Goal Seek solves for a numeric input and does not impose integer restrictions. Round the result appropriately, then recalculate the formula to see whether the target is still met.
  • The displayed result is slightly different from the target. A cell may show rounded digits while storing more precision. Increase displayed decimal places to inspect it. If the formula itself uses rounding, that can also affect the result.

If Goal Seek reports that it could not find a solution, verify the cell references and formula first. Then consider whether the target is achievable and whether the formula behaves smoothly across a sensible range of inputs. A spreadsheet can calculate correctly while still representing the real situation poorly, so review the model before treating its answer as meaningful.

Goal Seek limits and alternatives

Goal Seek changes one cell to reach one target value. It is useful when the question is simple and the worksheet already contains the relevant calculation. It does not search several changing cells at once, and it does not let you state constraints such as a maximum budget, whole-number units, or a minimum price directly in the Goal Seek dialog.

For a problem with multiple changing inputs or explicit constraints, consider Solver, an Excel add-in that can optimize a target subject to conditions. Solver is better suited to questions such as maximizing profit while staying within production and budget limits. It may need to be enabled before it appears on the Data tab. For a series of different input combinations that you want to compare, a one-variable or two-variable data table may be more useful than repeatedly running Goal Seek.

These tools answer different questions. Goal Seek asks what one input must be for a formula to reach a specified result. Solver can search across multiple variables and constraints. A data table shows how selected inputs affect one or more calculated results across a range of values. Choose the simplest tool that matches the problem.

Excel on Mac and Excel for the web

In Excel for Microsoft 365 on Mac, Goal Seek is available in the desktop application; the ribbon layout can differ, so look for Data > What-If Analysis > Goal Seek. The worksheet setup and the three dialog fields work the same way. If the command is not visible, check that you are using the desktop app and that the ribbon is fully displayed.

Excel for the web does not provide the desktop Goal Seek command. Open the workbook in the Excel desktop application to run it. The result saved in the workbook can then be viewed in the browser, but a browser-based worksheet should not be treated as a substitute for running Goal Seek in the desktop app.

Frequently Asked Questions

Where is Goal Seek in Excel?
In Excel for Microsoft 365 on Windows, choose Data > What-If Analysis > Goal Seek. Excel for Mac also has Goal Seek in the desktop app, though ribbon layout may vary. Excel for the web does not include the command.

Can Goal Seek change more than one cell?
No. Goal Seek adjusts one changing cell to make one formula cell reach a target value. Use Solver when the problem requires multiple changing cells or constraints.

Does Goal Seek change the formula?
No. It changes the value in the selected input cell and recalculates formulas that depend on that value. The formula itself stays as written in the worksheet.

Can Goal Seek find an exact answer?
It finds a numerical result based on the formula and its calculation precision. The displayed value may be rounded, and some problems have no solution or more than one possible solution.

Why is Goal Seek greyed out or missing?
Check that you are using the desktop version of Excel rather than Excel for the web, and look under Data > What-If Analysis. If working in a compact ribbon, expand it or check the Data tab for the What-If Analysis menu.

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.