Enter the coefficients of a 2 × 2 or 3 × 3 linear system and get x, y (and z) as exact fractions. Every determinant is worked out with your numbers: D, then Dx, Dy and Dz with the replaced column highlighted, then the divisions and a substitution check.
Last updated:
Examples:
Type integers, decimals or fractions such as -3, 2.5 or 1/3. An empty box counts as 0. Press Enter to solve.
Step 1 · Coefficient determinant D
Step 2 · Replace each column with the constants
Step 3 · Divide
Check by substitution
Advertisement
Advertisement
How to use the Cramer's Rule Calculator
Pick the system size: 2 × 2 for two equations in x and y, or 3 × 3 for x, y and z.
Type the coefficients of each equation in the boxes, and the constant after the equals sign. Leave a box empty (or 0) for a missing variable.
Press Solve with Cramer's rule (or Enter). The solution appears at the top as exact fractions.
Follow the steps: the coefficient determinant D, each column-replaced determinant, and the division x = Dx / D.
Copy the solution, tick Show decimals for approximations, or try the examples to see special cases.
Cramer's rule formulas
For a square system written in matrix form A·x = b with det(A) = D ≠ 0, every unknown is a ratio of two determinants. The top determinant is D with one column swapped for the constants.
System
Coefficient determinant
Solution
a₁x + b₁y = c₁ a₂x + b₂y = c₂
D = a₁b₂ − b₁a₂
x = (c₁b₂ − b₁c₂) / D y = (a₁c₂ − c₁a₂) / D
3 equations in x, y, z
D = a(ei − fh) − b(di − fg) + c(dh − eg)
x = Dx / D, y = Dy / D, z = Dz / D
Worked example (2 × 2)
Solve 2x + 3y = 8 and 5x − y = 3.
D = (2)(−1) − (3)(5) = −2 − 15 = −17.
Dx replaces the x column with the constants 8 and 3: (8)(−1) − (3)(3) = −8 − 9 = −17.
Dy replaces the y column: (2)(3) − (8)(5) = 6 − 40 = −34.
Divide: x = −17 / −17 = 1 and y = −34 / −17 = 2. Check: 2·1 + 3·2 = 8 ✓ and 5·1 − 2 = 3 ✓.
Tips and common mistakes
Line the variables up in the same order in every equation, and use 0 for a variable that is missing (x + z = 4 has y-coefficient 0).
Replace the whole column with the constants, not a row. Dy keeps the x and z columns exactly as they are.
Watch the middle sign in a 3 × 3 expansion: the second term is subtracted (+ − + pattern).
Move every constant to the right-hand side first: 3x + 2y − 4 = 0 becomes 3x + 2y = 4.
If D = 0, stop: the system has no unique solution. Check whether the equations are multiples of each other (infinitely many) or contradict each other (none).
Frequently asked questions
What is Cramer's rule?
Cramer's rule solves a square system of linear equations Ax = b with determinants. Each unknown equals a ratio: x = Dx / D, y = Dy / D and z = Dz / D, where D = det(A) and Dx is the determinant of A with its x column replaced by the constants b. It works whenever D is not zero.
How do you use Cramer's rule for a 3x3 system?
Compute the 3 × 3 determinant D of the coefficient matrix. Then build three new matrices, replacing the first, second and third column with the constants, and compute their determinants Dx, Dy and Dz. Finally divide: x = Dx/D, y = Dy/D, z = Dz/D. The calculator shows each of these with your numbers.
How is a 3x3 determinant calculated?
Expand along the first row: det = a(ei − fh) − b(di − fg) + c(dh − eg) for the matrix with rows (a, b, c), (d, e, f), (g, h, i). Each bracket is a 2 × 2 determinant (a minor), and the signs alternate + − +.
What does it mean if D = 0?
If the coefficient determinant is zero, Cramer's rule cannot be used because it would divide by zero. The system then has either no solution (inconsistent equations, such as parallel lines) or infinitely many solutions (dependent equations). The calculator uses a rank test to tell you which.
If D = 0 and Dx = Dy = 0, are there infinitely many solutions?
For a 2 × 2 system with at least one non-zero coefficient, yes. For 3 × 3 systems, all determinants being zero is necessary but not sufficient: the equations can still be inconsistent. That is why this tool compares the rank of the coefficient matrix with the rank of the augmented matrix.
Can I enter fractions and decimals?
Yes. Type values like 1/3, −5/2, 0.75 or 4. All arithmetic is done with exact fractions, so answers such as 14/13 are not rounded; tick Show decimals to also see approximations.
When is Cramer's rule a good method?
It is handy for 2 × 2 and 3 × 3 systems, for finding a single unknown without solving for the others, and for systems with symbolic coefficients. For larger systems Gaussian elimination is far faster, because the number of determinant terms grows very quickly.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.