In Excel for Microsoft 365 on Windows, open Data > What-If Analysis > Goal Seek, then specify the formula cell, the result you want, and the one input Excel should change. LibreOffice Calc has a similar feature under Tools > Goal Seek; the dialog labels and workflow differ slightly.
What Goal Seek does
Goal Seek works backward from a result. You already have a formula, but instead of asking what result a known input produces, you ask what input would make the formula produce a particular result. Excel repeatedly changes one cell and recalculates the worksheet until the formula cell reaches the target, or gets sufficiently close.
For example, a worksheet might calculate the area of a rectangle from its width and length. If the width is known and the desired area is known, Goal Seek can find the length. In a forecast, it can find the sales volume needed to reach a specified total. The important requirement is that the outcome is calculated by a formula that depends on the input cell you want Excel to vary.
Goal Seek is a what-if analysis tool, not a function you type into a cell. It changes a cell in the workbook to find a result. If you need to preserve the original input, make a copy of the sheet or record the starting value first.
How to use Goal Seek in Excel
In Excel for Microsoft 365 on Windows, prepare the formula and input cells, then follow these steps:
- Select Data > What-If Analysis > Goal Seek.
- In Set cell, enter or select the cell containing the formula whose result should change.
- In To value, type the target result as a number. Do not type an equals sign or a formula here.
- In By changing cell, select the input cell Excel is allowed to adjust.
- Choose OK. Review the proposed result and choose OK to keep it, or cancel to reject it.
The set cell must contain a formula, and that formula must depend, directly or through other formulas, on the changing cell. The changing cell should be a single editable value, rather than a formula cell or a range. Goal Seek is designed to change one input at a time; it does not let you set limits such as “the quantity must be a whole number” or “the result must stay below a budget.”
Excel’s dialog is available in the Windows desktop app. Excel for the web does not provide the desktop Goal Seek command, so open the workbook in the desktop app to use it. On Mac, use the desktop version and look for Data > What-If Analysis > Goal Seek; wording or ribbon placement can vary with the Excel build. There is no need to enter a worksheet function called GOALSEEK: Excel Goal Seek is a command, not a cell formula.
A worked example: find a rectangle’s length
Suppose A1 contains the rectangle’s width in meters, B1 contains an initial guess for its length, and C1 is the area. Enter the following formula in C1:
With the width in A1 and the length in B1, calculate area in C1 with =A1*B1.
For this illustration, put 8 in A1 and 10 in B1. The formula returns 80 square meters. If the target area is 120, open Goal Seek and set Set cell to C1, To value to 120, and By changing cell to B1. Excel changes B1 to 15, because 8 multiplied by 15 is 120. The formula in C1 remains in place and recalculates to the target.
This example shows why the starting value matters: B1 must be an editable input, while C1 must be the calculated result. If you accidentally set B1 as the formula cell, or choose A1 as the changing cell when the width should remain fixed, the setup no longer represents the question you meant to ask.
Goal Seek in LibreOffice Calc
If “Calc” means LibreOffice Calc, its Goal Seek tool solves the same basic kind of problem: make a formula cell reach a target by changing one other cell. In Calc, use Tools > Goal Seek. In the dialog, identify the formula cell, enter the target value, and identify the cell whose value Calc should vary. The cell references and target should match the roles used in Excel, even though the dialog presentation is not identical.
For the rectangle example, the formula cell is C1, the target is 120, and the variable cell is B1. Calc should find a length of 15 when A1 is 8 and C1 contains the area formula. Check that the formula uses the correct references before running the tool; a wrong cell reference produces a valid calculation for the wrong model.
Excel and Calc files can generally be exchanged, but menu commands and some workbook features are application-specific. If you are following instructions written for Excel, do not look for Goal Seek as a worksheet function in Calc. Conversely, if a Calc guide says Tools > Goal Seek, that is not the Excel ribbon path. Save the workbook in the format you need and check the result after opening it in the other program.
Build a model Goal Seek can solve
A useful Goal Seek worksheet separates assumptions, inputs, and calculated outputs. Keep the changing value in a clearly labeled input cell, make the formula cell easy to identify, and verify the formula independently with an ordinary input before seeking a target. This makes errors easier to spot and the result easier for another person to review.
- Use one variable cell. Decide which single input is allowed to change. If several assumptions need adjustment, Goal Seek alone is not the right tool.
- Make the formula depend on that input. A formula that does not reference the changing cell, directly or indirectly, cannot respond to its changes.
- Choose a meaningful target. The target should use the same units as the formula result. For instance, an area formula measured in square meters needs an area target, not a length.
- Keep constraints in mind. Goal Seek does not enforce practical conditions such as a positive value, whole units, or an upper limit. Check those conditions after it returns a result.
- Save or record the starting value. Accepting a result updates the changing cell, so keeping the original assumption may require a copy or a note.
For money-related models such as budgets, loan payments, or revenue targets, treat a Goal Seek output as a calculation from the assumptions entered, not as financial, tax, investment, or legal advice. For an illustrative worksheet, show the formulas and assumptions clearly; verify actual loan terms with the lender or consult a qualified professional when a decision depends on them.
What Goal Seek cannot do
Goal Seek adjusts only one changing cell. It is suitable for questions like “what value of this input makes this formula equal the target?” It is not a general-purpose optimizer and does not search a whole range of possible inputs while applying several independent restrictions. If the answer must satisfy constraints, or if multiple variables need to change together, use Solver instead. Solver is a separate Excel add-in that may need to be enabled, and its availability and interface can vary by platform.
There may also be more than one input value that gives the target, or no feasible value at all. Goal Seek does not present a list of all possible solutions or prove that the result is the only one. Its iterative search can depend on the starting value, especially when the formula is nonlinear, has abrupt changes, or produces errors for some inputs. Try a sensible starting point and check the formula around the returned value when the model is complex.
Targets that cannot be reached exactly may produce a value whose formula result is close rather than identical to the requested number. This can happen because of rounding, discrete quantities, or the structure of the formula. If your real-world input must be an integer, round only after checking the resulting formula value; rounding the answer can move it away from the target.
Common problems and practical checks
If Goal Seek reports that it could not find a solution, first confirm that the formula cell changes when you manually alter the proposed input. Then check that the formula cell and variable cell have not been mixed up, that the target is numeric, and that the formulas do not return errors for likely input values. A formula that is disconnected from the selected changing cell will never move toward the target.
When the returned answer seems unreasonable, inspect the model rather than assuming the tool has understood the real-world situation. Goal Seek knows only the worksheet formulas and values; it does not know that a length must be positive or that a count should be a whole number. Test nearby values, verify units, and compare the result with the assumptions you intended to hold fixed.
If a target is close but not exact, check whether the displayed cell is rounded. A number format can show fewer decimal places than the stored value, so the screen may show an exact-looking target while the underlying result differs slightly. Increase displayed decimal places or inspect the formula bar and dependent calculations before deciding whether the difference matters.
Frequently Asked Questions
Is Goal Seek a formula in Excel?
No. Goal Seek is a command under Data > What-If Analysis in desktop Excel, not a function entered in a cell. The formula in your worksheet calculates the result; Goal Seek changes an input cell to reach the target.
Can Goal Seek change more than one cell?
No. Excel Goal Seek changes one variable cell per operation. For multiple changing cells or constraints, investigate Solver or restructure the model into separate one-variable questions.
Why is Goal Seek missing in Excel for the web?
The web app does not include the desktop Goal Seek command. Open the file in the Excel desktop app, where the command is available from Data > What-If Analysis > Goal Seek.
Where is Goal Seek in LibreOffice Calc?
In LibreOffice Calc, open Tools > Goal Seek. Choose the formula cell, the target value, and the single variable cell, then review the result.
Does Goal Seek always find the exact answer?
No. It can return a close result, fail to converge, or miss a solution depending on the formula and starting value. Check the resulting formula, units, and any practical constraints before relying on it.
Related
- Circular Reference in Excel: How to Spot and Trace It
- How to Find and Clear a Circular Reference in Excel
- How to Enter an Absolute Cell Reference in Excel
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Multiply Hours by Money in Excel: A Practical GuideTo calculate pay from decimal hours, put the hours in B2 and the hourly rate in C2, then…
- Excel Scatter Plot Colors by Group: A Step-by-Step GuideTo color an Excel scatter plot by group, put each group in its own data series, then assign…
- Monthly Budget Template Google Docs: Setup and TipsYes—you can make a monthly budget template in Google Docs by creating a document with a table for…
- Present PowerPoint in Teams With Speaker NotesTo present PowerPoint in Teams while keeping your speaker notes to yourself, open the meeting, select Share, and…
- How to Find Unique Values in Google SheetsTo list distinct values without changing your source data, enter =UNIQUE(A2:A10) in an empty cell, replacing the range…
- Add Conditional Formatting in Excel: Rules and TipsTo add conditional formatting in Excel for Microsoft 365 on Windows, select the cells you want to format,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.