Equation Solver
Solve linear and quadratic equations instantly with the free CalcNova equation solver. Enter the coefficients of ax + b = 0 or ax² + bx + c = 0 and the tool shows each root, the discriminant, and the steps it used — computed entirely in your browser, with nothing sent to a server.
Equation solver
Solve linear and quadratic equations with the discriminant and roots shown. Everything runs in your browser.
How the equation solver works
The tool has two tabs. The Linear tab solves equations of the form ax + b = 0 by isolating x: it computes x = −b ÷ a. If you enter a = 0, there is no x term to isolate, so the tool tells you whether the equation has no solution (for example 0 = 5) or infinitely many solutions (0 = 0).
The Quadratic tab solves ax² + bx + c = 0 with the quadratic formula. It first evaluates the discriminant D = b² − 4ac and shows its value, because the sign of D decides what kind of roots exist: two distinct real roots when D is positive, one repeated (double) root when D is zero, and no real roots when D is negative — in that last case the tool also displays the two complex roots. If you enter a = 0 on the quadratic tab, the equation is really linear, so the tool solves it as one instead of dividing by zero.
Results recalculate live as you type, and every answer is rounded for display to at most ten decimal places. All of the arithmetic happens on your own device; the page never contacts a server.
Formulas and the discriminant
The solver is built on two formulas. For a linear equation, ax + b = 0 gives x = −b / a, provided a ≠ 0.
For a quadratic equation, the quadratic formula gives both roots at once: x = (−b ± √(b² − 4ac)) / (2a), provided a ≠ 0.
The expression under the square root, D = b² − 4ac, is the discriminant:
- D > 0: two distinct real roots, one from −b + √D and one from −b − √D.
- D = 0: one double (repeated) real root, x = −b / (2a).
- D < 0: no real roots; the equation has a pair of complex conjugate roots instead.
Worked examples
Example 1 — x² − 5x + 6 = 0. Here a = 1, b = −5, c = 6. The discriminant is D = (−5)² − 4(1)(6) = 25 − 24 = 1. Since D > 0 there are two roots: x = (5 ± 1) / 2, so x = 3 or x = 2. Checking: 3² − 5(3) + 6 = 9 − 15 + 6 = 0, and 2² − 5(2) + 6 = 4 − 10 + 6 = 0.
Example 2 — 2x − 4 = 0. This is linear: x = −(−4) / 2 = 4 / 2 = 2. Checking: 2(2) − 4 = 0.
Example 3 — x² + 4x + 4 = 0. Here a = 1, b = 4, c = 4. The discriminant is D = 16 − 16 = 0, so there is one double root: x = −4 / 2 = −2. Checking: (−2)² + 4(−2) + 4 = 4 − 8 + 4 = 0. The equation factors as (x + 2)² = 0, which is why the single root −2 counts twice.
Example 4 — x² + 1 = 0. Here a = 1, b = 0, c = 1. The discriminant is D = 0 − 4 = −4, which is negative, so there are no real roots: no real number squared equals −1. The tool reports the complex roots x = i and x = −i instead.
Common mistakes
- Dropping the parentheses in the quadratic formula: the whole expression (−b ± √D) is divided by 2a, not just the square root part.
- Sign slips with negative coefficients: in x² − 5x + 6 = 0, b is −5, so −b is +5. Copy each sign carefully into the formula.
- Reading “no real roots” as “no answer at all”: the equation still has two complex roots — they just do not lie on the real number line.
- Forgetting the a = 0 case: without an x² term the equation is linear and the quadratic formula would divide by zero. This tool detects that and switches to the linear method automatically.
- Treating a double root as a one-off: it is a single value, but it counts twice (multiplicity two), which matters when factoring or sketching the graph.
Privacy and accuracy
Everything on this page runs in your browser. The coefficients you type and the results you see never leave your device: nothing is sent to a server, stored, or logged, and the tool keeps working after the page has loaded even if your connection drops.
The solver is numeric, not a symbolic algebra system. It returns the roots and shows the discriminant and formula steps, but it does not rearrange or simplify equations the way a person doing algebra by hand would. Displayed answers are rounded to ten decimal places while the underlying arithmetic uses full floating-point precision. For exams or engineering work where exact forms such as √2 are required, verify against exact methods.
Frequently asked questions
What is the discriminant?
The discriminant is D = b² − 4ac, the expression under the square root in the quadratic formula. Its sign tells you, before you compute anything else, whether the equation has two distinct real roots (D > 0), exactly one repeated real root (D = 0), or no real roots (D < 0). This solver always displays it so you can see the reasoning, not just the answer.
What happens if I enter a = 0 on the quadratic tab?
Then the x² term disappears and the equation is really linear (bx + c = 0). Instead of dividing by zero, the tool automatically switches to the linear method and solves for x the same way the Linear tab does.
Can the solver handle cubic or higher-degree equations?
No. This tool covers linear and quadratic equations only. For evaluating longer expressions, use the online scientific calculator on the CalcNova homepage.
Why does x² + 1 = 0 have no real solution?
Its discriminant is D = 0 − 4(1)(1) = −4, which is negative, so the quadratic formula would need the square root of −4. No real number squared equals −1, so there are no real roots — but there are two complex roots, i and −i, which the tool shows.
Does the tool show its working?
Yes. Every result includes the discriminant value and the formula step used to reach it. Keep in mind it is a numeric solver rather than a symbolic step-by-step algebra tutor: it gives correct roots, not handwritten-style manipulation.
Is any of my input sent to a server?
No. All calculations run locally in your browser, so your equations never leave your device.
Related tools
- Online scientific calculator — evaluate expressions and double-check your roots.
- Unit Converter — convert length, weight, temperature, area, volume, and speed.
- 6 Month Calculator — find the date six months from any starting date.
- World Clock & Time Zone Converter — compare times across time zones.
- CalcNova FAQ — answers to common calculator questions.
