Math

Quadratic formula calculator

A quadratic equation is any equation that can be written as ax² + bx + c = 0, where a is not zero. This quadratic formula calculator solves it with the quadratic formula, x = (−b ± √(b² − 4ac)) ÷ 2a, and shows the discriminant, both roots (real or complex), the vertex and the working.

Runs in your browser. Nothing you type is sent to us.

Roots

x₁ = 2, x₂ = 1

x² − 3x + 2 = 0

Discriminant (b² − 4ac)
1
Type of roots
Two real roots
x₁
2
x₂
1
Vertex
(1.5, -0.25)
Axis of symmetry
x = 1.5
y-intercept
2
Parabola opens
Upward

Working

StepValue
D = b² − 4ac(-3)² − 4 × 1 × 2 = 1
√D1
x = (−b ± √D) ÷ 2ax₁ = 2, x₂ = 1

Key facts

  • Quadratic formula: x = (−b ± √(b² − 4ac)) ÷ 2a.
  • The discriminant D = b² − 4ac decides the roots: D > 0 gives two real roots, D = 0 one repeated root, D < 0 two complex roots.
  • x² − 3x + 2 = 0 has roots x = 2 and x = 1.
  • The vertex of y = ax² + bx + c is at x = −b ÷ 2a.

What is a quadratic equation?

A quadratic equation is a polynomial equation of degree two: the highest power of x is 2. Its standard form is ax² + bx + c = 0, where a, b and c are numbers called coefficients and a ≠ 0. The solutions are called roots or zeros. On a graph, y = ax² + bx + c is a U-shaped curve called a parabola, and the roots are where it crosses the x-axis.

How to use the quadratic formula calculator

  1. Rearrange your equation into standard form so one side is zero. For example, 2x² = 5x − 3 becomes 2x² − 5x + 3 = 0.
  2. Enter a (the x² coefficient), b (the x coefficient) and c (the constant). If a term is missing, enter 0 for b or c.
  3. Read the roots, the discriminant, the vertex, the axis of symmetry and the step-by-step working.

The quadratic formula

x = (−b ± √(b² − 4ac)) ÷ 2aDiscriminant: D = b² − 4acVertex: (−b ÷ 2a, c − b² ÷ 4a)
SymbolMeaning
aCoefficient of x² (must not be 0)
bCoefficient of x
cConstant term
DDiscriminant, which tells you the type of roots
±Gives two solutions: one with +, one with −

What the discriminant tells you

DiscriminantRootsGraph
D > 0Two different real rootsParabola crosses the x-axis twice
D = 0One repeated real rootParabola touches the x-axis at its vertex
D < 0Two complex conjugate rootsParabola never touches the x-axis

Step-by-step examples: quadratic equations

Example 1: two real roots

Solve x² − 3x + 2 = 0. Here a = 1, b = −3, c = 2. D = (−3)² − 4 × 1 × 2 = 9 − 8 = 1. √D = 1. x = (3 ± 1) ÷ 2, so x = 2 or x = 1. Check: 2² − 3 × 2 + 2 = 0.

Example 2: tidy roots from larger coefficients

Solve 2x² + 4x − 6 = 0. D = 16 + 48 = 64 and √D = 8. x = (−4 ± 8) ÷ 4, so x = 1 or x = −3.

Example 3: complex roots

Solve x² + 2x + 5 = 0. D = 4 − 20 = −16, which is negative. √(−16) = 4i. x = (−2 ± 4i) ÷ 2, so x = −1 ± 2i.

Example 4: a thrown ball

A ball’s height in metres after t seconds is h = −4.9t² + 15t + 2. It lands when h = 0. With a = −4.9, b = 15, c = 2: D = 225 + 39.2 = 264.2, √D ≈ 16.254. The positive root is t = (−15 − 16.254) ÷ (−9.8) ≈ 3.19 seconds.

Other ways to solve a quadratic

  • Factoring: x² − 3x + 2 = (x − 1)(x − 2). Fast when the roots are whole numbers.
  • Completing the square: rewrite as a(x − h)² + k = 0. This is how the quadratic formula is derived.
  • Graphing: read the x-intercepts from a plot. Good for estimates.

The quadratic formula always works, which is why calculators use it.

Useful facts about the roots

For roots x₁ and x₂, their sum is −b ÷ a and their product is c ÷ a (Vieta’s formulas). In example 1, the sum is 3 and the product is 2. These give a quick check of any answer.

Pitfalls with quadratic equations

  • Not moving everything to one side first.
  • Sign errors with −b. If b is −3, then −b is +3.
  • Dividing only part of the numerator by 2a. The whole expression −b ± √D is divided by 2a.
  • Squaring a negative b incorrectly. (−3)² is 9, not −9.

Four thousand years of quadratic equations

Babylonian scribes solved problems equivalent to quadratic equations around 2000 to 1600 BCE, usually about areas and sides of fields, using recipes that amount to completing the square. The Indian mathematician Brahmagupta gave an explicit rule in the *Brāhmasphuṭasiddhānta* (628 CE) and accepted negative solutions. Around 820 CE in Baghdad, Muhammad ibn Musa al-Khwarizmi wrote *The Compendious Book on Calculation by Completion and Balancing*, whose Arabic title gave us the word algebra (*al-jabr*) and whose author’s name gave us "algorithm". The formula in its modern symbolic form became standard after René Descartes published *La Géométrie* in 1637.

Quadratics describe projectile paths, the shape of satellite dishes, profit curves and areas. In US high schools, Common Core standard A-REI.B.4 asks students to solve quadratics by inspection, square roots, completing the square, the quadratic formula and factoring. In 2019 Po-Shen Loh of Carnegie Mellon University popularized a method based on the sum and product of roots that avoids memorizing the formula. Solutions of quadratic inequalities, such as x² − 4 < 0, are written in interval notation, here (−2, 2). To see the parabola’s turning point, use the vertex form calculator; for the nature of the roots alone, the discriminant calculator; and to factor when possible, the factoring trinomials calculator.

How this calculator works

  • Solves ax² + bx + c = 0 with x = (−b ± √(b² − 4ac)) ÷ 2a.
  • Rational roots are shown exactly; others as decimals, or as complex numbers when the discriminant is negative.
  • Also shows the vertex (−b/2a, f(−b/2a)), axis of symmetry, y-intercept and whether the parabola opens up or down.
  • a = 0 is rejected because the equation is then linear.

Frequently asked questions

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) ÷ 2a. It gives the solutions of any equation of the form ax² + bx + c = 0 with a ≠ 0.

What is the discriminant?

The discriminant is b² − 4ac, the part under the square root. It tells you whether the equation has two real roots, one repeated root or two complex roots.

Can a quadratic equation have no solution?

It always has two solutions in the complex numbers, counting a repeated root twice. If the discriminant is negative, it has no real solutions.

How do I solve x² − 5x + 6 = 0?

Using the formula with a = 1, b = −5, c = 6: D = 25 − 24 = 1, so x = (5 ± 1) ÷ 2, giving x = 3 or x = 2. It also factors as (x − 2)(x − 3) = 0.

What if a = 0?

Then the equation is linear, bx + c = 0, with the single solution x = −c ÷ b. The calculator handles this case and tells you.

What does the vertex mean?

The vertex is the highest or lowest point of the parabola. Its x-coordinate is −b ÷ 2a. If a is positive the parabola opens upward and the vertex is a minimum.

How do I write imaginary roots?

Use i for √(−1). If D is negative, the roots are −b ÷ 2a ± (√(−D) ÷ 2a)i, a pair of complex conjugates.

Who discovered the quadratic formula?

Methods for solving quadratics go back to Babylonian mathematicians around 2000 BCE. Brahmagupta gave a general rule in 628 CE, and al-Khwarizmi described completing the square in the 9th century.

Sources

  1. OpenStax, College Algebra 2e
  2. Wolfram MathWorld, Quadratic Equation

Updated November 25, 2026. Formulas checked against published sources and worked examples.

Cite this page: CalcRoster. "Quadratic formula calculator." calcroster.com/quadratic-formula-calculator/. Updated November 25, 2026.

Results are estimates for general information. They are not financial, medical or legal advice. Check important decisions with a qualified professional.