# Linear Programming Solver - Simplex Tableau Steps & Graph

> Solve linear programs typed naturally: every simplex tableau with the pivot (two-phase or Big M), graphical method, integer programs and shadow prices.

- URL: https://qilingtools.com/en/math/linear-programming
- Category: Math Tools (https://qilingtools.com/en/math)
- Tags: [Math](https://qilingtools.com/en/tags/math), [Algorithms](https://qilingtools.com/en/tags/algorithm)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

Linear programming finds the largest or smallest value of a linear objective subject to linear constraints. Type the model the way it’s written in a textbook: max z = 3x + 2y (or min …) on the first line, then one constraint per line such as x + y <= 4, 2x − y >= 1 or x + 3y = 6, and finally x, y >= 0. Coefficients can be fractions or decimals, and variables may appear on both sides. All arithmetic uses exact fractions, so there is no 0.3333 rounding in the tableaux. The solver first converts the model to standard form with slack, surplus and artificial variables, then shows every simplex tableau for the two-phase or Big M method, highlighting the entering column, the leaving row and the pivot, and explaining the reduced cost and minimum ratio behind each choice. It recognises a unique optimum, multiple optima (and shows a second optimal vertex), unbounded and infeasible problems, and degeneracy, switching to Bland’s rule to avoid cycling. With two variables it also draws the constraint lines, the feasible region and the objective line through the optimum, with a table of all vertices — the graphical method. Tick “Integer solution” for branch and bound with the full tree, and read shadow prices, slack and allowable right-hand-side ranges in the sensitivity table.

## How to use

1. Type the objective (max or min) on the first line and one constraint per line below it, or pick an example
2. Choose the two-phase or Big M method, and tick “Integer solution” if the variables must be whole numbers
3. Read the optimum, the graph and vertex table, the sensitivity analysis and every simplex tableau

## Features

- Natural input: max z = 3x + 2y, x + y <= 4, x, y >= 0, with fractions and chained inequalities
- Exact fractions, so the tableaux have no rounding errors
- Two-phase and Big M methods, with M kept symbolic (e.g. −7M + 4)
- Entering column, leaving row and pivot highlighted, with reduced costs and ratios explained
- Detects unique and multiple optima, unbounded and infeasible problems, and degeneracy (Bland’s rule)
- Graphical method for two variables: feasible region, constraint lines, objective line and vertex table
- Branch and bound for integer programs, with the whole tree
- Shadow prices, slack and allowable right-hand-side ranges

## FAQ

### What’s the difference between the two-phase and Big M methods?

Both deal with the artificial variables needed for ≥ and = constraints. Big M puts them in the objective with a huge penalty −M and solves once; the two-phase method first minimises the sum of the artificial variables to find a feasible point (phase 1), then switches back to the real objective (phase 2). They reach the same answer; two-phase is numerically safer and Big M gives more compact tables. You can switch between them to compare.

### How do I spot multiple optima, unboundedness and infeasibility in a tableau?

If a non-basic variable has a reduced cost of 0 in the optimal tableau, bringing it into the basis gives another optimal vertex, so there are infinitely many optimal solutions. If a reduced cost is negative but its column has no positive entry, no ratio test is possible and the objective grows without limit: the problem is unbounded. If an artificial variable is still positive at the optimum (phase 1 ends with w < 0), the problem is infeasible. The solver states the reason next to the relevant tableau.

### What does a shadow price mean?

A shadow price is how much the optimal objective changes when the right-hand side of a constraint increases by one unit — the optimal value of the corresponding dual variable. A shadow price of 1.5 on a resource constraint means one more unit of that resource adds 1.5 to the maximum profit. It holds only within the allowable right-hand-side range, and constraints with spare slack have a shadow price of 0.

### Why not just round the LP solution to get an integer answer?

A rounded point may break a constraint, and even when it is feasible it may not be the best integer point. Branch and bound solves the LP relaxation, and when a variable is fractional, say x = 2.25, it splits the problem into x ≤ 2 and x ≥ 3, solving each and pruning branches that can’t beat the best integer solution found so far. The tool lists every node with its added constraint, relaxation value and outcome.

## Related tools

- [Graphing Calculator](https://qilingtools.com/en/math/graph): Free online function graphing calculator: type sin(x), x^2 or 1/x and see the curve at once, with several functions, parametric and polar curves, PNG export.
- [Scientific Calculator](https://qilingtools.com/en/math/calculator): Free online scientific calculator: type 2*(3+4)^2, sin(pi/6) or log(8,2) and see the answer as you type, with degrees or radians and a history list.
- [Equation Solver](https://qilingtools.com/en/math/equation): Free online equation solver: enter coefficients for linear, quadratic (with discriminant, vertex and complex roots) and cubic equations, plus 2×2 systems.
- [Fraction Calculator](https://qilingtools.com/en/math/fraction): Free online fraction calculator: add, subtract, multiply and divide fractions with automatic reduction, plus fraction ↔ decimal with repeating digits.
- [Percentage Calculator](https://qilingtools.com/en/math/percentage): Free online percentage calculator: X% of Y, X as a percent of Y, increase and decrease, a value after a percentage change and the original behind it.
- [Prime Factorization](https://qilingtools.com/en/math/prime): Free online prime factorization: factor an integer with exponents, list every divisor and their sum, test primality with neighbouring primes, or list a range.
- [GCD and LCM](https://qilingtools.com/en/math/gcd-lcm): Free online GCD and LCM calculator: works with two or more integers, says whether they are coprime, shows each prime factorization and every Euclidean step.
- [Statistics Calculator](https://qilingtools.com/en/math/statistics): Free online statistics calculator: paste a data set for the mean, median, mode, range, quartiles, variance, standard deviation, standard error and outliers.
