How to Use Solver in Excel: The Complete Step-by-Step Guide
Learn how to use Solver in Excel with step-by-step instructions, real examples, and tips for optimization problems. Master Excel's most powerful add-in.

Knowing how to use Solver in Excel is one of the most valuable analytical skills you can build, whether you manage budgets, schedule resources, or optimize production plans. Solver is a powerful add-in that goes far beyond everyday formulas like VLOOKUP in Excel — it lets you find the best possible outcome for a formula by changing multiple input cells, all while respecting a set of constraints you define. If you have ever stared at a spreadsheet wondering which combination of variables produces the lowest cost or highest profit, Solver is the tool that answers that question automatically.
Excel's Solver add-in uses mathematical optimization algorithms — including linear programming, nonlinear GRG, and evolutionary methods — to search thousands of possible combinations and return the optimal result. Unlike manual trial-and-error or simple Goal Seek, Solver can handle dozens of decision variables and enforce hard boundaries such as non-negativity, integer requirements, and upper or lower limits. That flexibility makes it useful for tasks ranging from blending product recipes to scheduling employee shifts to allocating a marketing budget across channels.
Before you can run your first optimization, you need to enable the add-in, because Solver does not appear on the Excel ribbon by default. The setup takes less than sixty seconds in any modern version of Excel, including Microsoft 365, Excel 2021, Excel 2019, and Excel 2016. Once installed, Solver lives under the Data tab, right next to the Analysis ToolPak. Many professionals who learn how to merge cells in Excel or how to freeze a row in Excel for readability never realize that the same application also contains a fully featured operations-research engine waiting to be unlocked.
Understanding the three core elements of a Solver model is essential before you build anything. The objective cell contains the formula you want to maximize, minimize, or set to a specific value — for example, total profit or total cost. The variable cells are the inputs Solver is allowed to change, such as units produced or dollars allocated. The constraints are the rules that restrict which combinations are valid, like a production capacity limit of 500 units per day or a budget ceiling of fifty thousand dollars per quarter. Every Solver model revolves around these three components.
This guide walks you through enabling Solver, building a model from scratch, choosing the right solving method, interpreting the results report, and troubleshooting the most common errors. Along the way you will see concrete worked examples — a product-mix profit problem, a transportation cost problem, and a workforce-scheduling scenario — so you can map the theory directly to situations you encounter in your own spreadsheets. You will also find tips for keeping models organized, avoiding constraint errors, and saving parameter sets so you can switch between scenarios without rebuilding from scratch.
Whether you are preparing for the Microsoft Office Specialist exam, sharpening your data-analysis skills for a job interview, or simply trying to solve a real business problem faster, this guide gives you everything you need. Resources like how to use solver in excel for financial modeling show just how broadly these optimization techniques apply across industries. By the end of this article you will be able to set up, run, and interpret Solver results confidently in any Excel workbook.
Excel Solver by the Numbers

How to Enable and Set Up the Solver Add-In
Open Excel Options
Navigate to Add-Ins
Check the Solver Box
Verify on the Data Tab
Open the Solver Parameters Dialog
With Solver enabled, you are ready to build your first optimization model. The best way to learn is through a concrete example, so consider this scenario: a small manufacturer produces two products — chairs and tables. Each chair earns a profit of $45 and requires 2 hours of labor.
Each table earns $80 profit and requires 5 hours of labor. The factory has 400 labor hours available per week. Your goal is to find the combination of chairs and tables that maximizes total weekly profit, subject to that labor constraint. This is a classic linear programming problem that Solver handles in seconds.
Start by laying out your spreadsheet clearly before touching Solver at all. In column A, list your decision variables: chairs in B2 and tables in B3, both starting at zero or an initial guess like 10. In column B, put your profit coefficients: 45 for chairs, 80 for tables. In cell B5, enter your objective formula: =B2*45+B3*80 to calculate total profit.
In B7, enter the labor-usage formula: =B2*2+B3*5. Good spreadsheet structure makes constraint entry much easier and helps you audit the model later. This organization is just as important as knowing how to create a drop down list in Excel for input validation.
Now open Solver from the Data tab. In the Set Objective field, click cell B5 (total profit). Select the Max radio button since you want the highest profit possible. In the By Changing Variable Cells field, select B2:B3 — those are the quantities of chairs and tables Solver will adjust. Next, click Add to enter your first constraint.
Set B7 (labor used) to less than or equal to 400 (labor available). Click Add again to require that B2 >= 0 and B3 >= 0, preventing negative production quantities. Check the 'Make Unconstrained Variables Non-Negative' checkbox as a shortcut for the non-negativity constraints.
Because both the objective and all constraints are linear functions of the decision variables, select Simplex LP as the solving method. Linear programming guarantees that Solver will find the globally optimal solution rather than a local one. Click Solve and watch Excel fill in the optimal values automatically. In this example, Solver returns approximately 0 chairs and 80 tables, generating $6,400 in weekly profit. You can verify manually: 80 tables × 5 hours = 400 hours used, which exactly meets the capacity limit — as expected for a binding constraint.
After Solver finds a solution, the Solver Results dialog appears. You have three report options: Answer, Sensitivity, and Limits. The Answer Report lists the final values of the objective and all variable cells, along with the status of each constraint (binding or not binding). The Sensitivity Report shows how much the objective coefficients or constraint right-hand sides can change before the optimal solution changes — extremely useful for business decisions involving uncertain data. The Limits Report shows the upper and lower bounds each variable can take while all other variables remain fixed.
One practical trick that many Excel users overlook is saving Solver parameters as a named scenario. Once your model is configured correctly, click the Options button inside the Solver Parameters dialog, then use Load/Save to store the parameters to a range in your worksheet. This lets you maintain multiple models — say, a base case and a worst-case scenario — in the same workbook without having to re-enter constraints each time you switch. Combined with techniques like how to freeze a row in Excel to keep your variable labels visible while scrolling, this habit dramatically speeds up iterative analysis work.
Integer constraints add another dimension of realism. In practice, you cannot produce half a chair or hire a fraction of an employee. Add an integer constraint by returning to the Solver Parameters dialog, clicking Add, selecting your variable cell, choosing 'int' from the dropdown, and clicking OK. Excel will then search only whole-number solutions.
Be aware that adding integer requirements converts the problem from linear programming to integer programming (MIP), which is computationally harder — Solver may take longer to find the optimal solution, especially when you have many integer variables. For most business problems with fewer than 50 variables, the solution time remains well under a minute.
Choosing the Right Solving Method for Your Model
Simplex LP is the correct choice when your objective function and all constraints are linear — meaning every formula involves only addition, subtraction, multiplication by a constant, and division by a constant. Classic examples include product-mix problems, transportation models, diet problems, and budget-allocation tasks. Linear models are the most common in business and finance, and the Simplex algorithm guarantees finding the global optimum rather than a local one, provided a feasible solution exists at all.
To verify that your model qualifies as linear, check that no variable is multiplied by another variable, raised to a power, or passed through a nonlinear function like LOG or EXP. If your profit formula is simply unit price times quantity for each product, that is linear. If it involves diminishing returns modeled by a square-root curve, it is not. When in doubt, run Solver with Simplex LP and check the 'Assume Linear Model' checkbox in the Options dialog — Excel will alert you if the model is actually nonlinear.

Excel Solver: Key Advantages and Limitations
- +Handles complex multi-variable optimization problems that would take hours to solve manually
- +Included free with all versions of Microsoft Excel — no additional software required
- +Three solving algorithms cover linear, nonlinear smooth, and discontinuous problem types
- +Sensitivity and Answer Reports provide deep insight into solution robustness
- +Supports integer and binary variable constraints for real-world integer programming
- +Parameters can be saved and loaded, enabling fast scenario switching without re-entry
- −Limited to 200 decision variables and 100 constraints in the standard Excel version
- −GRG and Evolutionary methods cannot guarantee globally optimal solutions for nonlinear problems
- −No built-in visualization of the feasible region or objective-function contours
- −Can be slow on large integer-programming models with many binary variables
- −Error messages like 'Solver could not find a feasible solution' are not always descriptive enough to diagnose problems quickly
- −Solver parameters are not stored with the file by default unless explicitly saved to the worksheet
Excel Solver Setup Checklist — Before You Click Solve
- ✓Enable the Solver Add-in via File → Options → Add-Ins before attempting to use it.
- ✓Define a single objective cell that contains a formula (not a raw number).
- ✓Enter reasonable starting values in all variable cells to help GRG or Evolutionary converge.
- ✓List every constraint explicitly — do not rely on Solver to infer physical limits.
- ✓Check the 'Make Unconstrained Variables Non-Negative' box if negative values are not meaningful.
- ✓Choose Simplex LP for linear models, GRG Nonlinear for smooth curved models, Evolutionary for discontinuous models.
- ✓Verify all formulas reference the variable cells correctly before running Solver.
- ✓Save your Solver parameters to the worksheet after building the model so they are not lost.
- ✓Request the Answer Report and Sensitivity Report when a solution is found to understand binding constraints.
- ✓Test the model with a manually calculated edge case to confirm Solver is solving the right problem.
Binding Constraints Tell You Where Real Limits Are
A binding constraint is one where the Solver solution uses the resource exactly to its limit — for example, all 400 labor hours consumed. Binding constraints are where you gain the most value from relaxing the limit: adding 10 more labor hours to a binding constraint increases profit, while adding capacity to a non-binding constraint changes nothing. Always read the Answer Report's constraint status column before making capacity-investment decisions based on a Solver result.
One of the most instructive real-world Solver applications is transportation cost optimization — a problem type that appears in logistics, retail distribution, and manufacturing supply chains. Imagine you have two warehouses (W1 and W2) and three retail stores (S1, S2, S3). W1 holds 300 units and W2 holds 200 units. S1 needs 150 units, S2 needs 200 units, and S3 needs 150 units.
Each warehouse-to-store route has a different per-unit shipping cost. The goal is to find the shipping quantities from each warehouse to each store that minimize total cost while meeting all supply and demand requirements. This classic transportation model has six decision variables (one per route) and five constraints (two supply limits, three demand requirements).
Set up a 2×3 table of decision variables representing units shipped on each route. Below the table, calculate total cost using SUMPRODUCT of the cost matrix and the quantity matrix. Add supply constraints (sum of each row ≤ warehouse capacity) and demand constraints (sum of each column = store requirement). Use Simplex LP as the solving method.
Within seconds, Solver will return the least-cost shipping plan — typically a corner-point solution where several routes carry zero units and the remaining routes fully use one or both warehouses. The Sensitivity Report reveals how much each per-unit shipping cost can rise before a different routing becomes optimal.
Employee scheduling is another area where Solver proves its value, especially for businesses that must meet minimum staffing levels across multiple shifts. Suppose a call center operates three eight-hour shifts (morning, afternoon, night) and must staff at least 15 agents on morning, 20 on afternoon, and 10 on night. Agents are paid different hourly rates depending on the shift.
The variable cells are the number of agents assigned to each shift, and the objective is to minimize total labor cost. Integer constraints ensure the result is whole numbers of people. Add an upper-bound constraint if you have a total headcount limit, and Solver will find the cheapest staffing plan that meets all coverage minimums.
Portfolio optimization is a finance example that uses GRG Nonlinear. Given a set of assets with expected returns and a covariance matrix, you can minimize portfolio variance for a target return. The variable cells are portfolio weights summing to 1.0. The objective is to minimize variance (a nonlinear quadratic function of the weights). Constraints include the sum-to-one requirement and optional bounds like no more than 30% in any single asset.
Running this model for multiple target-return levels traces out the efficient frontier — the set of portfolios with minimum risk for each return level. This is the foundation of modern portfolio theory, implemented in a standard Excel spreadsheet without any specialized finance software.
A product-blending problem shows how Solver handles percentage and ratio constraints. A food manufacturer blends three raw ingredients into a finished product. Each ingredient has a different protein content, fat content, and cost per pound. The final product must contain at least 20% protein and no more than 15% fat, and must weigh exactly 1,000 pounds.
The variable cells are pounds of each ingredient. The objective minimizes total raw-material cost. Percentage constraints are entered as formulas: (protein from ingredient 1 + protein from ingredient 2 + protein from ingredient 3) / total blend weight >= 0.20. Solver finds the cheapest blend that meets the nutritional specification exactly.
Capital budgeting uses binary Solver variables to decide which projects to fund. Each potential project has a cost and a net present value (NPV). You have a total budget of $500,000. Each variable cell is binary (0 = do not fund, 1 = fund). The objective maximizes total NPV. The constraint is that total project cost must not exceed $500,000.
This is the classic 0-1 knapsack problem, and Evolutionary or Simplex with binary variables will return the optimal project portfolio. Sensitivity analysis then shows which project, if added, would produce the greatest NPV increase per dollar of additional budget — a direct input to capital-allocation conversations with management.
Across all these examples, the pattern is the same: define what you are optimizing, identify what you can change, and state the rules that limit your choices. The more clearly you can articulate those three elements before touching Excel, the faster and more accurately you can build the model. Users who already understand how to merge cells in Excel for clean layout and VLOOKUP in Excel for pulling cost data into their models will find that Solver slots naturally into a broader analytical workflow rather than being an isolated feature.

If Solver reports 'could not find a feasible solution,' at least one constraint is impossible to satisfy — often a demand requirement that exceeds total supply. Check each constraint individually. If Solver reports 'the objective cell values do not converge,' the model is unbounded — the objective can grow infinitely because no constraint prevents it. Both errors require you to review your constraint definitions, not just re-run Solver with different settings.
Troubleshooting Solver errors is an essential skill because even well-designed models can fail to solve for reasons that are not immediately obvious. The most common error — 'Solver could not find a feasible solution' — means the constraints as written are mutually contradictory. For instance, if you require total production to be at least 500 units but also cap labor hours at a level that only supports 400 units, Solver has no valid solution. Diagnose this by temporarily relaxing constraints one at a time and re-running Solver after each relaxation to identify which constraint is causing the infeasibility.
The 'objective cell values do not converge' message indicates an unbounded model — the objective can grow (or shrink) without limit because the constraints do not adequately bound the feasible region. This often happens when a maximize model is missing a resource capacity constraint, or when a minimize model is missing a non-negativity constraint that would normally prevent variables from going to negative infinity. Adding the missing bound resolves the error immediately. Review your variable cells and ask whether any of them can logically be unlimited in the real-world scenario you are modeling.
If Solver returns a solution that looks wrong or sub-optimal, the most likely causes are poor starting values (for GRG or Evolutionary), a nonlinear model being solved with Simplex LP, or a constraint entered in the wrong direction. For GRG problems, try entering different starting values in the variable cells and re-running to see whether a better objective value emerges. For Simplex problems, click the Check Model button in Solver Options to confirm Excel agrees the model is linear. For constraint-direction issues, trace each constraint formula manually to verify that <= means what you intend.
Scaling issues can also undermine Solver's accuracy. If your variable cells range from tiny fractions (0.000001) to large integers (500,000) in the same model, Solver's internal arithmetic may struggle with numerical precision. Excel's documentation recommends scaling variables so they are within two or three orders of magnitude of each other — for example, expressing budget in thousands of dollars rather than raw dollars when other variables are unit quantities. Enable the 'Use Automatic Scaling' checkbox in the Solver Options dialog to let Excel handle this normalization for you, which often resolves convergence problems without any manual reformulation.
When a Solver result seems reasonable but you want to verify it rigorously, the Sensitivity Report is your best tool. The Allowable Increase and Allowable Decrease columns for objective coefficients show how much each profit or cost value can change before the current solution is no longer optimal.
A very small allowable range means the solution is sensitive to that input — a 5% change in raw-material cost could shift the optimal product mix. A large allowable range means the decision is robust across a wide range of that input. This information is often more actionable than the optimal solution itself, because it tells you which assumptions most urgently need validation.
For large or complex models, consider breaking the problem into stages. Solve a simplified version first — perhaps with fewer products or relaxed constraints — to confirm the model structure is correct, then progressively add complexity. This staged approach catches structural errors early before they propagate into a complicated model where they are harder to isolate. It also gives you a benchmark solution from the simplified model to compare against the full model's results, which helps you detect if an added constraint or variable is having an unexpectedly large effect on the objective.
Experienced Excel analysts often pair Solver with Data Tables to build a two-dimensional sensitivity grid without writing additional formulas. After finding the optimal solution, lock in the Solver result, then use a Data Table to show how the objective changes across a grid of two key parameters — for example, labor cost and material cost. This creates a rich picture of solution stability that goes well beyond the standard Sensitivity Report. Combining these capabilities is what separates advanced Excel modeling from basic spreadsheet use, and it is the kind of technique that distinguishes candidates in data-analyst and financial-modeling job interviews.
Integrating Solver into a regular analytical workflow requires some organizational habits that pay dividends over time. First, always document your Solver model with a dedicated section at the top of the worksheet: list the objective, the variable cells, and each constraint in plain English before writing any formulas. This documentation takes five minutes and saves hours of confusion when you revisit the model weeks later or hand it off to a colleague. A model that is self-documenting is far less likely to be misused or misinterpreted under time pressure.
Second, use named ranges for all key cells. Instead of entering B5 as the objective cell, name that cell TotalProfit and reference it by name throughout. Named ranges make the Solver Parameters dialog much easier to read, and they ensure that adding or deleting rows does not silently break your model.
Excel's Name Manager (Formulas tab) provides a central place to view and edit all named ranges in the workbook. This practice pairs well with skills like knowing how to create a drop down list in Excel for scenario selection, which allows users to switch input assumptions without touching formulas directly.
Third, version your Solver models using Excel's built-in Scenario Manager or simply by duplicating worksheets before making significant changes. Optimization models evolve as business requirements change — capacity limits increase, new products are added, cost structures shift. Keeping a dated archive of previous model versions lets you trace how optimal decisions changed over time and provides a rollback point if a new constraint turns out to be incorrectly specified. This is especially important in regulated industries where analysts must be able to explain and defend their optimization assumptions to auditors or management.
Fourth, combine Solver with Power Query or structured tables for data-driven models that update automatically when underlying data refreshes. For example, if your shipping cost matrix is pulled from a database via Power Query, refreshing the query updates the cost inputs, and re-running Solver immediately re-optimizes the shipping plan. This near-real-time optimization capability transforms Solver from a one-off analysis tool into an operational decision-support system. Setting up such a workflow does require some investment in structured spreadsheet design, but the ongoing time savings are substantial.
Fifth, practice building models for problem types outside your immediate field. Solving a linear programming textbook problem, a diet blending problem, or a network-flow problem deepens your intuition for what makes a good Solver formulation. The more model types you have worked through, the faster you can recognize an optimization problem in a real situation and translate it into the three-component Solver structure: objective, variables, constraints. This pattern-recognition skill is what separates occasional Solver users from analysts who reach for it confidently whenever a decision problem involves multiple trade-offs.
For professionals preparing for Excel certification exams, Solver questions tend to focus on enabling the add-in, identifying the correct solving method for a described problem type, and interpreting Sensitivity Report outputs. Practice recognizing the vocabulary: objective function, decision variables, constraints, binding versus non-binding, shadow price (the change in objective per unit increase in a constraint's right-hand side), and allowable range. The MOS Expert exam in particular tests whether candidates can set up a complete Solver model from a business scenario description and explain the results — skills you will have fully developed by working through the examples in this guide.
Finally, stay current with Solver's evolution. Microsoft has steadily expanded Solver's capabilities through partnerships with Frontline Systems, the company that builds the underlying engine. The premium Solver add-ins available from Frontline (Premium Solver Platform, Solver SDK) extend the variable and constraint limits well beyond the Excel defaults, add large-scale LP and MIP solvers, and provide stochastic optimization features for problems with uncertain data. If your business problems regularly hit the 200-variable ceiling or require faster solve times than Excel Solver provides, exploring these professional-grade extensions is a natural next step in your optimization journey.
Excel Questions and Answers
About the Author
Business Consultant & Professional Certification Advisor
Wharton School, University of PennsylvaniaKatherine Lee earned her MBA from the Wharton School at the University of Pennsylvania and holds CPA, PHR, and PMP certifications. With a background spanning corporate finance, human resources, and project management, she has coached professionals preparing for CPA, CMA, PHR/SPHR, PMP, and financial services licensing exams.




