Skip to content
CalculatorAtlas

Quadratic Formula Calculator

Tested

Solve ax² + bx + c = 0, including complex roots.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

The quadratic formula solves ax² + bx + c = 0: the roots are x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 3x + 2 = 0 the discriminant is 9 − 8 = 1, the roots are 2 and 1, and the vertex is (1.5, −0.25).

Enter a, b and c. The calculator returns the roots, the discriminant and the vertex of the parabola.

Related tools: Slope Calculator: Slope, angle, distance and line equation through two points. LCM Calculator: Least common multiple of two or more numbers. Factor Calculator: List every factor of a positive whole number.

How to use the Quadratic Formula Calculator

  1. Enter a.
  2. Enter b.
  3. Enter c.
  4. Press Calculate to see the result, and use Reset to start again.
Inputs of the Quadratic Formula Calculator
InputWhat to enterAllowed values
aA number—
bA number—
cA number—

Formula and method

Formula

x = (−b ± √(b² − 4ac)) ÷ 2a

IEEE-754 double precision; shown to at most 6 decimal places.

The discriminant decides between two real roots, one repeated root or a complex-conjugate pair.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: a = 1; b = -3; c = 2.

Results of example 1
ResultValue
Rootsx = 2, x = 1
Discriminant1
Vertex(1.5, -0.25)

Example 2

Inputs: a = 1; b = 2; c = 1.

Results of example 2
ResultValue
Rootsx = -1
Discriminant0
Vertex(-1, 0)

Example 3

Inputs: a = 1; b = 0; c = 1.

Results of example 3
ResultValue
Rootsx = 0 + 1i, x = 0 − 1i
Discriminant-4
Vertex(0, 1)

The first line is the headline result (roots). Below it the quadratic Formula Calculator lists discriminant and vertex, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.

What the discriminant tells you

b² − 4ac > 0 gives two distinct real roots, = 0 gives one repeated root, and < 0 gives two complex roots (a pair of conjugates). Here the discriminant is 1, so there are two real roots, 2 and 1.

Vertex and checking

The vertex is at x = −b ÷ 2a = 1.5, where y = c − b² ÷ 4a = 2 − 9/4 = −0.25. Check a root by substituting it back: 2² − 3(2) + 2 = 0. The coefficient a cannot be 0, because the equation would then be linear.

How the result changes with a

Holding every other input at the first worked example, this table changes only a. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.

How the result changes with a
aRootsDiscriminantVertex
0.5x = 5.236068, x = 0.7639325(3, -2.5)
1x = 2, x = 11(1.5, -0.25)
2x = 0.75 + 0.661438i, x = 0.75 − 0.661438i-7(0.75, 0.875)
4x = 0.375 + 0.599479i, x = 0.375 − 0.599479i-23(0.375, 1.4375)

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • a: entering "0" shows "a must not be 0 for a quadratic." beside that field and no result.

Choosing between the Quadratic Formula Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Quadratic Formula Calculator and similar calculators
CalculatorYou enterIt returns
[Slope Calculator](/math/slope-calculator/)x₁, y₁ and x₂Slope
[LCM Calculator](/math/lcm-calculator/)numbersLeast common multiple
[Factor Calculator](/math/factor-calculator/)numberFactors
[Log Calculator](/math/log-calculator/)number x and base blog base 2 of 8
[GCF Calculator](/math/gcf-calculator/)numbersGreatest common factor

Background: algebra

Many algebra calculators rest on the same ideas: write the problem in a standard form, identify the coefficients, apply the formula and check the answer by substituting it back. For a quadratic ax² + bx + c = 0 the roots are (−b ± √(b² − 4ac)) ÷ 2a, and the discriminant b² − 4ac decides the kind of roots: positive gives two real roots, zero gives one repeated root and negative gives two complex conjugate roots.

If a = 0 the equation is linear, not quadratic. A sign slip on the −b term shifts both roots by the same amount, so substitute your roots back to check.

Assumptions and limitations

  • a ≠ 0
  • Negative discriminant gives complex roots

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for a to confirm this.

Frequently asked questions

What if a is zero?

The equation is linear, not quadratic, and is rejected.

Can the roots be complex?

Yes, when the discriminant is negative.

Can I factor instead?

If the discriminant is a perfect square the roots are rational and the quadratic factors.

What does the Quadratic Formula Calculator calculate?

Solve ax² + bx + c = 0, including complex roots. It returns Roots, Discriminant and Vertex.

What formula does the Quadratic Formula Calculator use?

x = (−b ± √(b² − 4ac)) ÷ 2a. The discriminant decides between two real roots, one repeated root or a complex-conjugate pair.

What do I need to enter in the quadratic Formula Calculator?

You enter a, b and c.

How is the result rounded or limited?

IEEE-754 double precision; shown to at most 6 decimal places. a ≠ 0.

What are the limits of this calculator?

a ≠ 0. Negative discriminant gives complex roots.

What is an example of a quadratic Formula result?

With a 1, b -3 and c 2, the roots is x = 2, x = 1.

Sources

  • OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.