Intermediate

Cramer's Rule Calculator

Solve a 2- or 3-variable linear system with Cramer’s rule by entering the augmented coefficient matrix.
One equation per line. Use 2 or 3 rows; each row has n coefficients and 1 constant.
Solution for x
2

Computed via Cramer’s rule (Dx / D)

x
2
y
1
Main determinant D
-7
Dx
-14
Dy
-7
Coefficient matrix — det D shows area-scaling (D ≠ 0 means unique solution)
Step by step
  1. 1

    Main determinant D

    2 × -3 − 1 × 1 = -7
  2. 2

    Numerator determinant Dx

    5 × -3 − 1 × -1 = -14
    Column 1 of the coefficient matrix is replaced with the constants.
  3. 3

    Solution x = Dx ÷ D

    -14 ÷ -7 = 2
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Cramer’s rule solves a 2×2 or 3×3 linear system using determinants. Enter each equation as its coefficients plus the constant. The tool finds the main determinant D and each Dᵢ (column i swapped with the constants), then returns xᵢ = Dᵢ / D. If D = 0, no unique solution exists.

Formula
xᵢ = det(Aᵢ) / det(A), where Aᵢ replaces column i of A with the constants b
How this is calculated

Enter one equation per line in the augmented matrix box. Each line holds the coefficients of the variables followed by the constant on the right-hand side. Two lines define a 2×2 system (x, y); three lines define a 3×3 system (x, y, z). Values may be separated by spaces or commas.

The calculator splits the input into the square coefficient matrix A and the constant vector b. It computes the main determinant D = det(A). For each variable i it builds matrix Aᵢ by replacing column i of A with b, computes Dᵢ = det(Aᵢ), and then xᵢ = Dᵢ / D. The 2×2 determinant uses ad − bc; the 3×3 uses cofactor expansion along the first row.

Cramer’s rule only gives a unique solution when D ≠ 0. If D = 0 the system is either inconsistent (no solution) or dependent (infinitely many solutions), so the tool reports that no unique solution exists. Inputs must form a square system: each of the n rows needs exactly n + 1 numbers.

Frequently asked questions

If D = 0, Cramer’s rule cannot be applied because dividing by zero is undefined. The system has either no solution or infinitely many, and you should use Gaussian elimination to investigate further.

Write one equation per line as its coefficients followed by the constant. For 2x + y = 5 and x − 3y = −1, enter "2 1 5" and "1 -3 -1".

This calculator handles 2×2 and 3×3 systems. Cramer’s rule generalizes to larger ones, but it becomes computationally expensive, so elimination or matrix methods are preferred for big systems.

Also known as

cramers rule
cramer rule solver
determinant system
solve linear system
2x2 3x3 system
cramers rule solver
cramer method

APA

TG we-Calculate Editorial Team. (2026). Cramer's Rule Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/cramers-rule-calculator

Chicago

TG we-Calculate Editorial Team. "Cramer's Rule Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/cramers-rule-calculator.

IEEE

TG we-Calculate Editorial Team, "Cramer's Rule Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/cramers-rule-calculator

BibTeX

@misc{wecalculate_cramers_rule_calculator, title = {Cramer's Rule Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/cramers-rule-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?