Skip to content
Simplex Method Calculator Simplex Method Calculator

Simplex Method Tableau Calculator

Simplex tableau calculator: builds the initial simplex table, computes Zj and Cj − Zj, pivots and prints the final optimal tableau with shadow prices.

Simplex Calculator

How Simplex Method Calculator Works

1

Enter the LP Problem

Type the objective function coefficients and every constraint row with its right-hand-side value.

2

Choose Maximize or Minimize

Pick your optimization goal. The tool builds the initial tableau with slack variables automatically.

3

Run the Pivot Iterations

The calculator identifies pivot column by Cj-Zj, computes ratios, performs elementary row operations until optimal.

4

Read the Optimal Solution

Final tableau displays optimal variable values, Zj row, and the maximum/minimum objective value.

Sample Simplex Tableau Output

Example tableau iteration for a 2-variable maximization problem

Basis x1 x2 s1 s2 RHS Cj-Zj
x1 14 0 0 1 14 0
x2 7 1 0 0 7 5
Zj 35 5 0 0 35

Building the Simplex Tableau

A simplex tableau (simplex table) lists the basic variables with their costs (CB column), the coefficient of every variable in each constraint, the right-hand side (RHS), the Zj row and the Cj − Zj row. This calculator builds that table from your objective and constraints, updates it after each pivot and shows the initial, intermediate and final tableau.

Initial Tableau Example

Maximize Z = 6x1 + 5x2 subject to x1 + x2 ≤ 5 and 3x1 + 2x2 ≤ 12. The initial tableau has rows s1: [1, 1, 1, 0 | 5] and s2: [3, 2, 0, 1 | 12]. Both CB values are 0, so every Zj is 0 and Cj − Zj is [6, 5, 0, 0]. x1 enters, and the ratio test (5/1 = 5, 12/3 = 4) makes s2 leave with pivot element 3.

Second and Final Tableau

After the first pivot the rows are s1: [0, 1/3, 1, −1/3 | 1] and x1: [1, 2/3, 0, 1/3 | 4] with Z = 24, and Cj − Zj for x2 is 5 − 6 × 2/3 = 1. x2 enters and s1 leaves. The final tableau is x2: [0, 1, 3, −1 | 3] and x1: [1, 0, −2, 1 | 2], giving Z = 27 at x1 = 2, x2 = 3. Its Cj − Zj row is [0, 0, −3, −1], so no value is positive and the table is optimal.

What the Final Tableau Tells You

The negatives of the Cj − Zj values under the slack columns are the shadow prices: here 3 for the first constraint and 1 for the second. One more unit of the first resource would raise Z by 3. You can check them: 3 × 5 + 1 × 12 = 27, the same as the optimal Z. A zero Cj − Zj under a non-basic variable would mean alternative optimal solutions.

How Zj and Cj − Zj Are Calculated

Zj for a column is the sum of each CB value multiplied by that column's entry. Cj − Zj is the net change in Z if that variable enters. For maximization the tableau is optimal when every Cj − Zj is zero or negative; for minimization, when every value is zero or positive.

Related calculators

Frequently Asked Questions

How do you calculate Zj in the simplex method?

Zj = Σ CBi × aij: multiply each basic variable's objective coefficient by the entry in column j of its row, and add them up.

What is a simplex tableau?

It is a table that holds the whole LP during the simplex method: basic variables, CB values, constraint coefficients, RHS, and the Zj and Cj − Zj rows.

How do you know the final simplex tableau is optimal?

For maximization, when every Cj − Zj is zero or negative; for minimization, when every Cj − Zj is zero or positive.

How do you read shadow prices from the final tableau?

Take the negatives of the Cj − Zj values under the slack columns. In this page's example they are 3 and 1, meaning one extra unit of each resource adds 3 and 1 to Z.

What is the final tableau answer for the example?

Maximize 6x1 + 5x2 with x1 + x2 ≤ 5 and 3x1 + 2x2 ≤ 12 ends with x1 = 2, x2 = 3 and Z = 27.