Quadratic Formula Calculator

This quadratic formula calculator solves any equation in the form ax^2 + bx + c = 0. Enter a, b and c as whole numbers, decimals or fractions. You'll get exact roots (fractions, radicals or complex numbers), decimal roots, the discriminant, the factored form when one exists, and the vertex.

Calculation and content reviewed by EZ Calculators Editorial Team on .

Enter values

Enter the signed coefficients from ax^2 + bx + c = 0. Exact fractions remain exact while the result classifies the discriminant, solves the roots, audits Vieta relationships, and derives the vertex and parabola features.

Build the scenario below, then calculate for a complete result report.

Runs in your browser
InputExact coefficients
ClassificationExact discriminant
AuditRoots and graph checks
Standard form

Enter ax^2 + bx + c = 0

ax^2 + bx + c = 0
Signed integer, decimal, fraction, or scientific notation; a cannot be zero.
Enter the signed x coefficient. Use 0 when the x term is absent.
Enter the signed constant. Use 0 when the constant term is absent.
Keep the signs with the coefficientsThe leading coefficient a must not be zero.
For x^2 - 3x + 2 = 0, enter a = 1, b = -3, and c = 2. Use zero for a missing x term or constant term, but never for a because a zero leading coefficient is not quadratic.
Display

Choose decimal precision

Exact algebra stays unchanged; only rounded displays move.

Controls rounded roots and graph measures; exact fractions and discriminant checks remain unchanged.
Exact first, decimal secondRoots and graph checks preserve the entered function.
Integers, terminating decimals, fractions such as -3/4, and bounded scientific notation are accepted. The solver clears denominators for root classification while preserving the entered function for vertex, focus, directrix, range, and symmetric-value results.

What is the quadratic formula?

The quadratic formula is x = (-b +/- sqrt(b^2 - 4ac)) / (2a), and it solves any equation written as ax^2 + bx + c = 0. For 2x^2 + 3x - 5 = 0, the part under the root is 9 + 40 = 49, so x = (-3 +/- 7) / 4. That gives x = 1 and x = -5/2.

How to use the quadratic formula calculator

First get everything on one side so the equation equals zero. Then read off a, b and c, keeping their signs. For 2x^2 + 7 = 3x, subtract 3x to get 2x^2 - 3x + 7 = 0, so a = 2, b = -3 and c = 7. If a term is missing, its coefficient is 0.

You can type whole numbers, decimals, fractions like 1/2, or scientific notation. The decimal precision menu only changes the rounded answers. Exact roots, the discriminant and the vertex stay exact whatever you pick.

  1. Rewrite the equation as ax^2 + bx + c = 0.
  2. Enter a, b and c with their signs. Remember a can't be 0.
  3. Pick how many decimal places you want.
  4. Press Solve quadratic.
  5. Read the exact roots first, then the decimals, discriminant and vertex.

The quadratic formula

The formula gives both solutions at once. The +/- sign means you work it out twice: once adding the square root and once subtracting it. The expression under the square root, b^2 - 4ac, is called the discriminant, and it tells you what kind of answers to expect before you finish.

The formula comes from completing the square on ax^2 + bx + c = 0, which is why it works for every quadratic, even ones that don't factor.

Formula guide
  • x = (-b +/- sqrt(b^2 - 4ac)) / (2a)
  • Discriminant: D = b^2 - 4ac

Worked example: 2x^2 + 3x - 5 = 0

Here a = 2, b = 3 and c = -5. The discriminant is 3^2 - 4(2)(-5) = 9 + 40 = 49. That's a perfect square, so the roots will be nice fractions.

Plug in: x = (-3 +/- 7) / 4. Adding gives 4 / 4 = 1. Subtracting gives -10 / 4 = -5/2. Check the first one: 2(1)^2 + 3(1) - 5 = 0. Since the roots are rational, the equation also factors as (x - 1)(2x + 5) = 0.

Solving 2x^2 + 3x - 5 = 0
StepWorkResult
Discriminant3^2 - 4(2)(-5)49
Square rootsqrt(49)7
Plus branch(-3 + 7) / 41
Minus branch(-3 - 7) / 4-5/2
Sum of roots-b/a = -3/21 + (-5/2) = -3/2
Product of rootsc/a = -5/21 x (-5/2) = -5/2

Discriminant calculator: what b^2 - 4ac tells you

The sign of the discriminant decides the type of answer. Positive means two different real roots. Zero means one repeated root. Negative means no real roots, just a pair of complex roots like -1 + 2i and -1 - 2i.

With whole-number coefficients, a positive discriminant that's a perfect square (1, 4, 9, 16, 25...) gives rational roots, so the equation factors neatly. Anything else positive gives roots with a square root left in them. The calculator shows the discriminant and names the case for you.

The four discriminant cases
ExampleDRootsGraph
x^2 - 3x + 2 = 01 (perfect square)1 and 2Crosses the x-axis twice
x^2 - 2 = 08 (not a square)+/-sqrt(2), about +/-1.414214Crosses the x-axis twice
x^2 - 2x + 1 = 001, repeatedTouches the x-axis at the vertex
x^2 + 2x + 5 = 0-16-1 +/- 2iNever meets the x-axis

Vertex form calculator and the parabola

Every quadratic is also a parabola, y = ax^2 + bx + c. Its axis of symmetry is x = -b/(2a), and the vertex sits on that line at height -D/(4a). If a is positive the parabola opens up and the vertex is the lowest point. If a is negative it opens down and the vertex is the highest point.

The calculator rewrites your equation in vertex form, y = a(x - h)^2 + k. For 2x^2 + 3x - 5, the vertex is (-3/4, -49/8), so the vertex form is y = 2(x + 3/4)^2 - 49/8. You also get the range, y-intercept, focus and directrix.

Formula guide
  • h = -b/(2a)
  • k = -D/(4a)
  • Vertex form: y = a(x - h)^2 + k

Checking the roots

Substitute each root back into ax^2 + bx + c. You should get exactly 0. Two shortcuts help too: the roots always add up to -b/a and multiply to c/a. For x^2 - 3x + 2 = 0, the roots 1 and 2 add to 3 and multiply to 2, which matches.

The calculator runs these checks for you, along with a small table of points on both sides of the vertex. Equal steps left and right of the axis give equal y-values, which confirms the vertex is right.

Formula guide
  • r1 + r2 = -b/a
  • r1 x r2 = c/a

Fractions, decimals and exact answers

If your coefficients are fractions, the calculator clears them first. (1/2)x^2 - (3/2)x + 1 = 0 becomes x^2 - 3x + 2 = 0, which has the same roots, 1 and 2. Multiplying every term by the same nonzero number never changes the solutions.

Irrational roots are shown both ways. For x^2 - 2 = 0 you'll see +/-sqrt(2) and the rounded 1.414214. Use the exact form in later algebra and the decimal for graphing or measuring.

Sources

FAQ

How do you solve a quadratic equation?

Write it as ax^2 + bx + c = 0, then factor it, complete the square or use the quadratic formula. The formula always works. For x^2 - 3x + 2 = 0 it gives x = 1 and x = 2.

What does a negative discriminant mean?

It means the equation has no real solutions. You get two complex roots instead. For x^2 + 2x + 5 = 0, the discriminant is -16 and the roots are -1 + 2i and -1 - 2i.

What happens when the discriminant is zero?

Both branches of the formula give the same number, so there's one repeated root. The parabola just touches the x-axis at its vertex. x^2 - 2x + 1 = 0 has the single root x = 1.

Why can't a be zero?

If a is 0, the x^2 term disappears and the equation is linear, not quadratic. The formula also divides by 2a, so it can't be used when a is 0.

How do I convert standard form to vertex form?

Find h = -b/(2a), then plug h into the equation to get k. Write y = a(x - h)^2 + k. For 2x^2 + 3x - 5, that's y = 2(x + 3/4)^2 - 49/8.

Can the calculator solve quadratics with fractions?

Yes. Enter coefficients like 1/2 or -3/4. The calculator clears the fractions to an equivalent whole-number equation and keeps the roots exact whenever it can.

How many solutions does a quadratic have?

Two, if you count a repeated root twice and include complex roots. Over the real numbers, a quadratic has two, one or zero solutions, depending on the discriminant.

Does the calculator factor the equation too?

When the roots are rational, yes. It builds the factored form from the two roots. 2x^2 + 3x - 5 has roots 1 and -5/2, so it factors as (x - 1)(2x + 5). When the discriminant isn't a perfect square, there's no factorization with whole numbers.