Skip to content
Simplex Method Calculator Simplex Method Calculator
← Back to blog
Two Phase Simplex Method: Steps and Solved Example (Phase 1 and Phase 2)

Two Phase Simplex Method: Steps and Solved Example (Phase 1 and Phase 2)

Published on October 16, 2026 · by Simplex Method Calculator Editorial Team

The two phase method is the standard way to start the simplex method when a linear program has ≥ or = constraints. Like the Big M method, it uses artificial variables to create a starting basis. Unlike Big M, it never mixes a huge penalty number into the real objective. Instead it splits the work into two clean stages:

  • Phase 1 finds a feasible starting solution by removing every artificial variable.
  • Phase 2 starts from that solution and optimizes the original objective.

This guide gives the steps and solves a complete example. We use the same problem as our Big M method guide, so you can compare the two approaches table by table.

Two Phase Method Steps

Phase 1

  1. Convert every constraint to an equation: add slack variables to ≤ constraints, subtract a surplus and add an artificial variable for ≥ constraints, and add an artificial variable for = constraints.
  2. Replace the original objective with a new one: minimize W = the sum of all artificial variables. (Equivalently, maximize −W.)
  3. Solve this Phase 1 problem with the ordinary simplex method.
  4. Check the result:
    • If the minimum W is greater than 0, the original problem has no feasible solution. Stop.
    • If W = 0, every artificial variable is zero and you have a feasible basis. Go to Phase 2.

Phase 2

  1. Delete the artificial columns from the final Phase 1 tableau.
  2. Put the original objective coefficients back in the Cj row and recompute Zj and Cj − Zj.
  3. Continue with the ordinary simplex method until the tableau is optimal.

Solved Example

Minimize Z = 4x1 + x2

Subject to

  • 3x1 + x2 = 3
  • 4x1 + 3x2 ≥ 6
  • x1 + 2x2 ≤ 4
  • x1, x2 ≥ 0

After adding helper variables:

  • 3x1 + x2 + a1 = 3
  • 4x1 + 3x2 − s2 + a2 = 6
  • x1 + 2x2 + s3 = 4

Phase 1

Objective: minimize W = a1 + a2, which we solve as maximize −W = −a1 − a2. The Cj row is 0 for x1, x2, s2 and s3, and −1 for a1 and a2.

Phase 1, Tableau 1

Basisx1x2a1s2a2s3RHS
a13110003
a2430−1106
s31200014
Cj − Zj740−100−W = −9

The starting W is 9, the sum of the two artificial variables (3 + 6). x1 enters (7 is the largest Cj − Zj). Ratios: 3/3 = 1, 6/4 = 1.5, 4/1 = 4. a1 leaves.

Phase 1, Tableau 2

Basisx1x2a1s2a2s3RHS
x111/31/30001
a205/3−4/3−1102
s305/3−1/30013
Cj − Zj05/3−7/3−100−W = −2

W has dropped to 2. x2 enters. Ratios: 1 / (1/3) = 3, 2 / (5/3) = 6/5, 3 / (5/3) = 9/5. a2 leaves.

Phase 1, Tableau 3

Basisx1x2a1s2a2s3RHS
x1103/51/5−1/503/5
x201−4/5−3/53/506/5
s30011−111
Cj − Zj00−10−10−W = 0

All Cj − Zj ≤ 0 and W = 0. Both artificial variables have left the basis, so the problem is feasible. Phase 1 is complete with the basic feasible solution x1 = 3/5, x2 = 6/5, s3 = 1.

Phase 2

Delete the a1 and a2 columns. Restore the real objective, maximize −Z = −4x1 − x2, so the Cj row is −4 for x1, −1 for x2 and 0 for s2 and s3. Recompute Zj and Cj − Zj with Cb = −4 for x1, −1 for x2 and 0 for s3.

Phase 2, Tableau 1

BasisCbx1x2s2s3RHS
x1−4101/503/5
x2−101−3/506/5
s3000111
Cj − Zj001/50−Z = −18/5

How the s2 entry is found: Zj = (−4)(1/5) + (−1)(−3/5) + 0(1) = −1/5, so Cj − Zj = 0 − (−1/5) = 1/5. It is positive, so the solution Z = 18/5 can still be improved. s2 enters. Ratios: (3/5) / (1/5) = 3 and 1 / 1 = 1. s3 leaves.

Phase 2, Tableau 2 (Optimal)

BasisCbx1x2s2s3RHS
x1−4100−1/52/5
x2−10103/59/5
s2000111
Cj − Zj000−1/5−Z = −17/5

All Cj − Zj ≤ 0, so the tableau is optimal.

Answer

  • x1 = 2/5 = 0.4, x2 = 9/5 = 1.8
  • Minimum Z = 17/5 = 3.4

This matches the Big M solution exactly. The pivots in Phase 1 are even the same as the first two Big M pivots; the difference is that the two-phase method never has to carry M through the arithmetic.

What If Phase 1 Ends with W Greater Than 0?

Then no combination of x1 and x2 satisfies every constraint, and the problem is infeasible. For example, the constraints 2x1 + x2 ≤ 2 and 3x1 + 4x2 ≥ 12 cannot both hold for non-negative x1 and x2, and Phase 1 for that problem cannot reduce W to zero. This and the other unusual outcomes are covered in special cases in the simplex method.

Artificial Variable Still in the Basis at Zero

Occasionally Phase 1 ends with W = 0 but an artificial variable still in the basis with value 0 (a degenerate case). The usual fix is to pivot it out on any non-zero entry in its row in a non-artificial column. If its row has no such entry, the constraint was redundant and the row can be deleted.

Two Phase Method vs Big M

Two phase methodBig M method
Number of stagesTwoOne
Uses a large number MNoYes
Hand arithmeticSimpler numbersEvery Cj − Zj has an M term
Detects infeasibilityW greater than 0 after Phase 1Artificial variable positive at the end
Preferred by softwareYesRarely

A longer discussion is in Big M method vs two phase method.

Check Your Answer

The 2-phase simplex method calculator solves problems with artificial variables using the Big M technique, so its intermediate tableaus look like the Big M version rather than the Phase 1 and Phase 2 tables above. It reaches the same optimal solution, x1 = 0.4, x2 = 1.8 and Z = 3.4, which makes it a quick way to confirm your final answer.