Microsoft Excel Solver: How It Works and When to Use It

How-to basics · Updated November 3, 2026

Microsoft Excel Solver: How It Works and When to Use It

Microsoft Excel Solver is an optimization add-in that finds values for selected cells to maximize or minimize a formula while meeting rules you specify. In Excel for Microsoft 365 on Windows, enable it through File > Options > Add-ins, choose Excel Add-ins beside Manage, select Go, check Solver Add-in, and then choose Data > Solver.

What Excel Solver does

Solver answers “what combination of inputs gives the best result?” rather than simply calculating a result from inputs you already chose. You provide an objective cell containing a formula, a set of changing cells that Solver may adjust, and optional constraints that describe limits or requirements. Solver searches for values that satisfy those requirements and improve the objective.

This makes it useful for planning problems with trade-offs: increasing one choice may improve profit but consume a limited resource, for example. Solver can work with linear and nonlinear models, depending on the model and the solving method selected. It does not know whether a model represents a sensible business, scientific, or personal decision. Its answer is only as meaningful as the worksheet formulas and assumptions behind it.

Solver is included as an Excel add-in for the desktop application, but it is not loaded in every workbook by default. Excel for the web does not run the Solver add-in; use desktop Excel to build and solve the model. The add-in is not a replacement for ordinary formulas: it uses worksheet formulas to evaluate candidate values and searches for a favorable set of inputs.

How an optimization model is set up

A Solver model has three main parts. The objective is one cell with a formula to maximize, minimize, or set to a particular value. The variable cells are the inputs Solver can change. Constraints define what is allowed, such as a maximum budget, a minimum production quantity, or a requirement that a value be an integer. A well-designed worksheet keeps assumptions, decision cells, calculated results, and limits easy to identify.

Consider a small production plan. A factory makes products A and B. Each unit of A earns $30 and each unit of B earns $50. A uses two labor hours and three units of material; B uses four labor hours and two units of material. The factory has 40 labor hours and 36 units of material. The objective is to maximize total profit, with production quantities nonnegative.

For this example, put the quantities of A and B in B2:C2 and their profit per unit in B3:C3. In B4, calculate total profit with =SUMPRODUCT(B2:C2,B3:C3). With those cell assignments, Solver can maximize B4 by changing B2:C2. Put the resource-use coefficients for labor in B7:C7 (2 and 4) and material in B8:C8 (3 and 2). Put the available capacities in E7:E8 (40 and 36). In D7, calculate labor used with =SUMPRODUCT($B$2:$C$2,B7:C7); in D8, calculate material used with =SUMPRODUCT($B$2:$C$2,B8:C8). These formulas return the total resource use for each row as the quantities change.

Set the objective to B4 and choose Max. Set By Changing Variable Cells to B2:C2. Add constraints D7:D8 <= E7:E8 and B2:C2 >= 0. With a linear model and the Simplex LP method, the best plan is 8 units of A and 6 of B: it uses 40 labor hours and 36 units of material, and returns $540 in profit. If production must be in whole units, add an integer constraint for B2:C2; in this particular example the optimum is already whole-numbered. The example is illustrative, not a recommendation for any real operation.

How to use Solver in Excel for Windows

  1. Enable the add-in if Solver is not visible: choose File > Options > Add-ins. At the bottom, select Excel Add-ins in the Manage list and choose Go. Check Solver Add-in and select OK. If prompted, allow Excel to install or load the add-in.
  2. Prepare the worksheet. Enter starting values in the decision cells, create formulas for the objective and any calculated totals, and keep constraint limits in clearly labeled cells.
  3. Choose Data > Solver. In Set Objective, select the formula cell. Choose Max, Min, or Value Of, as appropriate. In By Changing Variable Cells, select the cells Solver is allowed to adjust.
  4. Choose Add to enter each constraint. A constraint can compare a cell or range with a limit using relations such as <=, =, or >=. Depending on the model, you can also require variables to be integers or binary values.
  5. Choose a solving method, then select Solve. Review the result in the worksheet and choose Keep Solver Solution if you want to retain it, or Restore Original Values to return to the starting inputs.

Solver’s dialog also offers options, including a setting to treat unconstrained variables as nonnegative. Explicitly adding important bounds as constraints can make a model easier to inspect. Save the workbook before trying materially different assumptions, and consider saving separate scenarios so that you can compare the inputs and outcomes later.

Choosing a solving method

The method matters because it determines how Solver searches and what kinds of relationships it can handle. For a model with linear formulas and linear constraints, choose Simplex LP. Linear means that variables appear in a form where their effects combine proportionally, without variable-by-variable products, powers, or nonlinear functions. The production example is linear: each additional unit uses a fixed amount of each resource and adds a fixed amount of profit.

GRG Nonlinear is intended for smooth nonlinear models, where the objective or constraints include nonlinear relationships that change continuously. It can find a local solution rather than guaranteeing the best possible result across every possible starting point. For a difficult nonlinear model, different starting values may lead to different answers, so compare results and check whether they make sense.

Evolutionary is designed for models with discontinuities or relationships that are not smooth, such as certain logical or step-like calculations. It uses a different search approach and may take longer. Solver options let you adjust search behavior and stopping limits, but more time does not make an incorrectly specified model correct. When the model is linear, use the linear method rather than introducing unnecessary complexity.

What Solver can and cannot guarantee

A Solver result is conditional on the formulas, constraints, and method used. For an appropriate linear model, Simplex LP can find an optimum if a feasible solution exists and the model is properly specified. A feasible solution meets all constraints. If no values can meet them together, the model is infeasible; for example, requiring production of at least 20 units while allowing resources for only 10 may create conflicting rules.

For nonlinear problems, Solver may return a locally best result rather than a global optimum. It may also stop because it reached a time or iteration limit, or because it could not find a feasible point. Read the status message rather than assuming every displayed solution is a proof of a global best answer. Check constraint totals, test plausible alternative starting values where relevant, and independently verify important results.

The standard Excel Solver add-in has a limit of 200 changing variable cells, so very large models may exceed its scope. Integer constraints can make problems harder to solve, and adding many unnecessary constraints can make a model slower or less transparent. For models that are too large or complex, a specialized optimization product or programming-based solver may be more suitable.

Common problems and ways to troubleshoot

  • Solver is missing. Confirm that the add-in is enabled, then look on the Data tab. If you are using Excel for the web, open the workbook in desktop Excel; the web version does not run this add-in.
  • Solver says it cannot find a feasible solution. Review every bound and requirement for conflicts. Check units, signs, and whether the formulas point to the intended cells. Temporarily remove a constraint only as a diagnostic, then restore or correct it.
  • The answer seems unreasonable. Check whether the objective is actually set to Max or Min as intended, whether the changing range includes only decision cells, and whether important limits are missing. A typo in a resource coefficient can produce a mathematically valid but practically nonsensical answer.
  • Some values are negative or fractional. Add nonnegativity or integer constraints where the real problem requires them. Solver does not infer that production units, people, or inventory must be whole numbers.
  • The result changes with starting values. This can happen in nonlinear models. Try sensible alternative starting values and compare the outcomes, while recognizing that repeated convergence to one result does not itself prove it is globally optimal.
  • The model is slow. Reduce the changing range to only genuine decision cells, remove redundant constraints, and use Simplex LP if the relationships really are linear. Avoid volatile or unnecessarily complicated formulas when a simpler calculation expresses the same model.

Solver compared with Goal Seek and alternatives

Goal Seek is for a narrower question: what value in one input cell makes a formula reach a chosen target? In desktop Excel for Windows, open Data > What-If Analysis > Goal Seek. Goal Seek changes one input and does not provide Solver’s general system of multiple decision cells and constraints. For example, it can find a sales quantity that makes a profit formula equal a target, but it cannot by itself choose a product mix subject to several resource limits.

Data Tables are useful for comparing formula outcomes across one or two input variables, but they enumerate scenarios rather than searching for an optimum under constraints. Solver is the better fit when the task is to choose values that optimize an objective while satisfying limits. For a simple one-variable target, Goal Seek is usually more direct; for scenario comparison, a Data Table may be clearer.

On Excel for Mac, Solver is also an add-in, but enabling it uses the Mac interface: choose Tools > Excel Add-ins, select Solver Add-in, and confirm. Once available, use Solver from the Data tab. Ribbon details can vary by Excel release. In Excel for the web, use desktop Excel or another optimization tool to solve the model.

Frequently Asked Questions

Is Solver free in Excel? The Solver add-in is included with supported desktop Excel installations and does not normally require a separate Solver purchase. Access to desktop Excel depends on the Microsoft 365 plan or license you have; the add-in is not available to run in Excel for the web.

Where is Solver in Excel? After enabling the Solver Add-in, look on the Data tab in desktop Excel. On Windows, turn it on through File > Options > Add-ins, then Manage: Excel Add-ins > Go. On Mac, use Tools > Excel Add-ins.

Why is Solver not showing in Excel? It may not be enabled, or you may be using Excel for the web, which cannot run the add-in. Enable it in desktop Excel’s add-ins settings and reopen the Data tab. If your organization manages Office settings, its administrator may control add-in availability.

What is the difference between Solver and Goal Seek? Goal Seek changes one input cell to make a formula reach a target. Solver can adjust multiple cells and optimize a formula subject to constraints, making it more appropriate for resource-allocation or scheduling models.

Can Excel Solver handle integer values? Yes. You can add an integer constraint for decision cells that must be whole numbers, or a binary constraint for yes/no decisions represented by 0 and 1. Integer requirements can make a model harder to solve, so include them only when they reflect the actual problem.

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.