How to use Goal Seek in Excel for What-If analysis

The tutorial explains how to use Goal Seek in Excel 365 - 2010 to get the formula result you want by changing an input value.

What-If Analysis is one of the most powerful Excel features and one of the least understood. In most general terms, What-If Analysis allows you to test out various scenarios and determine a range of possible outcomes. In other words, it enables you to see the impact of making a certain change without changing the real data. In this particular tutorial, we will focus on one of Excel's What-If Analysis tools - Goal Seek.

What is Goal Seek in Excel?

Goal Seek is Excel's built-in What-If Analysis tool that shows how one value in a formula impacts another. More precisely, it determines what value you should enter in an input cell to get the desired result in a formula cell.

The best thing about Excel Goal Seek is that it performs all calculations behind the scenes, and you are only asked to specify these three parameters:

  • Formula cell
  • Target/desired value
  • The cell to change in order to achieve the target

The Goal Seek tool is especially useful for doing sensitivity analysis in financial modeling and is widely used by management majors and business owner. But there are many other uses that may prove helpful to you.

For instance, Goal Seek can tell you how much sales you have to make in a certain period to reach $100,000 annual net profit (example 1). Or, what score you must achieve for your last exam to receive an overall passing score of 70% (example 2). Or, how many votes you need to get in order to win the election (example 3).

On the whole, whenever you want a formula to return a specific result but are not sure what input value within the formula to adjust to get that result, stop guessing and use the Excel Goal Seek function!

Note. Goal Seek can process only one input value at a time. If you are working on an advanced business model with multiple input values, use the Solver add-in to find the optimal solution.

How to use Goal Seek in Excel

The purpose of this section is to walk you through how to use the Goal Seek function. So, we'll be working with a very simple data set: The source data for Goal Seek

The above table indicates that if you sell 100 items at $5 each, minus the 10% commission, you will make $450. The question is: How many items do you have to sell to make $1,000?

Let's see how to find the answer with Goal Seek:

  1. Set up your data so that you have a formula cell and a changing cell dependent on the formula cell.
  2. Go to the Data tab > Forecast group, click the What if Analysis button, and select Goal Seek… Excel Goal Seek function
  3. In the Goal Seek dialog box, define the cells/values to test and click OK:
    • Set cell - the reference to the cell containing the formula (B5).
    • To value - the formula result you are trying to achieve (1000).
    • By changing cell - the reference for the input cell that you want to adjust (B3).
    Using Goal Seek in Excel to get the desired formula result
  4. The Goal Seek Status dialog box will appear and let you know if a solution has been found. If it succeeded, the value in the "changing cell" will be replaced with a new one. Click OK to keep the new value or Cancel to restore the original one.

    In this example, Goal Seek has found that 223 items (rounded up to the next integer) need to be sold to achieve a revenue of $1,000. Goal Seek result

If you are not sure you will be able to sell that many items, then maybe you can reach the target revenue by changing the item price? To test this scenario, do Goal Seek analysis exactly as described above except that you specify a different Changing cell (B2): Doing Goal Seek analysis in Excel

As the result, you will find out that if you increase the unit price to $11, you can reach $1,000 revenue by selling only 100 items: The result of Goal Seek analysis

Tips and notes:

  • Excel Goal Seek does not change the formula, it only changes the input value that you supply to the By changing cell box.
  • If Goal Seek is not able to find the solution, it displays the closest value it has come up with.
  • You can restore the original input value by clicking the Undo button or pressing the Undo shortcut (Ctrl + Z).

Examples of using Goal Seek in Excel

Below you will find a few more examples of using the Goal Seek function in Excel. The complexity of your business model does not really matter as long as your formula in the Set cell depends on the value in the Changing cell, directly or through intermediate formulas in other cells.

Example 1: Reach the profit goal

Problem: It is a typical business situation - you have the sales figures for the first 3 quarters and you want to know how much sales you have to make in the last quarter to achieve the target net profit for the year, say, $100,000. Source data for goal seeking the target profit

Solution: With the source data organized like shown in the screenshot above, set up the following parameters for the Goal Seek function:

  • Set cell - the formula that calculates the total net profit (D6).
  • To value - the formula result you are looking for ($100,000).
  • By changing cell - the cell to contain the gross revenue for quarter 4 (B5).
Specify the parameters for the Goal Seek function.

Result: The Goal Seek analysis shows that in order to obtain $100,000 annual net profit, your fourth-quarter revenue must be $185,714. The result of the profit goal seek analysis

Example 2: Determine the exam passing score

Problem: At the end of the course, a student takes 3 exams. The passing score is 70%. All the exams have the same weight, so the overall score is calculated by averaging the 3 scores. The student has already taken 2 out of 3 exams. The question is: What score does the student need to get for the third exam to pass the entire course? Source data to determine the exam passing score

Solution: Let's do Goal Seek to determine the minimum score on exam 3:

  • Set cell - the formula that averages the scores of the 3 exams (B5).
  • To value - the passing score (70%).
  • By changing cell - the 3rd exam score (B4).
Do Goal Seek to determine the minimum score on exam 3.

Result: In order get the desired overall score, the student must achieve a minimum of 67% on the last exam: The result of goal seeking the minimal score to pass the exam.

Example 3: What-If analysis of the election

Problem: You are running for some elected position where a two-thirds majority (66.67% of votes) is required to win the election. Assuming there are 200 total voting members, how many votes do you have to secure?

Currently, you have 98 votes, which is quite good but not sufficient because it only makes 49% of the total voters: Source data for What-If analysis of the election

Solution: Use Goal Seek to find out the minimum number of "Yes" votes you need to get:

  • Set cell - the formula that calculates the percentage of the current "Yes" votes (C2).
  • To value - the required percentage of "Yes" votes (66.67%).
  • By changing cell - the number of "Yes" votes (B2).
Specify the parameters for the election What-If analysis.

Result: What-If analysis with Goal Seek shows that to achieve the two-thirds mark or 66.67%, you need 133 "Yes" votes: The minimum number of votes to win the election

Excel Goal Seek not working

Sometimes Goal Seek is not able to find a solution simply because it does not exist. In such situations, Excel will get the closest value and inform you that Goal Seeking may not have found a solution: Goal Seeking may not have found a solution.

If you are certain that a solution to the formula you are trying to resolve does exist, check out the following troubleshooting tips.

1. Double check Goal Seek parameters

First off, make sure the Set cell refers to the cell containing a formula, and then, check if the formula cell depends, directly or indirectly, on the changing cell.

2. Adjust iteration settings

In your Excel, click File > Options > Formulas and change these options:

  • Maximum Iterations - increase this number if you want Excel to test more possible solutions.
  • Maximum Change - decrease this number if your formula requires more accuracy. For example, if you are testing a formula with an input cell equal to 0 but Goal Seek stops at 0.001, setting Maximum Change to 0.0001 should fix the issue.

The below screenshot shows the default iteration settings: Adjust the iteration settings.

3. No circular references

For Goal Seek (or any Excel formula) to work properly, the involved formulas should not be co-dependent on each other, i.e. there should be no circular references.

That's how you perform What-If analysis in Excel with the Goal Seek tool. I thank you for reading and hope to see you on our blog next week!


  1. I’d like to know Goal Seek is not a deterministic function in Excel. This definition is correct or not?

  2. How would I set up an optimization algorithm that would maximize profit (difference between cost and revenue) for 10 items that have different profit levels by assigning sale percentages of each item when the cost and benefit moves in different directions.

    Item A has a price of 100 and a net of 30 but box holds 30
    Item B has a price of 80 and a net of 20. but box holds 40
    Item C has a price of 60 and a net of 12 . but box holds 20
    Item D has a price of 40 and a net of 6 . but box holds 40
    Item E has a price of 20 and a net of 2 . but box holds 100

    But I can only spend a total of 20,000.and boxes cost 20 each

    thanks for your reply in advance, it is getting too complicated for me to figure out.

  3. Can you provide an example (data, formulas and Goal Seek set-up) where setting Iterative Calculation mode allows Goal Seek to find a solution when it would fail without setting Iterative Calculation mode?

    For example, show us the data model for the result under "Goal Seek not working", where it fails to find a solution that sets L4 to zero. And show us the options that you choose (Max Iterations and Max Change) when enabling Iterative Calculation mode, if indeed that allows Goal Seek to find a solution.

    Caveat: Be sure to start Goal Seek in the same state both times. For example, start Goal Seek with zero in the "by changing" cell, not the value left over from aborting the failed use of Goal Seek.

    AFAIK, enabling Iterative Calcuation does __not__ improve the Goal Seek result, notwithstanding MSFT documentation. I believe the MSFT documentation might be a vestige of an earlier implementation, perhaps Excel 97 or Excel 2002 -- something before Excel 2003 -- if that advice was ever valid.

  4. Very informative and helpful. I'll be using this application!

  5. Thx for sharing, it is very helpful...

  6. why we use goal seek

  7. Very nice

  8. Would this work for the following problems:
    You have a list of invoices (and amounts) and two credit card charges but no documentation which charges paid which bills... Can goal seek work backwards from the charge to determine which invoices were included in each payment?

  9. How to do with goal seek error “ cell need a format.

  10. Excel 3013?

  11. While using Goal Seak function, It deletes the formula in the cell and the cell which is required to be changes is not changed.
    For Example Cell A contain a vaule say 10
    Cell B conatin a value say 2
    Cell C has a formula A X B, the result is 20
    Now When I apply goal seak formula in Cell to Find what will will be the value in cell A, If I need a result of 200 in Cell C. It deltets the the formula in cell C and does not chnge the value in cell A also


  12. Is it possible to What if / Goal seek across multiple cells - like a copy / paste approach ?

  13. Can we refer to a cell for the To value?

    • Hi Sanoj,

      Nope. The To field needs to be a value (integer or decimal number), not a cell reference.

      • Mam this not helpful

  14. I join. So happens. Let's discuss this question.

  15. This is great to read at work for application, thanks!

Post a comment

Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)