Juan Torres Plain Solver

Plain Solver · free, in your browser

Build your own solver

Answer four plain questions: what you decide, what you know, what has to be true, and what makes one plan better than another. Plain Solver finds the best plan and explains it in words. It works for homework, small business and supply chains with thousands of routes, with no formulas and nothing to install.

Or start from an example

Each one is made of the same four steps, so you can change any part of it.

    Bring in a table

    Save as my template

    Tick the numbers the template should ask for. It's kept in this browser only.

      Building blocks

      Each block is one sentence with blanks. Fill them with your own lists and columns, and it writes the decisions, rules and costs for you, at any size. You can change anything it writes afterwards.

      Blocks work on your lists. Add one first (paste from a spreadsheet, or “+ A list”), then come back.

        Combine with another model

        Its lists, decisions, rules and goal are added to this model (anything with the same name is renamed), and its goal is added to this one. Say production planning plus shipping, solved together.

          The whole model as text

          One line per sentence. Edit it, paste a model in, or copy the format guide into an AI chat with a description of your problem and paste back its answer.

          Build your own solver: a free online optimization solver in plain English

          What an optimization solver does

          Plenty of everyday decisions have the same shape. There are some things you control (how many people to schedule, how much to ship on each route, which sites to open), some rules the answer has to respect (demand has to be met, a truck holds only so much, a person works one shift), and one number you want as low or as high as possible, usually a cost or a profit. An optimization solver searches every combination the rules allow and returns the best one. Excel Solver is the best-known tool for this, but it asks you to lay the problem out in cells and write each rule as a formula. Plain Solver is a free online linear programming solver (and integer, quadratic and nonlinear) that asks for the same information as sentences.

          Build your own solver in four questions

          “Build your own solver” starts from a blank page and four plain questions, each with a line you fill in like a madlib:

          1. What do you decide? “I decide how many workers to hire for each store.”
          2. What do you know? “Cost per hour is 15 $/hour”, or a whole list pasted from a spreadsheet.
          3. What has to be true? “wood per chair times chairs to make plus wood per table times tables to make must be at most wood available.”
          4. What makes one plan better? “Make profit per chair times chairs to make plus profit per table times tables to make as high as possible.” For a profit or a cost there's a shortcut: pick “The most profit” and list what comes in and what goes out, each a number times one of your decisions (a price times chairs to make), and the sentence is written for you.

          The blanks take the names you've already given things, typed the way you'd say them (plus, minus, times, divided by, “total of … across …”), with suggestions as you type. That's a whole model: press Solve. Every line becomes an ordinary sentence you can change from menus, and every expression has a pencil to retype it.

          The sentences underneath

          A model here has five kinds of sentences, each one built from menus, so it can't be written wrong.

          • What you have: the facts. A single thing with numbers (“Workers: units per hour = 10”), a list (stores and each one's demand), or a grid with one number for every pair from two lists (the freight cost from each warehouse to each store). Lists and grids can be pasted straight from a spreadsheet or uploaded as .csv or .xlsx.
          • What you decide: the numbers the solver gets to choose. Each is any amount, a whole number, or yes-or-no, with optional limits, and can be one per row of a list: “decide how much to ship from each warehouse to each store”.
          • What you work out: named results such as “Units made = units per hour × hours worked”. Once named, a result can be used in any later sentence, which is how long models stay readable.
          • The rules: “Units made plus shortage must be at least demand”, “for each store, the total shipped to it must be at least its demand”, “choose at most 2 of the sites”, “each person gets a different shift”.
          • The goal: make a result as low as possible, as high as possible, equal to a number, or as close as possible to one.

          Giant, fully custom models

          Real problems are bigger than a template, and most of their data is a list of connections: routes from one place to another, lanes, arcs, assignments. A list column can hold names of another list's rows (a lane's From is a plant), so a model can follow those links: “for each plant, the total shipped on lanes where the lane's From is this plant is at most its capacity”, or a lane's cost plus the handling cost of the plant it leaves from. That covers networks of any shape, multi-step supply chains and anything with three or more dimensions, without a giant mostly-empty grid. A network with 2,000 places and 20,000 routes solves in a few seconds; a 100 × 2,000 transportation model (200,000 decisions), in about five.

          • Building blocks write a whole pattern from one fill-in sentence: flow through a network, shipping from sources to destinations, open-or-close with a fixed cost, stock carried from one period to the next, mixing to meet requirements, assigning each one to exactly one, picking the best set of items. Fill the blanks with your own lists and columns; the decisions, rules and costs appear as sentences you can edit.
          • A whole workbook comes in at once: every sheet becomes a list (or a grid, when its first row and column both name rows of lists), and a column whose entries all name rows of another sheet becomes a link to it.
          • Models combine: add the staffing model to the shipping model and they're solved together, goals added.
          • The whole model as text, one line per sentence, for writing a large model in one go. “Copy the format guide for an AI” puts the format and your current model on the clipboard, so a chat assistant can write a model from a description of your problem; paste its answer back in.

          If you'd rather type everything, turn on power mode in Advanced: every expression becomes a formula such as Workers.units_per_hour * (Regular_hours + Overtime_hours), with names suggested as you type and the sentence version shown underneath.

          A plain-English summary of the whole model sits above the sentences and changes as you edit, and the checks underneath it catch the usual mistakes before you solve: a decision nothing uses, a result that depends on itself, a rule that adds dollars to hours.

          Which method solves it

          The page reads the model and picks the method, and tells you which one it used and what that means for the answer:

          • Linear models (every rule and the goal are sums of decisions times numbers) go to HiGHS, an open-source solver, using the simplex method. The answer is guaranteed to be the best possible. This is Excel's “Simplex LP”.
          • Whole-number and yes-or-no decisions make it a mixed-integer program, which HiGHS solves by branch and bound, again to a proven best answer (or, if the time limit runs out, the best found and how far from the best it could be).
          • Squared terms in the goal, when the shape is a bowl, go to HiGHS's quadratic solver, still guaranteed.
          • Smooth nonlinear models (decisions multiplied together, powers, square roots) go to a gradient search with an augmented Lagrangian, restarted from several points. This is the job Excel's “GRG Nonlinear” does, and like it, the answer is very good but not guaranteed to be the single best.
          • Models with jumps or corners (if-then on a decision, look-ups, larger-of or smaller-of where they can't be rewritten) go to an evolutionary search, Excel's “Evolutionary” option, with a progress bar and a Stop button.

          Before falling back to a nonlinear method, the page rewrites what it can as an exact linear model: an absolute value or a “larger of” in a goal that pushes it down, and a yes-or-no decision multiplying an amount with known limits (the usual “big-M” trick for fixed costs). When it does, it says so.

          Reading the answer

          The answer starts with the goal's value and what to do, then shows every decision (lists and grids as tables, with zeros greyed), what each named result works out to, which rules are used to the full, and what's limiting you: how much the goal would change if a tight rule allowed one more unit, or one fewer. Those are shadow prices, and at a corner of the problem the two directions can differ, so both are shown. For integer models they're computed with the whole-number decisions held where the solver put them, and labeled as approximate. A what-if slider re-solves as you drag any number, and can draw the goal against that number across a range.

          If no plan meets every rule, the page doesn't stop at “infeasible”. It re-solves a version where every rule may bend at a price, finds the least bending, and reports which rules had to give and by how much (“Meet demand: short by 2,500 units”), with the rules pushing against them and one-click fixes. If the goal can improve forever, it names the decisions that are missing a limit.

          Reports for homework and write-ups

          “Show the math” writes the model in standard notation (sets, data, decision variables, objective and constraints), ready to copy as LaTeX. The reports download as an .xlsx workbook laid out like Excel Solver's: the Answer Report (the objective, every variable cell, every constraint with its status and slack), the Sensitivity Report (reduced costs, shadow prices, the one-sided prices, and the allowable increase and decrease for every cost and every limit) and the Limits Report (how far each decision can move on its own). The model itself downloads as an LP file that any LP solver reads, or as a .json file you can open here again.

          Take it to Excel, with Solver already set up

          “Excel + Solver” downloads your model as one Excel sheet: your data in yellow cells, the decisions in blue cells (with the answer already in them, if you've solved), and every result, rule and the goal as live formulas, using SUM and SUMPRODUCT where a spreadsheet would. Excel's Solver is already set up in the file: open it, choose Data → Solver, and press Solve. Change the yellow cells and solve again, and you have your own reusable Excel template. Every example here gives the same answer in Excel's Solver as on this page, from scratch.

          Templates

          Ten models are ready to start from, each made with the same sentences you can edit: staffing (hire, overtime or lost sales), product mix, transportation, six-month aggregate production planning with level and chase policies, shift assignment, blending, facility location with fixed costs, truck loading, budget allocation, and pricing against a demand curve. Picking one asks a few plain questions, with sample answers filled in. Save any model as your own template and it will ask your questions next time. All the numbers in the templates are made-up samples.

          Questions people ask

          Is there a free alternative to Excel Solver?
          This is one. It covers what Excel Solver's three methods do (Simplex LP, GRG Nonlinear and Evolutionary), whole-number, yes-or-no and “all different” decisions, and the Answer, Sensitivity and Limits reports, with no spreadsheet, add-in or account. If you need the model in a spreadsheet anyway, the reports download as .xlsx and the model as an LP file.
          How big a problem can it solve?
          The solver runs in your browser, so it depends on your computer, but a transportation model with 50 warehouses and 500 stores (25,000 decisions) solves in about two seconds on a laptop. Large integer models can be hard for any solver: when the time limit runs out, you get the best plan found and how far from the best it could be.
          What is a shadow price?
          How much the goal would change if a rule were loosened by one unit: one more hour of overtime allowed, one more unit of demand. Plain Solver shows it in both directions, because at a corner of the problem the two can differ. In the staffing template, one more unit of demand costs $100 (a lost sale) while one fewer saves only $2.25 (the overtime it no longer needs).
          What does “infeasible” mean, and how do I fix it?
          That no plan can meet every rule at once. Instead of stopping there, the page finds the smallest set of changes that would make the rules fit and says which rules have to give and by how much, with buttons to turn a rule off or a decision back on.
          Does it handle nonlinear problems?
          Yes. Squared terms in the goal are solved exactly when the shape allows it; other smooth nonlinear models use a gradient search from several starting points, and models with if-then or look-ups use evolution. The page says which method ran and whether the answer is guaranteed.
          How do I maximize profit?
          In the last step, pick “The most profit”. It lists money coming in and money going out, each line a number times one of your decisions (the price of a chair times chairs to make, the cost of a chair times the same), and fills them in from the names you gave things. Profit is in minus out, made as high as possible; the answer shows each total. “The lowest cost” does the same with only what goes out.
          Can I use the model in Excel?
          Yes. “Excel + Solver” downloads one sheet with your data, live formulas and Excel's Solver already set up: open it, choose Data → Solver, and press Solve. Change the numbers and solve again, and it's your own reusable template.

          For aggregate production planning in particular (level, chase and band workforce plans with the math worked step by step), there's a dedicated tool: the Aggregate Planner. Plain Solver's aggregate planning template is a simpler six-month version you can change sentence by sentence.

          Private by design

          Everything runs on this page: the solver is WebAssembly in your browser, and nothing you type is sent anywhere. The model is kept in your browser between visits. A share link carries the whole model, compressed, in the part of the address after the “#”, which browsers never send to a server. The source is on GitHub.