Skip to content

Algebra Calculator

Equation type
Solution —
Kind of solution
—
Discriminant or determinant
—
Check
—

Pick the equation type, type the coefficients, and the solution appears with its working. For x² − 5x + 6 = 0 the discriminant is 1, so there are two real roots, x = 2 and x = 3. Linear equations are rearranged to a single x, and pairs of equations are solved by Cramer's rule.

About this tool

Most homework and spreadsheet checks come down to three equation families: a linear equation with x on both sides, a quadratic, or two linear equations sharing x and y. This calculator handles all three from their coefficients. It reports the solution, says what kind it is (one root, a repeated root, complex roots, no solution, or infinitely many), and lists each step, so you can compare the working with your own line by line. Quadratics also show the vertex of the parabola, and systems show where the two lines cross. It works with numeric coefficients only: it does not parse typed expressions such as 3(x − 2) = x, so expand and collect terms first. Answers are shown to six decimal places, which is enough to spot an irrational root but not an exact surd form.

How to use it

  1. Choose the equation type

    Select linear (x on both sides), quadratic, or a system of two equations in x and y.

  2. Enter the coefficients

    Type a, b, c (and d for the linear form, or the six system coefficients). Negative numbers and decimals are accepted.

  3. Read the solution and steps

    The answer, its type, the discriminant or determinant, and the worked steps update as you type.

Examples

x² − 5x + 6 = 0

Equation type
ax² + bx + c = 0
a
1
b
-5
c
6

Result Solution: x = 2 or x = 3
Kind of solution: Two real roots
Discriminant or determinant: 1
Check: Vertex at (2.5, -0.25)

  1. 1x² + -5x + 6 = 0
  2. Discriminant D = b² − 4ac = -5² − 4 × 1 × 6 = 1
  3. x = (−b ± √D) ÷ 2a
  4. x = (5 ± 1) ÷ 2 → 2, 3

The discriminant is 25 − 24 = 1, a perfect square, so the two roots are whole numbers: 2 and 3.

2x + 3 = 7

Equation type
ax + b = cx + d
a
2
b
3
c
0
d
7

Result Solution: x = 2
Kind of solution: One solution
Discriminant or determinant: —
Check: Left = right = 7

  1. 2x + 3 = 0x + 7
  2. Move x terms left and constants right: (2 − 0)x = 7 − 3
  3. 2x = 4
  4. x = 4 ÷ 2 = 2

Subtracting 3 from both sides leaves 2x = 4, so x = 2.

x + y = 10 and x − y = 2

Equation type
Two equations, x and y
a1 (x in equation 1)
1
b1 (y in equation 1)
1
c1 (right side 1)
10
a2 (x in equation 2)
1
b2 (y in equation 2)
-1
c2 (right side 2)
2

Result Solution: x = 6, y = 4
Kind of solution: One solution
Discriminant or determinant: -2
Check: Lines cross at (6, 4)

  1. 1x + 1y = 10 and 1x + -1y = 2
  2. Determinant = a1·b2 − a2·b1 = 1 × -1 − 1 × 1 = -2
  3. x = (c1·b2 − c2·b1) ÷ det = -12 ÷ -2 = 6
  4. y = (a1·c2 − a2·c1) ÷ det = -8 ÷ -2 = 4

Two numbers that add to 10 and differ by 2 are 6 and 4; Cramer's rule gets there through a determinant of −2.

How it is calculated

Linear: x = (d − b) ÷ (a − c). Quadratic: x = (−b ± √(b² − 4ac)) ÷ 2a. System: x = (c1·b2 − c2·b1) ÷ D, y = (a1·c2 − a2·c1) ÷ D, D = a1·b2 − a2·b1

a, b, c, d
Coefficients of the linear or quadratic equation
b² − 4ac
Discriminant: positive gives two real roots, zero one repeated root, negative a complex pair
D
Determinant of the 2×2 system; zero means parallel or identical lines

The linear form collects x terms on the left and constants on the right, then divides. If a equals c, the equation is either always true or never true. Quadratics use the quadratic formula, with the sign of the discriminant deciding the kind of root; complex roots are written as p ± qi. Systems use Cramer's rule, and a zero determinant is checked further to tell parallel lines from the same line written twice.

When not to use it

  • Equations of degree three or higher, inequalities, and equations with x inside roots, logs or fractions need other methods.
  • Systems with three or more unknowns are outside this calculator's scope.

Common mistakes

  • Forgetting the sign on a coefficient is the usual error: for x² − 5x + 6, b is −5, not 5.
  • A quadratic must be set equal to zero first, so move every term to one side.
  • In the linear form, a term missing from one side has coefficient 0, not 1.

Frequently asked questions

What does the discriminant tell me?

For ax² + bx + c = 0 the discriminant b² − 4ac decides the roots before you compute them. Positive means two different real roots, zero means one repeated root at the vertex, and negative means no real roots but a pair of complex conjugates. If it is a perfect square and the coefficients are integers, the roots are rational.

Why does it say every x is a solution?

When the x coefficients on both sides are equal and the constants are also equal, as in 2x + 3 = 2x + 3, the equation reduces to 0 = 0. That is true for any x, so the equation is an identity rather than a condition on x.

How are complex roots written?

As p ± qi, where p = −b ÷ 2a is the real part and q = √(4ac − b²) ÷ |2a| is the imaginary part. For x² + 2x + 5 = 0 that gives −1 ± 2i. Both roots share the real part, which is also the x-coordinate of the parabola's vertex.

What is Cramer's rule?

A way to solve linear systems with determinants. For two equations, each unknown equals a determinant with one column replaced by the right-hand sides, divided by the main determinant D = a1·b2 − a2·b1. It only works when D is not zero.

What if the two equations have no common solution?

If the determinant is zero, the two lines have the same slope. When their right-hand sides are not in the same ratio, the lines are parallel and never meet, so the system has no solution. When they are, both equations describe one line and there are infinitely many solutions.

Can I enter fractions like 1/3?

Enter decimals instead, such as 0.333333, or multiply the whole equation by the denominator first. Multiplying x/3 + 2 = 5 by 3 gives x + 6 = 15, which uses whole coefficients and avoids rounding.