CompoundPage

Quadratic Formula Calculator

The quadratic formula calculator gives both roots as decimals and in exact form (fractions or surds), plus the discriminant, the vertex and the factored form.

Roots3 and 2

Exact form
x = 3 or x = 2
Discriminant Positive, so two distinct real roots, and a perfect square, so both are rational.
1
The formula applied
x = (5 +/- sqrt(1)) / 2
Vertex A minimum, since a is positive and the parabola opens upward.
(2.5, -0.25)
Axis of symmetry
x = 2.5
Factored form
(x - 3)(x - 2) = 0
Y-intercept
(0, 6)
Sum and product of the roots
5 and 6
Completed square
(x - 2.5)^2 - 0.25

How the Quadratic Formula Calculator works

Any equation of the form ax^2 + bx + c = 0, with a not zero, is solved by the quadratic formula: x = (-b plus or minus the square root of (b^2 - 4ac)) all over 2a. It always works, which is more than can be said for factoring.

The part under the root, b^2 - 4ac, is the discriminant, and it determines the shape of the answer before any arithmetic is done.

Positive: two distinct real roots, and the parabola crosses the x-axis twice. For x^2 - 5x + 6 the discriminant is 25 - 24 = 1, so the roots are (5 plus or minus 1) / 2, giving 3 and 2, and the factored form is (x - 3)(x - 2).

Zero: one repeated root, and the parabola touches the axis at a single point. x^2 - 4x + 4 has discriminant 0 and the root x = 2 twice, because it is (x - 2)^2.

Negative: no real roots, and the parabola misses the axis entirely. The two solutions are complex conjugates, same real part and opposite imaginary parts: x^2 + 1 = 0 gives x = i and x = -i.

The formula is not arbitrary; it is what completing the square produces. Divide through by a, move the constant across, add (b/2a)^2 to both sides to make the left side a perfect square, take the root of both sides. Doing that symbolically once gives the formula, and doing it to a specific equation gives the vertex form: a(x - h)^2 + k, where h = -b/2a and k is the value of the quadratic there.

Which is where the vertex comes from. The axis of symmetry is x = -b/2a, the same -b/2a in the formula, because the two roots sit symmetrically either side of it at a distance of sqrt(discriminant)/2a. The vertex is the point on the curve at that x, which makes quadratics the simplest useful optimization problem: maximum revenue, maximum projectile height, minimum cost.

Vieta's formulas give a quick check that costs nothing. The sum of the roots is -b/a and the product is c/a. For x^2 - 5x + 6, the sum should be 5 and the product 6: 3 + 2 = 5 and 3 x 2 = 6. They hold for complex roots too, which makes them the fastest way to check an answer.

If a = 0 the equation is not quadratic at all: it is bx + c = 0, with the single root -c/b, and the quadratic formula would divide by zero. If b is also zero there is nothing left to solve.

Quadratic Formula Calculator FAQ

What is the quadratic formula?

x = (-b plus or minus sqrt(b^2 - 4ac)) / 2a, for any equation ax^2 + bx + c = 0 with a not zero. It comes from completing the square on the general form, and it works on every quadratic, including those that cannot be factored.

What does the discriminant tell you?

b^2 - 4ac decides the nature of the roots. Positive means two distinct real roots; zero means one repeated root with the vertex on the x-axis; negative means no real roots and a complex conjugate pair. If it is a positive perfect square, the roots are rational and the quadratic factors over the integers.

How do I find the vertex of a parabola?

The x-coordinate is -b/2a, the same expression that appears in the quadratic formula, because the roots are symmetric about it. Substitute that back into the equation for the y-coordinate. It is a minimum when a is positive and a maximum when a is negative.

Why can't I always factor a quadratic?

Factoring over the integers only works when the discriminant is a perfect square. x^2 - 2x - 1 has a discriminant of 8, so its roots are 1 plus or minus sqrt(2). Those are irrational, and no integer factorization exists. The quadratic formula works regardless, which is why it is the general method.

More Quadratic Formula Calculator pages

Related calculators

Embed this calculator
<div id="compoundpage-quadratic-formula-calculator"></div>
<script src="https://compoundpage.com/embed/quadratic-formula-calculator.js" async></script>

The same calculation as JSON