Excel Formula Solver: Goal Seek, Solver, and How to Use Them

Formulas & functions · Updated November 19, 2026

Excel does not have a worksheet function called “formula solver.” To make Excel find an input that produces a target result, use Goal Seek; to optimize a result while observing several changing cells or constraints, enable the Solver add-in. Both work with formulas already in your sheet.

What “formula solver” means in Excel

People use “Excel formula solver” to mean one of two related tools. Goal Seek works backward from a result: you tell it the value a formula should return and which one input cell it may change. Solver handles broader optimization problems: it can change multiple cells to maximize, minimize, or reach a target, while respecting limits such as budgets, capacity, or whole-number requirements.

Neither tool replaces the formula in a cell. You first build a model with input cells and formula cells, then ask a tool to adjust the inputs. For example, a sales total might be calculated from a unit price and quantity. Goal Seek can find the price needed for a desired total. Solver can decide how much of several products to make when each uses different amounts of limited resources.

Choose based on the shape of the question: one output formula and one adjustable input usually calls for Goal Seek; several decisions or constraints usually call for Solver. If you only need to calculate a result from known values, an ordinary Excel formula is enough.

Use Goal Seek for one changing input

Goal Seek is the simplest way to solve a “what input gives me this answer?” question. It requires a formula cell, a target value, and one changing cell. The changing cell must affect the formula, either directly or through other formulas. Goal Seek adjusts that cell until the result is close to the target.

For a small example, put the number of units in B2 and the unit price in B3, with 40 units and a price of 15. With those assumptions, enter this formula in B4 to calculate revenue:

With units in B2, price in B3, and revenue in B4, use =B2*B3. The current result is 600.

  1. Select the formula cell, B4.
  2. On Windows, choose Data > What-If Analysis > Goal Seek. In Excel for Mac, open Data > What-If Analysis > Goal Seek if the command is shown; ribbon placement can vary by release.
  3. In Set cell, enter B4. In To value, enter 1000. In By changing cell, enter B3.
  4. Choose OK, review the proposed result, and choose OK again to keep it or Cancel to restore the previous value.

In this example, Excel changes the price in B3 to 25 because 40 units at 25 each produce revenue of 1,000. Goal Seek changes the input cell itself; it does not create a separate answer formula. Record the original assumption or use a copy of the worksheet if you need to compare scenarios.

When to use the Solver add-in

Use Solver when a problem has more than one decision variable, when the variables must meet constraints, or when you want the best possible result rather than a single input that hits a target. Typical applications include choosing a production mix, allocating staff hours, planning shipments, or distributing a fixed budget across activities. These are mathematical planning examples, not a substitute for checking real-world requirements.

Solver is an Excel add-in, not a normal worksheet function. In Excel for Microsoft 365 on Windows, enable it by choosing File > Options > Add-ins. At the bottom, set Manage to Excel Add-ins and select Go. Check Solver Add-in and select OK. When enabled, Solver appears on the Data tab, usually in the Analyze group. On Mac, use Tools > Excel Add-ins, check Solver Add-in, and then look for Solver on the Data tab. The add-in is included with desktop Excel; it does not require a separate Solver formula.

Solver is not supported as an add-in in Excel for the web. Open the workbook in desktop Excel to use it. If Solver is missing on Windows or Mac, check the add-in setting first, then confirm that you are using the desktop application rather than a browser tab.

Set up a Solver model step by step

A Solver model needs three pieces: an objective cell containing a formula, one or more changing cells, and optional constraints. Use a clear layout and label every input so it is easy to tell which values Solver is allowed to alter.

Consider a simple production example. Put the quantities of products A and B in B2 and C2. Put their unit profits, 30 and 50, in B3 and C3. Put machine hours per unit, 2 and 1, in B6 and C6; labor hours per unit, 1 and 3, in B7 and C7. The available machine time is 40 hours and labor time is 60 hours. Enter these formulas:

  • With quantities in B2:C2 and unit profits in B3:C3, put total profit in B4 using =SUMPRODUCT(B2:C2,B3:C3).
  • With quantities in B2:C2 and machine hours per unit in B6:C6, put machine hours used in B5 using =SUMPRODUCT(B2:C2,B6:C6).
  • With quantities in B2:C2 and labor hours per unit in B7:C7, put labor hours used in B8 using =SUMPRODUCT(B2:C2,B7:C7).

Open Data > Solver and set the objective to B4. Choose Max. Set By Changing Variable Cells to B2:C2. Add constraints that B5 is less than or equal to 40 and B8 is less than or equal to 60. Also require B2:C2 to be greater than or equal to zero; alternatively, select Make Unconstrained Variables Non-Negative if that setting is available in the Solver Parameters dialog. For this linear model, choose Simplex LP as the solving method, then select Solve.

One optimal answer is 12 units of A and 16 units of B. It uses 40 machine hours and 60 labor hours, and the profit is 12 × 30 + 16 × 50 = 1,160. This result assumes fractional production is permitted in general; here the answer happens to be whole numbers. If quantities must always be integers, add an integer constraint for B2:C2. Integer constraints can change the solution and may take longer to solve.

Choose the right solving method

Solver offers different methods because models can behave differently. Simplex LP is appropriate for linear models: relationships in the objective and constraints are linear in the changing cells. The production example is linear because each additional unit contributes a fixed profit and fixed resource use.

GRG Nonlinear is intended for smooth nonlinear models, such as formulas involving changing cells multiplied together or certain powers and functions. Evolutionary can be useful for models with discontinuities, IF-based logic, or other difficult nonlinear behavior, but it may take longer and produce a good solution without proving it is the best possible one. Select the method that fits the model rather than assuming one setting works for every workbook.

For a linear model, check whether the objective and each constraint change in a straight-line way as the decision cells change. If your model includes conditions, lookup logic, or integer restrictions, the best method may not be obvious. Start with the method that matches the mathematics, then examine Solver’s result and test whether it makes practical sense.

Goal Seek, Solver, and formula alternatives

Goal Seek and Solver answer different questions. Goal Seek adjusts one cell to make one formula equal a specified value. It is quick for a break-even price, a required sales quantity, or a loan payment target when only one input is unknown. Solver can optimize a result across multiple changing cells and enforce several limits. It is the better fit for resource allocation or a mix of decisions.

For a small, fixed calculation, you may not need either tool. A direct formula, a data table, or a few manually entered scenarios may be easier to audit. Excel’s Data Table feature can compare outcomes for one or two inputs, while Solver searches for values under its stated model. If your problem is simply “what does the result equal for these inputs?”, use a formula rather than a solver.

Solver’s answer depends on the model you provide. It does not know whether your assumptions are sensible, whether a constraint was omitted, or whether a spreadsheet formula represents a real-world rule correctly. Treat the output as a solution to the cells and constraints in the workbook, not as independent validation of the underlying plan.

Common problems and ways to troubleshoot

  • Goal Seek cannot change the result: Confirm that the changing cell affects the formula cell. Check for a fixed value, a broken cell reference, or a formula path that does not depend on the selected input.
  • The result is close but not exact: Goal Seek uses numerical iteration, so some models may produce a near match rather than an exact decimal result. Check the displayed precision and the underlying cell value, and consider whether rounding is part of the formula.
  • Solver reports no feasible solution: The constraints may conflict. For example, a required minimum could exceed a resource limit. Review the limits, units, and changing-cell range, and temporarily remove constraints one at a time to identify the conflict.
  • Solver returns an unexpected answer: Check whether the objective is set to Max, Min, or Value Of as intended, and verify that all changing cells and constraints are included. A missing nonnegative or integer constraint can permit an answer that is mathematically valid but unusable in practice.
  • The solution seems poor: A nonlinear model may have several local solutions, or the selected method may not suit the formula structure. Review the method, starting values, and assumptions; test plausible alternative inputs rather than trusting an implausible output.

Saving, reviewing, and sharing results

After Goal Seek or Solver finishes, inspect the changed cells as well as the objective formula. Solver may offer options to keep the solution or restore the original values. If you want to preserve the result, save the workbook after deciding which values to keep. You can also save a Solver model in the worksheet through Solver’s Load/Save options, which helps retain the setup for later use.

For an auditable workbook, document the target, changing cells, constraints, and units near the model. Keep inputs separate from calculated results, use labels, and note whether decision variables may be fractional. If someone else will rely on the workbook, explain which assumptions are estimates and verify that formulas reference the intended cells.

Goal Seek and Solver change cell values, so keep a copy of important starting assumptions. These built-in tools do not require macros. If a workbook uses macros or third-party add-ins to automate optimization, review the source and permissions before enabling them, and save a separate copy before running unfamiliar code.

Frequently Asked Questions

Is there an Excel formula called SOLVER? No. Solver is an Excel add-in, and Goal Seek is a command in What-If Analysis. Both adjust worksheet inputs based on formulas; neither is entered as a worksheet function.

How do I make Excel find a value for a formula? If one input cell needs to change so one formula reaches a target, select Data > What-If Analysis > Goal Seek. Specify the formula cell, target value, and changing cell. Use Solver if the task needs multiple changing cells or constraints.

Is Solver free in Excel? Solver is included as an add-in with desktop Excel, though you may need to enable it. It is not a separate worksheet function, and the Solver add-in is not available in Excel for the web.

Can Goal Seek change more than one cell? No. Goal Seek changes one input cell at a time. If several decision cells must change together, use Solver and define the changing-cell range and any necessary constraints.

Why is Solver not showing on the Data tab? In desktop Excel, enable Solver through Excel Add-ins: on Windows, File > Options > Add-ins, then Manage: Excel Add-ins > Go; on Mac, Tools > Excel Add-ins. If you are using Excel for the web, open the workbook in the desktop app to use Solver.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.