About the Quadratic Equation Calculator
A quadratic equation has the form ax² + bx + c = 0, and the quadratic formula solves every one of them:
x = (-b ± √(b² - 4ac)) / 2a
That formula is probably the most-memorised piece of algebra in existence, and it is worth knowing what each part is doing rather than just reciting it.
Graphically, a quadratic is a parabola — a symmetric U-shaped curve. Solving the equation means finding where that curve crosses the horizontal axis. It might cross twice, touch once, or miss entirely, and the discriminant — the b² − 4ac under the root — tells you which before you compute anything else.
This calculator gives the roots in exact and decimal form, the discriminant, the vertex, and the factored form where one exists.
How to Use the Quadratic Equation Calculator
Enter the three coefficients from ax² + bx + c = 0.
Get the equation into that shape first. If you have x² = 5x − 6, move everything to one side: x² − 5x + 6 = 0, so a = 1, b = −5, c = 6. Signs matter and are the most common source of a wrong answer here.
a cannot be zero. Without an x² term the equation is linear, not quadratic — and the calculator will tell you the linear answer rather than just refusing. b and c can both be zero.
Press Calculate. You get the solutions, the discriminant with its interpretation, the vertex coordinates, and the factored form.
How Quadratics Are Solved
The formula comes from completing the square on the general equation, which is worth seeing once because it explains where every piece originates.
ax² + bx + c = 0
x² + (b/a)x = -c/a divide by a
x² + (b/a)x + (b/2a)² = (b/2a)² - c/a add the square-completing term
(x + b/2a)² = (b² - 4ac) / 4a² both sides tidied
x + b/2a = ± √(b² - 4ac) / 2a take the root — hence ±
x = (-b ± √(b² - 4ac)) / 2a
The ± enters at the square-root step, because a square root has two values. That is also why the two roots sit symmetrically either side of −b/2a, which is the axis of symmetry.
The discriminant decides the shape of the answer:
- Positive — the square root is a real number, the ± gives two different
values, and the parabola crosses the axis twice.
- Zero — the root term vanishes, both signs give the same answer, and the
parabola just touches the axis at its vertex.
- Negative — no real square root exists, so the parabola never reaches the
axis. The roots are a complex pair.
The vertex sits at x = −b/2a, the midpoint of the two roots. Substituting it back gives the lowest point when a is positive, or the highest when a is negative.
A note on precision
There is a subtlety most calculators ignore. When b² is much larger than 4ac, √(b² − 4ac) is very close to |b|, so one of the two roots comes from subtracting two nearly equal numbers — and that destroys precision.
For x² + 100,000,000x + 1 = 0, the naive formula gives the small root as −7.45 × 10⁻⁹. The true value is −1.00 × 10⁻⁸. That is a 25% error, from a formula that is algebraically perfect.
This calculator computes the well-conditioned root first, then obtains the other from the fact that the roots multiply to c/a. Both come out correct.
Quadratic Formula
x = (-b ± √(b² - 4ac)) / 2a
Discriminant:
D = b² - 4ac
D > 0 -> two distinct real roots
D = 0 -> one repeated real root
D < 0 -> two complex roots
Vertex:
x = -b / 2a, y = c - b² / 4a
Sum and product of the roots:
x₁ + x₂ = -b / a
x₁ x x₂ = c / a
Those last two are the fastest check available. Add your roots and they should give −b/a; multiply them and they should give c/a. If either fails, the answer is wrong.
Step-by-Step Example
Solve x² − 5x + 6 = 0.
Step 1 — identify the coefficients. a = 1, b = −5, c = 6.
Step 2 — compute the discriminant.
D = (-5)² - 4(1)(6) = 25 - 24 = 1
Positive, so expect two real roots.
Step 3 — substitute.
x = (5 ± √1) / 2 = (5 ± 1) / 2
Step 4 — take both signs.
x = 6/2 = 3 and x = 4/2 = 2
Step 5 — check. Sum: 2 + 3 = 5, which is −b/a = 5. ✓ Product: 2 × 3 = 6, which is c/a = 6. ✓
So x² − 5x + 6 = (x − 2)(x − 3), which is what the factored form shows.
Now one that does not come out neatly. Solve x² − 5x + 2 = 0.
D = 25 - 8 = 17 not a perfect square
x = (5 ± √17) / 2
That is the exact answer. As decimals the roots are 4.5616 and 0.4384, but those are rounded. In algebra, surd form is usually what is wanted, and this calculator gives both.
Understanding Your Result
The solutions are the values of x. When the discriminant is a whole non-square, the exact surd form appears alongside the decimals — use the surd if the answer feeds into more algebra.
The discriminant is stated with its interpretation, so you can see why you got two roots, one, or none.
The vertex gives the turning point. With a positive it is the minimum; with a negative it is the maximum. This is the answer to most optimisation questions that reduce to a quadratic — maximum area, maximum profit, minimum cost.
The factored form rewrites the quadratic as a product. Where the roots are neat this is the tidiest way to express it, and it makes the roots visible directly. When the discriminant is negative, no real factorisation exists and the calculator says so.
For complex roots, the answer appears as p ± qi. The two always share the same real part and differ only in the sign of the imaginary part — they are conjugates, which is why the parabola remains symmetric.
When Should You Use This Calculator?
Algebra homework. The most common use, and the step-by-step working shows which stage a hand attempt went wrong at.
Projectile motion. Height under gravity is quadratic in time, so "when does it land" is a quadratic root and "how high does it get" is the vertex.
Area problems. A rectangle with a fixed perimeter and a given area leads to a quadratic, as do most border-and-path problems.
Optimisation. Maximum revenue when price and demand move oppositely is a vertex question.
Break-even analysis. Where cost and revenue curves meet, when either is quadratic.
Checking a factorisation. If you factored by hand, the factored form here confirms it — or shows why the quadratic does not factor over the integers.
Common Mistakes
Not rearranging to equal zero first. The formula assumes ax² + bx + c = 0. Applying it to x² = 5x − 6 without moving terms across gives nonsense.
Sign errors on b. If b is −5, then −b is +5, and b² is +25. Squaring removes the sign; negating restores it. Getting this wrong is the single most frequent error in the whole topic.
Forgetting the ± gives two answers. Reporting only one root loses half the solution, and in an exam half the marks.
Dividing only part of the numerator by 2a. The whole expression −b ± √D sits over 2a, not just the root term.
Treating a negative discriminant as an error. It is a real answer: no real solutions. State it as such rather than assuming a mistake.
Rounding the roots before checking. Use full precision for the sum-and-product check. Rounded roots will not reconcile exactly and may look wrong when they are right.
Trusting a naive implementation on extreme coefficients. When b² vastly exceeds 4ac, the direct formula loses precision on one root. If a calculator gives you a small root that fails the product check, that is why.