Cramer's Rule Calculator

Solve a 2x2 or 3x3 system of linear equations using Cramer's Rule.
Enter coefficients and constants for the solution via determinants, with steps.

Cramer

Cramer’s Rule solves a system of n linear equations in n unknowns using determinants. For a system Ax = b, each unknown is the ratio of two determinants: the denominator is det(A), and the numerator replaces the column of A for that unknown with the constants vector b.

For a 2x2 system: ax + by = e cx + dy = f

D = det(A) = ad - bc Dx = det([[e,b],[f,d]]) = ed - bf Dy = det([[a,e],[c,f]]) = af - ce

x = Dx/D, y = Dy/D

If D = 0, the system either has no solution (inconsistent) or infinitely many (dependent).

For a 3x3 system, the determinant expands along the first row using cofactor expansion: det = a(ei-fh) - b(di-fg) + c(dh-eg) for a 3x3 matrix [[a,b,c],[d,e,f],[g,h,i]].

Cramer’s Rule is elegant and easy to state, but computationally expensive — it requires computing n+1 determinants, each of size n×n. For large systems, Gaussian elimination or LU decomposition is far faster. Cramer’s Rule shines for 2x2 and 3x3 systems where you want clean closed-form expressions, and for theoretical analysis where you need to express a solution explicitly in terms of the system parameters.

It also provides direct sensitivity analysis: you can see immediately how the solution changes when a single coefficient or constant changes, which is valuable in parametric studies and economics modeling.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.