FLXCode Quadratic Formula Calculator

FLXCode apps

Appearance

Quadratic Formula Calculator

Enter a, b and c. You get both roots in exact form, the discriminant, the vertex and a small graph of the parabola.

Example

x = −2 ± √3

Discriminant 12 is positive but not a perfect square, so the roots are irrational. About −3.732051 and −0.267949.

Steps

  1. Start from x² + 4x + 1 = 0, so a = 1, b = 4, c = 1.
  2. Discriminant: b² − 4ac = 4² − 4·1·1 = 16 − 4 = 12.
  3. The discriminant is positive, so there are two real roots.
  4. Formula: x = (−b ± √D) / 2a = ((−4) ± √12) / 2.
  5. Simplify the root: √12 = 2√3.
  6. Divide the top and bottom by their common factor 2: x = −2 ± √3.
  7. The two roots are about −3.732051 and −0.267949.

Discriminant, vertex and check

  • Discriminant D = 12: two real roots.
  • Vertex form: y = (x + 2)² − 3
  • Vertex: (−2, −3). Axis of symmetry: x = −2.
  • Opens up, so the vertex is the minimum. Y-intercept: (0, 1).
  • Check: the roots add up to −b/a = −4 and multiply to c/a = 1.
  • Decimal roots: x₁ ≈ −3.732051, x₂ ≈ −0.267949.

Graph

Graph of the parabola. Vertex at x = -2, y = -3. It crosses the x axis at -0.2679 and -3.732.

No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it.

Problem or idea? Email us

The formula, in one line

x = (−b ± √(b² − 4ac)) / 2a. First work out b² − 4ac. Then take its square root, simplify it, and divide. The square root calculator does the simplifying step on its own if you want to check it.

Discriminant D = b² − 4acRootsThe parabola
D > 0, a perfect squareTwo rational rootsCrosses the x-axis at two nice points
D > 0, not a perfect squareTwo irrational real roots, like −2 ± √3Crosses at two points
D = 0One real root, repeatedTouches the axis at the vertex
D < 0Two complex roots, a ± biStays above or below the axis

Worked examples

EquationAnswerWhat to notice
x² − 5x + 6 = 0x = 2 or x = 3D = 1, a perfect square: whole-number roots
2x² + 3x − 2 = 0x = −2 or x = 1/2D = 25: rational roots with a fraction
x² + 4x + 1 = 0x = −2 ± √3D = 12 = 4 × 3, so √12 becomes 2√3
x² − 6x + 9 = 0x = 3D = 0: one root, counted twice
x² + 2x + 5 = 0x = −1 ± 2iD = −16: complex pair
3x² − 2x + 4 = 0x = 1/3 ± (i√11)/3D = −44: a complex pair with a radical
(1/2)x² − x − 4 = 0x = −2 or x = 4Fractions are cleared first (multiply by 2)
4x − 8 = 0x = 2a = 0 is not a quadratic: solved as bx + c = 0

The steps the tool follows

  1. Read a, b and c. Fractions and decimals are scaled to whole numbers first.
  2. Compute D = b² − 4ac and say what kind of roots to expect.
  3. Put the numbers into the formula. Pull square factors out of √D (√20 = 2√5) and cancel what the top and bottom share.
  4. If D is negative, write √D as a multiple of i.
  5. Find the vertex, h = −b / 2a, and give the vertex form y = a(x − h)² + k.

Other ways to solve

Factoring is faster when the roots are whole numbers: x² − 5x + 6 = (x − 2)(x − 3). Completing the square is where the formula comes from, and it gives the vertex form directly. The formula always works, which is why it is the one to learn. For the roots of higher-degree equations or systems of equations, the matrix calculator solves linear systems by row reduction.

Numbers this uses

  • Coefficients: whole numbers, decimals or fractions, up to 40 digits each. Exact BigInt fractions, no floats.
  • Square factors of D are taken out up to D = 1,000,000,000,000,000 (1e15). Larger discriminants show the root unsimplified.
  • Decimal roots: 6 places, half away from zero, computed from the exact radical.
  • The graph is drawn with ordinary floats for the picture only. Roots and labels come from the exact values.

Nothing you type is uploaded. We count events without cookies (details).

FAQ

What is the quadratic formula?

For ax² + bx + c = 0 with a not 0, the solutions are x = (−b ± √(b² − 4ac)) / 2a. The ± gives two roots, one with + and one with −. Put the three coefficients in the boxes and the tool fills the formula for you, step by step.

What does the discriminant tell me?

The part under the root, D = b² − 4ac, tells you the kind of answer before you solve. D above 0 gives two real roots. D = 0 gives one repeated root, and the parabola just touches the x-axis. D below 0 gives two complex roots, a ± bi, and the parabola never reaches the axis.

What if a is 0?

Then there is no x² term and the equation is linear, bx + c = 0, with the single solution x = −c/b. The quadratic formula would divide by 2a = 0. The tool says so and solves the linear equation instead. If b is 0 as well, it tells you whether every x works (c = 0) or none does.

How are complex roots written?

As a ± bi, where i is the square root of −1. For x² + 2x + 5 = 0 the roots are −1 + 2i and −1 − 2i. They always come as a conjugate pair when the coefficients are real. The tool gives the exact form and the decimal values.

Can I enter fractions and decimals?

Yes. Type 1/2 or 0.25 in any box. The tool multiplies all three coefficients by the same number to make them whole, which does not change the roots, then uses exact whole-number arithmetic. So there is no rounding until the very last decimal line.

What is vertex form and why is it shown?

y = a(x − h)² + k, with the vertex at (h, k). Here h = −b / 2a and k is the y value there. The vertex is the lowest point if the parabola opens up (a above 0) and the highest if it opens down. It sits halfway between the two roots.

How do I check my answer?

The roots add up to −b/a and multiply to c/a. For x² − 5x + 6 the sum is 5 and the product is 6, and 2 + 3 and 2 × 3 agree. The tool prints both numbers so you can compare. You can also put a root back into the equation, which should give 0.

Are my numbers saved or sent anywhere?

No. The roots are worked out in your browser. What you type is not put in the address bar, not stored and not counted. We only count which kind of answer came out: two real roots, a double root, a complex pair or a linear case.

More from FLXCode

Share Quadratic Formula Calculator