Goal Seek function in Excel: what it is and how to use it

  • Goal Seek is an Excel "What if..." analysis tool that calculates what value a cell must take for a formula to achieve a specific result.
  • It is based on three key elements: target cell with formula, desired value for that cell, and cell that changes, which acts as the unknown.
  • It is very useful in real-world contexts such as academic grades, loans, financial planning, and calculating profits in business models.
  • For scenarios with multiple variables and constraints, it is preferable to use the Solver add-in, which expands optimization capabilities.

Goal Seek function in Excel

If you often work with spreadsheets, you've probably thought something like, "I know the result I want, but I have no idea what number to put in to get there." That's exactly what spreadsheets are for. Goal Seek in Excel, a tool that saves you the trial and error method of changing values ​​over and over again until you get it right.

Thanks to this function, you can ask Excel to figure out for you what value a cell must take for a formula to reach a certain value. specific result: the installment of a loan that suits you, the minimum grade to pass, the profit you want to achieve, or the capital you can borrow with a specific maximum payment.

What is Goal Seek in Excel and what is it used for?

The Goal Seek tool is part of the group of "What if..." analysis from Excel (along with the Scenario Manager and Data Tables). Unlike the usual use of formulas, where you start with input data to obtain a result, here the process is reversed: you define the desired result and let Excel calculate what value a variable should take to achieve it.

In simple terms, Goal Seek lets you solving equations with one unknown without needing to manually clear the cell. The key condition is that the cell whose value you want to find appears within the formula that generates the result you're aiming for; otherwise, the tool cannot perform the calculation.

Within the "What if..." analysis ecosystem, Goal Seek stands out for being very quick and easy when you only want to adjust one variable. For more complex situations, with several unknowns and constraints (for example, maximizing profit by modifying several elements at once), the appropriate alternative is the Solver add-inwhich greatly expands the possibilities.

Office Scripts in Excel Web
Related article:
Formulas with arrays in Excel: master dynamic functions

Key concepts of Target Search

To use this tool without problems, it is important to be clear about three fundamental elements: target cell, desired value, and changing cellUnderstanding this relationship well is what makes the difference between Goal Seek working the first time or returning strange results.

La target cell This is the cell that contains the formula whose result you want to set to a specific value. It's usually, for example, your grade point average, the amount of a payment, the total profit of a product, or the value of a financial indicator. You won't be typing in this cell manually; it already has a built-in formula and represents the "final result" you're interested in.

El desired value (The "To Value" or "A Value" field) is the number you want that target cell to have. This could be a minimum passing grade, a specific profit, a maximum payment you can afford, or a certain percentage of return. This number You decide and you enter it directly into the Goal Seek dialog box.

La cell that changes This is the unknown value: the data that Excel will automatically modify until the target cell reaches the desired value. It must be a cell included in the formula of the target cell; if it's not part of the calculation, Goal Seek will have no way of relating a change in that cell to the final result.

Where is Goal Seek in Excel?

The location of the tool is always the same in modern versions of Excel: it is located on the tab Facts & figures, within the group or section of Forecast (or “Data Tools” in some translations), in the drop-down menu Hypothesis analysisWithin that menu appear the three main options and one of them is "Target Search".

If you prefer keyboard shortcuts, in many versions of Excel on Windows you can access them with the combination Alt + A + W + Gwhich directly opens the tool's dialog box. Other supported spreadsheet environments, such as ONLYOFFICE DocsThey have also incorporated a very similar Goal Seek function, also located in the Data tab.

How does Goal Seek work: dialog box parameters?

When you open Goal Seek, a box appears with three fields These fields must be completed correctly for Excel to perform the calculation. Understanding what each field is prevents most common errors and allows you to take full advantage of the tool in all kinds of situations.

In the countryside “Set cell” You must specify the cell reference containing the formula whose result you want to fix. This is always a cell with a formula, not a handwritten number. For example, it could be the cell where you have the total profit, the grade point average, or the loan payment.

In the countryside “Courage to” You write the desired result in that cell. Here's the target value: an amount of money, a minimum grade, a percentage… For example, 50 for a 50% final grade, 50.000 for a profit, or -900 if you're adjusting a loan payment, which is considered an outflow and has a negative sign.

In the countryside “Changing cell” You select the cell whose contents Excel will automatically modify. That cell must appear, directly or indirectly, in the formula of the target cell. This could be, depending on the case, the number of units sold, the unit price, the loan amount, the duration in months, or the grade of a pending exam.

Financial Example 1: Calculate the interest rate with PMT

A very common use of Goal Seek is in loan calculations When you know the amount you want to borrow, the term, and the monthly payment you can afford, but you don't know what interest rate you'd need to make everything work out, Excel allows you to solve this problem directly by combining the function PAYMENT (PMT in English) with Goal Seek.

Imagine you want a loan of 100.000 euros, to be repaid in 180 months (15 years old), and you know you can only afford a few € 900 per monthYou're missing the annual interest rate the bank would have to offer you for the monthly payment to be exactly that amount or very close to it.

First, prepare a simple sheet with labels that clearly identify each piece of information: Loan amount, Term in months, Interest rate y PaymentIn one column you write the texts (for example, in A1:A4) and in the next column (B1:B4) you enter the values ​​you already know: 100000 as amount, 180 as months, leave the rate empty for now and in the payment row you will place the formula.

In the payment cell, enter the function =PMT(B3/12;B2;B1)You divide the rate cell (B3) by 12 because the PMT function assumes a periodic interest rate, and you're working with monthly payments based on an annual rate. B2 contains the months, and B1 contains the initial capital.

Since cell B3 is still blank, Excel calculates the payment assuming a 0% interest rate, so you'll see a payment amount that doesn't reflect reality (around €555,56 in this example). Ignore this provisional figure, because now the next step comes into play. Search Target to adjust the rate.

Open Data > What-If Analysis > Goal Seek and configure as follows: in “Set cell” select the payment cell (where the PMT formula is), in “Value to” type -900 (negative installment since it's a payment) and in "Changing Cell" you select the interest rate cell (B3). When you accept, Excel iterates and returns the required interest rate so that the fee is 900.

This rate usually appears as a decimal number, so it's best to format the cell of interest as a percentage: select the cell, go to Home > Number group, and click the percentage format option. porcentaje and you adjust the number of decimal places (raise or lower decimal places) according to the level of detail you want to show.

Goal Seek function in Excel

Practical example 2: minimum grade to pass a subject

Another classic scenario where Goal Seek comes in handy is that of the academic qualificationsYou know your grades on the exams you've already taken, you know the average required to pass or maintain a scholarship, but you're missing the key question: what grade do you need to get on the exam you have left?

Suppose you have already done three out of four tests and you need one average of 70 Points are required to qualify for the final exam or to maintain a certain academic standing. You want to calculate what score you need to achieve on the final exam to reach that average of 70.

You create a table with the grades obtained and leave the cell corresponding to the last exam empty. In a separate cell, you calculate the overall average using the formula =AVERAGE(range) o =AVERAGE(range) (depending on the language of your Excel), including the cell for the pending exam even though it does not yet have a final value.

Once this is prepared, open the Goal Seek tool. “Set cell” You choose the cell where you calculated the overall average, which is the result you want to work with. “Courage to” You write 70, which is the desired average. And in “Changing cell” You select the cell with the grade from the last exam.

When you click OK, Excel will try different values ​​for that last grade until the average of the range is exactly 70 (or as close as possible according to the iteration parameters). The result might be, for example, that you need a 85 to reach that average or whether a 60 is enough; it will all depend on the previous grades and whether or not there are weighting factors.

Goal Seek with weights and SUMPRODUCT

In many courses, the different activities don't carry the same weight in the final grade: there are continuous assessments with low weight, midterm exams that count for somewhat more, and a final exam with a large percentage. In these cases, the final grade isn't calculated with a simple average, but with a... weighted average.

To construct that weighted average in Excel, the function is very useful. SUMPRODUCT (SUMPRODUCT in English), which multiplies each grade by its weight and sums all those products, usually divided by the sum of the weights.

The idea is simple: you create a table where one column lists the grades (exam 1, assignment, midterm, final, etc.) and another column lists the weights or percentages assigned to each grade. In a separate cell, you calculate the overall grade using something like... =SUMPRODUCT(range_of_grades;range_of_weights)/SUM(range_of_weights)so you get the weighted average.

If you're interested in knowing the minimum grade you need on a specific exam (for example, the final) for your overall grade to reach a certain level, then... 50%You can leave the cell for that exam undefined and go back to Goal Seek. In "Set cell," select the cell containing the final grade calculated with SUMPRODUCT, enter 50 in "Value to," and in "Changing cell," select the grade for the pending exam. Excel will adjust that grade until the weighted average reaches 50%.

In a real-world case like this, the tool might give you a non-rounded value, such as 57,5% for the final exam. With that result you'll know exactly what you need to get, and you can calculate how close you are to making it.

Examples of use with loans and credits

The financial sector is one of the most powerful areas for applying Goal Seek, because many problems boil down to finding a value that makes a formula for payments, interest, or cash flows yield a specific result. With features like PAYMENT and other financial calculations, the combination is very versatile.

Imagine you have a 20-year loan, with a interest rate of 5% and a capital of, let's say, 12.000 monetary units. You've calculated the annual payment using the PMT function and it comes out to around 962,91 each year, but your maximum budget The annual payment is 900. You then wonder what the maximum loan amount is that you could take out with a payment of 900 per year, maintaining that term and that interest rate.

In that case, you can use Goal Seek, specifying the payment cell calculated with PMT as the "Set cell," -900 in the "Value to" field (negative because it's a payment), and the cell containing the loan amount in the "Changing cell" field. Excel will modify that amount until the payment is exactly 900. You'll likely get something close to 900. 11.216 of maximum capital.

Another option is to set the principal at 12.000, keep the maximum payment at 900, and try to figure out how many years you would need to pay off the loan under those conditions. Here, the cell that changes would be the number of periods (years, months…) instead of the principal. The structure is the same: the target cell is the payment, the desired value is -900, and the cell that changes is the duration. The result will give you a term slightly longer than the original, for example about two and a half more years of the necessary time.

Applications of Goal Seek in business and analytics

Beyond examples of studies and loans, the tool is used extensively in business modeling and in data analysis to create simple scenarios with a single variable. It is especially useful when you want to perform quick sensitivity analysis without building a very complex model.

How to enable autocomplete in Office
Related article:
How to enable autocomplete in Office: Excel, Outlook, and Word without complications

Some common uses in companies include calculating the breakeven (number of units you must sell to avoid losses), adjusting prices to achieve a certain margin, or defining the initial investment needed to achieve a target profitability based on a series of cash flows.

For example, you might have a profit cell calculated as (unit price – unit cost) × units sold. If you want to achieve a profit of 50.000You can define the profit cell as the target cell, 50000 as the target value, and the number of units sold as the cell that changes. Goal Seek will tell you how many units you need to sell at current prices and costs.

In other cases, you're interested in setting the units (due to limited production capacity) and seeing what minimal price You should charge to reach that 50.000 profit. You will then change the variable cell, making it the unit price, while the target cell remains the profit and the target, that 50.000. The result will indicate, for example, that you should sell at 200 monetary units per product to reach the set profit.

Goal Seek is also frequently used for projects Your Strategic where you want the IRR or return to reach a specific percentage and you modify the initial investment to see what amount guarantees the objective. It's exactly the same logic: the target cell is the one containing the return formula, the desired value is the percentage (for example, 15%), and the cell that changes is the initial investment or cash flow.

ONLYOFFICE and other platforms with a Target Search function

The usefulness of Goal Seek is not limited to Excel. Office suites such as ONLYOFFICE Docs They have also incorporated this tool into their spreadsheets, following a very similar interface so that users coming from Excel do not have to relearn the process.

In ONLYOFFICE, for example, you can address the typical grade problem: you know the grades from several exams and want to know what score you need on the last test to reach a certain average. You create a spreadsheet with your grades, calculate the average using the function =AVERAGE(range) Then you open the Goal Seek tool from the Data tab, where there is a specific button for it.

In the dialog box, the "Set cell" field is filled with the reference of the cell containing the average formula, in "Value" you enter the final grade you want to achieve, and in "When changing cell" you select the cell of the last exam. After clicking OK, the system will display a status window The Goal Seek function will find the solution and allow you to replace the values ​​of the cells involved with one click.

In addition, tools like ONLYOFFICE often accompany these functions with a wide range of extra features (collaboration in real time(online editor, integration with other platforms) that make goal seeking integrated into more complex workflows, both in companies and in educational environments.

Goal Search vs. Solver: When to Use Each

Goal Seek is perfect when you have a single unknown value and a single formula you want to adjust, but it falls short the moment other factors come into play. multiple variables and constraintsThat's where the accessory shines. Solver, another more advanced optimization tool that Excel also offers.

Solver is installed from File > Options > Add-ins. At the bottom, select "Excel Add-ins" and click "Go". Activate SolverYou accept, and then it appears in the Data tab within the Analysis section. Unlike Goal Seek, Solver allows you to work with multiple variable cells, set maximum or minimum conditions, and apply multiple constraints (greater than or equal to, less than or equal to, equal to certain values, etc.).

Imagine you want to know what grade you need in two subjects (for example, English and Chemistry) so that your average is 84. Goal Seek won't work here because you can only manipulate one changing cell. Instead, with Solver, you define the average as the target cell, 84 as the target value, and the two unknown grades as the cells to change. Without any additional constraints, Solver will suggest a combination of grades (for example, 87 in both subjects) that achieves that average.

Another typical example of a Solver is the profit maximization with constraintsA company sells several services (A, B, C…) and knows how many of each it has sold, the price of each service, and its total profit. The spreadsheet sums the units sold and calculates the total profit as the sum of units × profit per service. They want to figure out how they should redistribute sales among services to increase profit while respecting certain conditions.

Suppose the requirements are: sell at least 25 units of Service Anot to sell more than 15 of Service C and not to exceed 70 services sold in total per month. With Solver, you set the total profit as the target cell (for example, D8), you tell it that the maximizeYou choose the units of each service as variable cells (a range like B4:B7) and add the restrictions: B4 greater than or equal to 25, B6 less than or equal to 15, B8 (total units) less than or equal to 70.

When you click Solve, Solver searches for a combination of units that meets all the conditions and yields the maximum possible profit. If it finds a solution, you can accept it and leave the new values ​​written on the sheet. It's a very powerful way to do this. business sensitivity analysis and resource planning.

Common problems: Why Goal Seek sometimes doesn't work

Although the tool is very robust, sometimes it may seem that Goal Seek is doing nothing or finding no solution. Many of these cases are due to iteration configurations oa logical errors in formulas and parameters.

On the one hand, Excel limits the number of attempts (iterations) and the minimum change it accepts before stopping the search. If these limits are too strict, the tool might stop before finding a satisfactory result or leave the calculation too imprecise. To check this, you can go to File > Options > Formulas and adjust both the maximum number of iterations such as the “maximum change”. Increasing the number of iterations allows for exploring more possible solutions, while decreasing the maximum change improves the accuracy of the result.

On the other hand, the problem often lies in the parameters themselves Goal Seek errors can include: a target cell that doesn't contain a formula, a changing cell that isn't part of the calculation, a target value inconsistent with the model's logic, or even circular references that prevent Excel from recalculating correctly. Checking that the formula works correctly before using Goal Seek often saves a lot of trouble.

It should also be noted that Goal Seek is only intended for a variableIf you actually need to adjust more than one cell at a time or meet several simultaneous conditions, the correct thing to do is to switch to Solver or rethink the model so that you can apply the tool within a simpler framework.

Finding duplicate data in Excel
Related article:
Finding duplicate data in Excel

Mastering Goal Seek opens the door to Solve in seconds a lot of everyday problems: from knowing what grade you need to get on the next exam to understanding what installment you can afford on a loan, what sales volume will make you reach a profit target or what initial investment fits with a fixed return, and if one day you fall short because you need several variables and constraints, you will already have the groundwork prepared to make the natural leap to Solver and more advanced "What if..." analysis models. Share this guide so more users can learn how to use the Goal Seek function in Excel.