Skip to content

Quadratic Formula Calculator

Solve any quadratic equation with every step shown. Enter a, b and c (fractions are fine) or type the equation, and get exact and decimal roots, the discriminant, factored form, vertex and a graph.

Inequalities, y at x, methods, equation from roots
What do you want to do?
How do you want to enter it?

Whole numbers, decimals or fractions: 3, −2.5, 3/4 or −1 1/2. Use 0 for a missing term.

Pick >, ≥, < or ≤ to solve an inequality.

Show the working by
Decimal places
ResultUpdates as you type2x² − 4x − 6 = 0x = 3, x = −1Roots (exact)3, −1Roots as decimals2(x − 3)(x + 1)Factored form64Discriminant b² − 4ac(1, −8)Vertex (lowest point)x = 1Axis of symmetry2(x − 1)² − 8Vertex form(0, −6)y-intercepty ≥ −8Range (all y values)2 and −3Sum and product of roots(1, −63/8)Focusy = −65/8DirectrixParabolaRootsVertexy-intercept

How your roots are worked out

Your numbers, step by step: read off a, b and c, find the discriminant, then use the quadratic formula.

  1. 1

    Find a, b and c

    a = 2, b = −4c = −62x² − 4x − 6 = 0

  2. 2

    Work out b² − 4ac

    (−4)² − 4·2·(−6)= 16 + 48= 64

  3. 3

    Use the formula

    x = (−b ± √D) / 2a= (4 ± √64) / 4√64 = 8

  4. 4

    Your two roots

    x = 3x = −1two rational roots

Read more: the formula, a worked example, completing the square and factoring

A quadratic equation has an x² term and no higher power: ax² + bx + c = 0, where a is not 0. Its graph is a U-shaped curve called a parabola. The roots (also called solutions or zeros) are the x values where the curve crosses the x-axis. The quadratic formula finds them for any a, b and c. The discriminant, b² − 4ac, tells you before you finish how many real roots there are.

The formula

x = (−b ± √(b² − 4ac)) ÷ 2a
discriminant D = b² − 4ac (D > 0: two real roots, D = 0: one repeated root, D < 0: two complex roots)
vertex: x = −b ÷ 2a, y = c − b² ÷ 4a
vertex form: y = a(x − h)² + k, where (h, k) is the vertex
sum of roots = −b ÷ a, product of roots = c ÷ a

Worked example

Solve 2x² − 4x − 6 = 0. Here a = 2, b = −4 and c = −6. The discriminant is (−4)² − 4 × 2 × (−6) = 16 + 48 = 64. That is positive and a perfect square (8 × 8), so there are two rational roots. The formula gives x = (4 ± √64) ÷ (2 × 2) = (4 ± 8) ÷ 4. With plus: 12 ÷ 4 = 3. With minus: −4 ÷ 4 = −1. Check: 2 × 3² − 4 × 3 − 6 = 18 − 12 − 6 = 0. So the factored form is 2(x − 3)(x + 1). The vertex is at x = 4 ÷ 4 = 1, where y = 2 − 4 − 6 = −8, so the vertex is (1, −8) and the vertex form is 2(x − 1)² − 8. The graph crosses the y-axis at (0, −6).

Completing the square, step by step

Divide 2x² − 4x − 6 = 0 by 2: x² − 2x − 3 = 0. Move the 3 across: x² − 2x = 3. Half of −2 is −1, and (−1)² = 1, so add 1 to both sides: x² − 2x + 1 = 4. The left side is (x − 1)², so (x − 1)² = 4. Take the square root of both sides, remembering both signs: x − 1 = ±2, so x = 3 or x = −1. This is exactly how the quadratic formula is proved: complete the square on ax² + bx + c = 0 and you get x = (−b ± √(b² − 4ac)) ÷ 2a.

Factoring with the ac method

Multiply a × c (2 × −6 = −12) and look for two numbers that multiply to it and add to b (−4): 2 and −6. Split the middle term: 2x² + 2x − 6x − 6. Group in pairs: 2x(x + 1) − 6(x + 1) = (2x − 6)(x + 1). Each bracket can be 0, so x = 3 or x = −1. This only works neatly when the discriminant is a perfect square. Otherwise use the formula.

What the discriminant tells you

b² − 4acRootsGraphExample
Positive, perfect squareTwo rational (factors neatly)Crosses the x-axis twicex² + x − 6: D = 25, x = 2, −3
Positive, not a squareTwo irrational (surds)Crosses the x-axis twicex² − 12: D = 48, x = ±2√3
ZeroOne repeated rootTouches the x-axis at the vertexx² − 4x + 4: D = 0, x = 2
NegativeTwo complex (a ± bi)Never touches the x-axisx² + 2x + 5: D = −16, x = −1 ± 2i

Simplifying the square root (surds)

Take out the largest square factor: √48 = √(16 × 3) = 4√3, and √72 = √(36 × 2) = 6√2. Then cancel any number that divides the top and bottom: (−6 ± 2√5) ÷ 2 = −3 ± √5. For a negative discriminant, √−16 = √16 × √−1 = 4i.

Inequalities

To solve 2x² − 4x − 6 > 0, find the roots (−1 and 3). The parabola opens up, so it is above the x-axis outside the roots: x < −1 or x > 3, which is (−∞, −1) ∪ (3, ∞) in interval notation. For < 0 it is between them: −1 < x < 3. Use ≥ or ≤ to include the roots themselves (square brackets).

Typing an equation

  • x squared can be x^2, x² or x*x. Leave out the ×: 3x(x − 2) works.
  • Terms can be on both sides: 2x² − 4x = 6 becomes 2x² − 4x − 6 = 0.
  • Brackets are multiplied out: (x − 2)(x + 3) = 0 becomes x² + x − 6 = 0.
  • 1/2x² means one half times x². y = … and f(x) = … are solved where y = 0.
  • Any one letter works as the unknown, like t² + 2t = 8.

All answers are worked out exactly with whole numbers and fractions, so the surds and fractions shown are exact. Decimals are rounded to the places you choose.

Common questions

What is the quadratic formula?

For any equation ax² + bx + c = 0 with a not 0, x = (−b ± √(b² − 4ac)) / 2a. The ± gives two answers: one with plus and one with minus. For 2x² − 4x − 6 = 0, a = 2, b = −4 and c = −6, so x = (4 ± √64) / 4 = (4 ± 8) / 4, which gives x = 3 or x = −1.

What does the discriminant tell you?

The discriminant is b² − 4ac, the part under the square root. If it is positive there are two different real roots, and if it is also a perfect square (like 64 = 8²) they are whole numbers or fractions and the quadratic factors neatly. If it is 0 there is one repeated root. If it is negative there are no real roots, only two complex ones.

How do you find the vertex of a parabola?

The vertex is on the axis of symmetry, x = −b / 2a. Put that x back into the equation to get its height. For y = 2x² − 4x − 6, x = 4 / 4 = 1 and y = 2 − 4 − 6 = −8, so the vertex is (1, −8). Because a is positive the parabola opens up, so this is its lowest point.

How do you solve a quadratic by completing the square?

Divide by a, move the number to the right, then add (half the x coefficient)² to both sides so the left side becomes a perfect square. For 2x² − 4x − 6 = 0: x² − 2x = 3, add 1 to get (x − 1)² = 4, so x − 1 = ±2 and x = 3 or x = −1.

What are complex roots?

When the discriminant is negative, its square root is an imaginary number, written with i = √−1. For x² + 2x + 5 = 0 the discriminant is 4 − 20 = −16 and √−16 = 4i, so x = (−2 ± 4i) / 2 = −1 ± 2i. The graph never touches the x-axis.

Can I use fractions or decimals for a, b and c?

Yes. Type 3/4, −1 1/2 or 0.25 in any box. The calculator multiplies every term by the lowest common denominator first, which keeps the same roots. For 1/2x² + 1/3x − 1 = 0 it multiplies by 6 to get 3x² + 2x − 6 = 0, so x = (−1 ± √19) / 3.

Related calculators

Exponent calculatorPowers with negative and fractional exponents, exact huge numbers, find the exponent or base, nth roots as surds, logs and antilogs in any base, with steps.Fraction calculatorAdd, subtract, multiply, divide and simplify fractions, with steps.Scientific calculatorTrig, logs, powers, roots, factorials, nCr and nPr, memory and history, with degrees, radians or gradians and answers as fractions.LCM & HCF (GCF) calculatorLCM and HCF (GCF, GCD) of 2 to 100 numbers with prime factor trees, the ladder method, Euclid’s steps, fractions and word problems.

Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.

Embed this calculator on your site

Free to use on your website or blog. Paste this code where you want the calculator to appear. Please keep the credit link.

Quadratic formula calculator by Zulu Calculator ↗