Simplify Your Workflow: Search MiniWebtool.
Add Extension
Home Page > Math > Advanced Math Operations > Linear Programming Solver

Linear Programming Solver

Solve linear programming problems online using the simplex method. Supports maximize or minimize objectives, mixed ≤/≥/= constraints, up to 8 decision variables, and for 2-variable LPs shows an interactive feasible-region plot with every vertex and the optimum highlighted.

Linear Programming Solver
First line is the objective (Maximize or Minimize …). Each subsequent line is a linear constraint. Use <=, >=, or =. Shortcut: x, y >= 0 declares non-negativity for several variables. Up to 8 variables and 20 constraints.

Embed Linear Programming Solver Widget

About Linear Programming Solver

The Linear Programming Solver is an online calculator that finds the maximum or minimum of a linear objective function subject to a system of linear inequalities or equalities. It uses the simplex method (Big-M variant) so that <=, >=, and = constraints can be mixed freely, and for 2-variable problems it draws an interactive feasible-region plot with every vertex and the optimum highlighted.

What Is Linear Programming?

A linear programming (LP) problem asks:

Maximize (or minimize): Z = c1 x1 + c2 x2 + … + cn xn subject to: a11 x1 + … + a1n xn (≤, ≥, or =) b1 a21 x1 + … + a2n xn (≤, ≥, or =) b2 … am1 x1 + … + amn xn (≤, ≥, or =) bm x1, x2, …, xn ≥ 0

The set of points satisfying every constraint is called the feasible region, a convex polyhedron. The Fundamental Theorem of Linear Programming states that if the LP has a finite optimum, it is attained at a vertex (extreme point) of this polyhedron. This is why the simplex method — which walks from vertex to vertex — is so effective.

How the Simplex Method Works

Starting from a feasible vertex, the simplex method repeatedly improves the objective by pivoting to a neighboring vertex with a better value. The mechanics:

  1. Standard form: convert the LP to max cTx subject to Ax = b, x ≥ 0. For <= constraints, add slack variables; for >=, subtract a surplus and add an artificial with a large penalty −M; for equalities, add an artificial.
  2. Initial tableau: the basis consists of slacks and artificials, which gives an obvious starting vertex.
  3. Entering variable: pick the non-basic variable with the largest positive reduced cost \( c_j - z_j \). If no such variable exists, the current solution is optimal.
  4. Leaving variable: from the entering column, do the min-ratio test — divide each row's RHS by its positive entry in the entering column, and pick the row with the smallest ratio. If no positive entry exists, the LP is unbounded.
  5. Pivot: use Gaussian elimination to make the entering column a unit vector, with 1 in the leaving row.
  6. Repeat until the stopping criterion is met.

If any artificial variable remains in the basis with a positive value at termination, the original LP is infeasible.

Graphical Method (for 2 Variables)

For two-variable problems the feasible region is a 2-D convex polygon. Since the optimum is always at a vertex, enumerating every vertex and evaluating the objective there is enough to solve the problem. This calculator performs that enumeration by intersecting every pair of constraint boundaries, keeping only intersections that satisfy all other constraints, and sorting them counterclockwise for the visualization.

Input Syntax

Write the objective on the first line, then one constraint per line. Variable names can be any identifier (x, y, x1, profit…). Operators are <=, >=, and =. Non-negativity can be written as x, y >= 0 as a shortcut.

Maximize 3x + 5y x + y <= 10 2x + y <= 16 x + 3y <= 18 x, y >= 0

Blank lines and comments beginning with # are ignored. The solver accepts up to 8 decision variables and 20 constraints.

Worked Example

Consider a furniture workshop that builds tables and chairs. Each table yields \\$3 of profit and requires 1 unit of wood and 2 units of labor. Each chair yields \\$5 of profit and requires 1 unit of wood, 1 unit of labor, and 3 units of varnish. Available: 10 wood, 16 labor, 18 varnish. With x = tables and y = chairs, the LP is:

Maximize Z = 3x + 5y x + y <= 10 (wood) 2x + y <= 16 (labor) x + 3y <= 18 (varnish) x, y >= 0

The feasible region is a pentagon. Evaluating Z at each vertex:

Vertex (x, y)Z = 3x + 5yFeasible?
(0, 0)0Yes
(8, 0)24Yes
(6, 4)38 ← optimumYes
(0, 6)30Yes

So the workshop should build 6 tables and 4 chairs for a maximum profit of \\$38. The wood and labor constraints are binding (they equal their RHS at the optimum); varnish has a slack of 0 (also binding in this case), meaning all three resources are exhausted.

Common Pitfalls & What the Solver Detects

SituationSymptomHow to fix
Unbounded LP Solver reports "Unbounded" Add a missing upper bound. Objective can grow without limit because the feasible region extends infinitely in the improving direction.
Infeasible LP Solver reports "Infeasible" Constraints contradict one another (e.g. x >= 10 with x <= 5). Review every pair of bounds.
Alternate optima Warning badge; optimal vertex unique but Z is achieved along an edge Happens when the objective vector is parallel to a binding edge. Any convex combination of the two vertices on that edge is also optimal.
Degeneracy / cycling Simplex iterates without improving Z Rare in textbook problems; can be resolved with Bland's rule or perturbation. This solver caps iterations to avoid infinite loops.

Applications

How to Use This Calculator

  1. Type your LP in the text box. The first line must begin with Maximize or Minimize. Each following line is one constraint, one per line.
  2. Use the shortcut x, y >= 0 to declare non-negativity for all listed variables at once.
  3. Click Solve LP Problem. The solver reports the optimal value Z, the optimal values of every decision variable, a list of binding constraints, and for 2-variable LPs an interactive feasible-region plot.
  4. Hover a vertex in the plot to see its coordinates and Z value. The optimum is highlighted with a star.
  5. Review the simplex tableaux to see every pivot and trace how the method improves Z. The entering column is highlighted in amber; the leaving row in red.

Frequently Asked Questions

What is a linear programming problem?

A linear programming (LP) problem asks for the maximum or minimum of a linear objective function over a set of decision variables that satisfy a system of linear inequalities or equalities. The feasible set is a convex polyhedron, and the optimum is always attained at one of its vertices — the key fact the simplex method exploits.

How does the simplex method work?

The simplex method walks along vertices of the feasible polyhedron. Each step (a "pivot") exchanges one variable in the basis for another, moving to a neighboring vertex with a strictly better objective. The algorithm stops when no pivot can improve Z — the current vertex is then optimal. This tool uses the Big-M variant so that <=, >=, and = constraints can be mixed.

What is the feasible region?

The feasible region is the set of all variable values satisfying every constraint simultaneously. For 2 variables it is a 2-D convex polygon; for n variables it is an n-dimensional polyhedron. An empty polyhedron means the LP is infeasible; a polyhedron that extends infinitely in the improving direction means the LP is unbounded.

What does "unbounded" mean in linear programming?

An LP is unbounded when the feasible region stretches to infinity in a direction where the objective keeps improving. For example, Maximize x subject only to x ≥ 0 has no finite maximum. Real-world LPs that return unbounded usually reveal a missing constraint — often an upper bound on a resource or variable.

What does "alternate optima" mean?

Alternate optima occur when more than one point attains the same best objective value. Geometrically, the objective is parallel to a binding edge of the polygon, so every point along that edge — and every convex combination of its endpoints — is optimal. The solver flags this when any non-basic decision variable has a reduced cost of zero at termination.

How many variables and constraints does the solver accept?

Up to 8 decision variables and 20 constraints. The interactive feasible-region plot is drawn only for 2-variable problems; with 3 or more variables you still get the full numerical simplex solution, step-by-step tableaux, and binding-constraint report.

Further Reading

Reference this content, page, or tool as:

"Linear Programming Solver" at https://MiniWebtool.com/linear-programming-solver/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: Apr 21, 2026

You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.

Related MiniWebtools:

Advanced Math Operations:

Top & Updated:

Random Name PickerRandom PickerInstagram User ID LookupFPS ConverterLine CounterSort NumbersRelative Standard Deviation CalculatorImage ResizerMAC Address GeneratorBatting Average CalculatorRemove SpacesFacebook User ID LookupRandom Truth or Dare GeneratorERA CalculatorFeet and Inches to Cm ConverterWord to Phone Number ConverterMAC Address LookupSun, Moon & Rising Sign Calculator 🌞🌙✨Slope and Grade CalculatorPercent Off CalculatorMP3 LooperSum Calculator📷 OCR / Image to TextBitwise CalculatorRandom IMEI GeneratorAudio SplitterInvisible Text GeneratorRoman Numerals ConverterRandom Superpower GeneratorAI Text HumanizerWord Ladder GeneratorRandom Credit Card GeneratorVertical Jump CalculatorSHA256 Hash GeneratorNumber of Digits CalculatorRandom Quote GeneratorHalfway Date CalculatorLog Base 10 CalculatorMerge VideosWAR CalculatorRandom Birthday Generator⬛ Aspect Ratio CalculatorSalary Conversion CalculatorCm to Feet and Inches ConverterMaster Number CalculatorRandom Fake Address GeneratorSaturn Return CalculatorPhone Number ExtractorRandom Activity GeneratorRandom Meal GeneratorOPS CalculatorFile Size ConverterOn Base Percentage CalculatorNumber to Word ConverterIP Subnet CalculatorRandom Writing Prompt GeneratorText FormatterSquare Root (√) CalculatorRandom Poker Hand GeneratorCompound Growth CalculatorSlugging Percentage CalculatorYouTube Channel StatisticsCaffeine Overdose CalculatorBinary to Gray Code ConverterLove Compatibility CalculatorDecimal to BCD ConverterRandom Loadout GeneratorRandom Movie PickerVideo to Image ExtractorBCD to Decimal ConverterOctal CalculatorBattery Life CalculatorMercury Retrograde CalendarLeap Years List🖱️ Click CounterCompare Two StringsStair Calculator📅 Date CalculatorFirst n Digits of PiConnect the Dots GeneratorCM to Inches ConverterRemove Accent🎰 Gacha Pity CalculatorSHA512 Hash GeneratorAdd Text to ImagePercent Growth Rate CalculatorWeight Loss CalculatorPER CalculatorGray Code to Binary ConverterRandom Object GeneratorLottery Number GeneratorBingo Card GeneratorAdd Prefix and Suffix to TextImage CompressorImage SplitterOutlier CalculatorCoin FlipperAstrological Element Balance CalculatorSmall Text Generator ⁽ᶜᵒᵖʸ ⁿ ᵖᵃˢᵗᵉ⁾Arc Length CalculatorVideo CompressorNumber ExtractorTime Duration CalculatorDay of the Year Calculator - What Day of the Year Is It Today?Quotient and Remainder CalculatorWhat is my Lucky Number?Diff CheckerMultiple Fraction CalculatorFlip VideoList of Prime NumbersProportion CalculatorRandom Emoji GeneratorWhat is my Zodiac Sign?Acreage CalculatorWord Scramble GeneratorIP Address to Hex ConverterBcrypt Hash Generator / CheckerMandelbrot Set ExplorerAngel Number CalculatorBreak Line by CharactersLongest Day of the YearURL ExtractorRandom Line PickerRandom Time GeneratorCone Flat Pattern (Template) GeneratorModulo CalculatorTessellation GeneratorName Number CalculatorBinary to BCD ConverterDay of Year CalendarAI Language DetectorEmail ExtractorDNS LookupRandom Chess Opening Generator🔍 Plagiarism CheckerVideo SplitterMiter Angle CalculatorWHIP CalculatorAntilog CalculatorMD5 Hash GeneratorLunar Calendar ConverterYouTube Tag ExtractorCrossword Puzzle MakerRandomize NumbersRemove Leading Trailing SpacesMartingale Strategy CalculatorRandom Chord GeneratorDMS to Decimal Degrees ConverterIs it a Prime Number?Steel Weight CalculatorAdjust Video SpeedAI Punctuation AdderLong Division CalculatorRandom Number PickerMolarity CalculatorFirst n Digits of eCollage MakerPercentile CalculatorShort Selling Profit CalculatorArctan2 CalculatorJulia Set GeneratorRandom User-Agent GeneratorHeight Percentile CalculatorBolt Torque CalculatorHypotenuse CalculatorMorse Code GeneratorBroken Link CheckerRandom Tournament Bracket GeneratorColor InverterRandom Group GeneratorBonus CalculatorFraction CalculatorHTML CompressorMultiplication CalculatorRounding CalculatorAI ParaphraserPregnancy CalendarYouTube Earnings EstimatorName RandomizerRandom Name GeneratorRatio to Percentage CalculatorBirth Day of the Week CalculatorBoiling Point CalculatorMAC Address AnalyzerPizza Value CalculatorDestiny Number CalculatorSocial Media Username CheckerPVIF CalculatorPVIFA CalculatorGrade CalculatorField Goal Percentage CalculatorSquare Numbers ListHebrew Calendar ConverterLife Path Number CalculatorDue Date CalculatorBoxing Punch Power CalculatorTaco Bar Calculator🎲 Loot Drop Probability CalculatorSort Lines AlphabeticallyHex to BCD ConverterBCD to Binary ConverterBCD to Hex ConverterMedian CalculatorStandard Error CalculatorList RandomizerAverage CalculatorReverse VideoRemove Audio from VideoActual Cash Value CalculatorScientific Notation to Decimal ConverterLog Base 2 CalculatorRoot Mean Square CalculatorSum of Positive Integers CalculatorSHA3-256 Hash GeneratorAI Sentence ExpanderLbs to Kg ConverterHex to Decimal ConverterConvolution CalculatorRandom String GeneratorAmortization CalculatorMarkup CalculatorDecimal to Hex ConverterInstagram Font GeneratorSocial Media Image Size GuideTikTok Money CalculatorTwitter/X Character CounterTwitter/X Timestamp ConverterYouTube Watch Time CalculatorTwitch Earnings CalculatorYouTube Shorts Monetization CalculatorFacebook Ad Cost CalculatorSocial Media ROI CalculatorSocial Media Post Time OptimizerCTR CalculatorROAS CalculatorInfluencer ROI CalculatorForce CalculatorAcceleration CalculatorVelocity CalculatorMomentum CalculatorProjectile Motion CalculatorKinetic Energy CalculatorPotential Energy CalculatorWork and Power CalculatorDensity CalculatorPressure CalculatorIdeal Gas Law CalculatorFree Fall CalculatorTorque CalculatorHorsepower CalculatorDilution CalculatorChemical Equation BalancerStoichiometry CalculatorPercent Yield CalculatorEmpirical Formula CalculatorTitration CalculatorMole/Gram/Particle ConverterIrregular Polygon Area CalculatorFrustum CalculatorTorus Calculator3D Distance CalculatorGreat Circle Distance CalculatorCircumscribed Circle (Circumcircle) CalculatorInscribed Circle (Incircle) CalculatorAngle Bisector CalculatorTangent Line to Circle CalculatorHeron's Formula CalculatorCoordinate Geometry Distance CalculatorVolume of Revolution CalculatorSurface of Revolution CalculatorParametric Curve GrapherRiemann Sum CalculatorTrapezoidal Rule CalculatorSimpson's Rule CalculatorImproper Integral CalculatorL'Hôpital's Rule CalculatorMaclaurin Series CalculatorPower Series CalculatorSeries Convergence Test CalculatorInfinite Series Sum CalculatorAverage Rate of Change CalculatorInstantaneous Rate of Change CalculatorRelated Rates SolverOptimization Calculator (Calculus)Gradient Calculator (Multivariable)Divergence CalculatorCurl CalculatorLine Integral CalculatorSurface Integral CalculatorJacobian Matrix CalculatorNewton's Method CalculatorRREF Calculator (Row Echelon Form)Matrix Inverse CalculatorMatrix Multiplication CalculatorDot Product CalculatorCross Product CalculatorVector Magnitude CalculatorUnit Vector CalculatorAngle Between Vectors CalculatorNull Space CalculatorColumn Space CalculatorCramer's Rule CalculatorMatrix Diagonalization CalculatorQR Decomposition CalculatorCholesky Decomposition CalculatorMatrix Power CalculatorCharacteristic Polynomial CalculatorBayes' Theorem CalculatorF-Test / F-Distribution CalculatorHypergeometric Distribution CalculatorNegative Binomial Distribution CalculatorGeometric Distribution CalculatorExponential Distribution CalculatorWeibull Distribution CalculatorBeta Distribution CalculatorSpearman Rank Correlation CalculatorFisher's Exact Test CalculatorContingency Table CalculatorOdds Ratio CalculatorROT13 Encoder/DecoderAtbash Cipher ToolVigenère Cipher ToolPronunciation IPA ConverterHemingway-Style Readability EditorSentence Length Variance AnalyzerWord Frequency AnalyzerBusiness Days CalculatorAdd Business Days to DateDate Pattern GeneratorHow Long Until CalculatorHow Long Ago CalculatorBirthday Across Cultures CalculatorHijri Calendar ConverterInsulin Sensitivity Factor CalculatorCarb-to-Insulin Ratio CalculatorLean Body Mass to Strength CalculatorOne-Mile Walk Test (Rockport) CalculatorCooper 12-Minute Run CalculatorFFMI CalculatorAPGAR Score CalculatorGlasgow Coma Scale CalculatorWells Score Calculator (DVT/PE)Tennis Score TrackerSoccer xG (Expected Goals) CalculatorCricket Run Rate CalculatorRugby Points CalculatorRace Time PredictorSwimming SWOLF CalculatorYoga Pose Hold TimerFishing Knot Strength CalculatorBike Gear Ratio CalculatorClimbing Grade ConverterWine Pairing SuggesterStandard Drink CalculatorCaffeine Half-Life TrackerSpice Substitution FinderDietary Restriction Recipe FilterMarinade Time CalculatorFermentation Time CalculatorSmoking Wood Pairing GuideFreelance Project Pricing CalculatorSaaS Pricing CalculatorSubscription Cost TrackerSide Hustle ROI CalculatorRemote Work Savings CalculatorCoffee Habit Cost CalculatorGym vs Home Workout Cost CalculatorLunch Cost CalculatorWealth Growth Visualizer1031 Exchange CalculatorRental Yield CalculatorCash-on-Cash Return CalculatorBRRRR Method CalculatorSection 8 Rent CalculatorRoommate Rent SplitterAirbnb Pricing OptimizerStatute of Limitations CalculatorSentence Reduction CalculatorSales Tax Nexus CheckerPatent Filing Fee CalculatorTrademark Class FinderWill Asset Distribution CalculatorWorkers' Compensation CalculatorStopping Distance CalculatorTrip Cost SplitterVehicle Weight Distribution CalculatorTrailer Tongue Weight CalculatorTire Tread Wear CalculatorEngine Compression Ratio CalculatorHeadlight Beam Distance CalculatorCat Litter Box CalculatorAquarium Heater Wattage CalculatorBird Cage Size CalculatorReptile Habitat UVB CalculatorPet Travel Crate Size FinderHorse Hay CalculatorCrochet Hook Size ConverterKnitting Needle Size ConverterKnitting Pattern CalculatorCross-Stitch Floss CalculatorQuilt Binding CalculatorOrigami Paper Size CalculatorPottery Clay Shrinkage CalculatorBeading Pattern CalculatorResin Casting Volume CalculatorEmbroidery Thread Length CalculatorHiking Pace Calculator (Naismith's Rule)Backpacking Food Weight CalculatorTent Footprint Size CalculatorSleeping Bag Temperature Rating GuideKnot Tying Reference ToolStar Visibility CalculatorTide Time CalculatorSun Position CalculatorReynolds Number CalculatorBernoulli Equation CalculatorHeat Transfer CalculatorThermal Expansion CalculatorSpecific Heat Capacity CalculatorGear Ratio Calculator (Mechanical)Pulley System CalculatorHydraulic Cylinder Force CalculatorBelt Length CalculatorCloset Capsule CalculatorStorage Unit Size CalculatorMoving Box Quantity CalculatorGift Card Tip CalculatorGas vs Electric Cost ComparisonPrint Cost CalculatorHair Dye Mixing CalculatorLaundry Detergent Dosage CalculatorDishwasher Load OptimizerTile Grout CalculatorPaint Color Mixing CalculatorFlashcard Spaced Repetition SchedulerLearning Curve CalculatorCornell Notes GeneratorVocabulary Quiz GeneratorLanguage Learning Hours to Fluency CalculatorCollege Cost CalculatorScholarship ROI Calculator