Home › Math & Science › Equation Solver
Equation Solver
Our free equation solver finds the values of x that make your equation true. Solve quadratic equations in the form ax² + bx + c = 0 — with the discriminant and both roots shown step by step — or switch to linear mode for equations of the form ax + b = 0. No sign-up, no downloads, just the answer.
For a quadratic, a cannot be zero. For a linear equation, the c box is not used.
| Discriminant (b² − 4ac) | 1 |
| Root 1 | 2 |
| Root 2 | 3 |
| Check | 2² − 5(2) + 6 = 0 ✓ |
How it works
Solving an equation means finding the numbers you can put in place of x so that the left side equals the right side. Those numbers are called the roots or solutions. A linear equation, ax + b = 0, has one root, found by undoing the arithmetic: move b to the other side and divide by a. A quadratic equation, ax² + bx + c = 0, can have two roots, one root, or no real roots at all, and it needs a more powerful tool — the quadratic formula.
The key to the quadratic formula is the discriminant, b² − 4ac. It is the number under the square root, and it decides the outcome before you finish the calculation. If the discriminant is positive, its square root is a real number and you get two different roots. If it is zero, the square root is zero, both halves of the formula give the same answer, and you get one repeated root. If it is negative, there is no real square root, so the equation has no real roots — on a graph, the parabola never touches the x-axis. This solver shows the discriminant first, so you always know which case you are in.
Factoring is the shortcut when it works: x² − 5x + 6 factors into (x − 2)(x − 3), and a product is zero only when one of its factors is zero, so x must be 2 or 3. But most quadratics do not factor neatly — try x² − 3x + 1 = 0 — and the quadratic formula handles every case, neat or not. That is why it is worth learning: one method, any numbers, guaranteed answer.
Quadratic equations describe anything that speeds up, curves, or reaches a peak and falls back. A baseball thrown in a park in Ohio follows a parabola, so its height over time is a quadratic, and solving it tells you when the ball hits the ground. A small business in Georgia finds that its profit follows a curve as it raises prices — too cheap and the margin is thin, too expensive and customers leave — and the top of that parabola is the best price. Even the path of water from a garden hose is a quadratic in disguise.
Worked example
Solve x² − 5x + 6 = 0. Here a = 1, b = −5, and c = 6. Enter those three numbers with "Quadratic" selected in the solver above.
Step 1 — find the discriminant: D = b² − 4ac = (−5)² − 4 × 1 × 6 = 25 − 24 = 1. Because 1 is positive, there are two real roots. Step 2 — apply the quadratic formula: x = (−b ± √D) ÷ 2a = (5 ± √1) ÷ 2 = (5 ± 1) ÷ 2. Step 3 — take the two signs separately. With the plus sign: (5 + 1) ÷ 2 = 6 ÷ 2 = 3. With the minus sign: (5 − 1) ÷ 2 = 4 ÷ 2 = 2.
The solutions are x = 2 and x = 3. Check the first one: 2² − 5 × 2 + 6 = 4 − 10 + 6 = 0. Check the second: 3² − 5 × 3 + 6 = 9 − 15 + 6 = 0. Both work, and the solver above gives the same pair: x = 2 and x = 3, discriminant 1.
FAQ
How do you solve a quadratic equation?
Use the quadratic formula: x = (-b plus or minus the square root of b squared minus 4ac) divided by 2a. First find the discriminant, b squared minus 4ac. If it is positive you get two real roots, if it is zero you get one repeated root, and if it is negative there are no real roots.
What is the discriminant?
The discriminant is b squared minus 4ac, the part under the square root in the quadratic formula. It tells you how many real solutions a quadratic equation has before you finish the calculation: positive means two real roots, zero means one repeated root, and negative means no real roots.
What are the roots of x² - 5x + 6 = 0?
The roots are x = 2 and x = 3. The discriminant is (-5) squared minus 4 x 1 x 6 = 25 - 24 = 1, so x = (5 plus or minus 1) / 2, giving 6/2 = 3 and 4/2 = 2. You can check by factoring: (x - 2)(x - 3) = x squared - 5x + 6.
How do you solve a linear equation ax + b = 0?
Subtract b from both sides and divide by a: x = -b / a. For example, 4x + 8 = 0 gives 4x = -8, so x = -2. If a is zero the equation has no x term and either has no solution or is true for every x.
What does it mean if a quadratic has no real roots?
It means no real number satisfies the equation, which happens when the discriminant is negative. On a graph, the parabola never crosses the x-axis. The equation still has two complex roots, but they are not real numbers and this solver reports that there are no real roots.