Math & Education
Equation Solver (Linear & Quadratic)
Solve linear and quadratic equations in x — typed naturally like 3x + 5 = 2x - 7 or x^2 - 5x + 6 = 0 — with the discriminant, vertex and real or complex roots.
How to use
- 1Type the equation using x, e.g. 2(x + 3) = 5x - 9 or x^2 + 2x - 8 = 0.
- 2Read the solutions and the steps of the quadratic formula.
How it's calculated
The equation is rearranged to ax² + bx + c = 0. Linear: x = −c ÷ b. Quadratic: x = (−b ± √(b² − 4ac)) ÷ 2a; the discriminant b² − 4ac decides whether roots are real or complex.
Frequently asked questions
Can it solve cubic or higher equations?
Not yet — it handles equations that reduce to degree 2 or less. Use the graphing calculator to find roots of higher-degree equations numerically.
What does the discriminant tell me?
Positive: two real roots. Zero: one repeated root. Negative: two complex roots.
How do I type multiplication?
Write 2x or 2*x; powers use ^, e.g. 3x^2.
How it figures out your equation's degree without a parser
Rather than symbolically parsing your typed expression, the solver treats f(x) = lhs − rhs as a black box and samples it at a few x values: f(0) gives the constant term c, and f(1) and f(−1) together isolate a (the x² coefficient) and b (the x coefficient). It then double-checks that formula against four more points (x = 2, −3, 0.5, 7) — if your expression isn't actually degree 2 or lower, those checks fail and you get a clear message instead of a wrong answer.
A worked example: x² − 5x + 6 = 0
Here a = 1, b = −5, c = 6. The discriminant b² − 4ac = 25 − 24 = 1, which is positive, so there are two distinct real roots: x = (5 ± 1) ÷ 2, giving x = 3 and x = 2 — matching what the calculator returns. The vertex, at x = −b/(2a) = 2.5, has a y-value of c − b²/(4a) = 6 − 25/4 = −0.25, so the parabola's lowest point is (2.5, −0.25).
When the discriminant goes negative
x² + 2x + 5 = 0 has a = 1, b = 2, c = 5, giving a discriminant of 4 − 20 = −16. Since that's negative, the roots are complex: x = −1 ± 2i, read off as −b/(2a) ± √(−discriminant)/(2a). The solver reports these directly rather than claiming 'no solution' — there's no real solution, but there is a complex one.
A linear equation hides the discriminant and the vertex
The discriminant and the vertex are only added when the x squared coefficient is large enough to count as a quadratic. Typing 3x + 5 = 2x - 7 still solves, and I still get the standard form, but those two extra lines are absent rather than filled with zeros. A quadratic keeps them, including a negative discriminant written out to six decimals and complex roots in the solution line. The standard form rewrites a plus followed by a negative as a single minus, so I do not see plus minus in the middle of the equation. Parentheses are allowed, as in 2(x + 3) = 5x - 9, and the solution comes back as a single x.
Related tools
- Matrix Calculator
Multiply, add and subtract matrices, and find the determinant, inverse, transpose and rank — or solve a system of linear equations Ax = b.
- Linear Inequality Solver
Solve linear inequalities in x like 3x − 5 < 7 or 2(x + 1) ≥ x − 4, flipping the sign correctly, with the answer in inequality and interval notation.
- Triangle Calculator
Solve any triangle from three known values (SSS, SAS or ASA): all sides, angles, area, perimeter and heights, using the law of sines and cosines.
- Slope, Distance & Midpoint Calculator
Find the slope, line equation (y = mx + b), distance, midpoint and angle between two points on a coordinate plane.
- Velocity & Acceleration Calculator (SUVAT)
Solve constant-acceleration motion problems: enter any three of initial velocity, final velocity, acceleration, time and displacement to get the other two.
- Chemical Equation Balancer
Balance chemical equations automatically — combustion, redox and precipitation reactions — with the smallest whole-number coefficients.