Quadratic Formula Calculator

x = (−b ± √(b² − 4ac)) / (2a). For ax² + bx + c = 0 with a ≠ 0, use both the plus and minus signs to find the roots.

Choose how to enter your equation. For coefficients, use ax² + bx + c = 0 with a nonzero a. Enter 0 for a missing term.

Try a worked example

Loads example values in place of your current inputs. Choose one, then calculate. Examples are hypothetical; your inputs stay in this browser.

  • Use a = 1, b = −3 and c = 2. D = 9 − 8 = 1; the roots are 1 and 2. The curve crosses the horizontal axis twice.
  • Use a = 1, b = 2 and c = 1. D = 4 − 4 = 0; both root fields show −1, one distinct solution. The curve touches the axis.
  • There is no x term, so b = 0. With a = 1 and c = 1, D = −4. The roots are +i and −i; there is no real-axis intersection.
  • Move the right-hand terms left: 2x² − 3x − 2 = 0. Enter a = 2, b = −3 and c = −2. D = 25; the roots are 2 and −0.5.
Number multiplying x². For x², enter 1; for −x², enter −1.
Number multiplying x, including its sign. No x term? Enter 0.
Constant after moving every term to the left of = 0.

About this tool

Enter coefficients for ax²+bx+c=0 to find two roots, the discriminant and the vertex. Negative discriminants produce complex roots rather than an error. A curve near the vertex supports visual checking alongside the substitution steps.

Enter an equation or its coefficients

  1. Choose Type or paste an equation to enter both sides, such as 2x² = 3x + 2. You can write x^2 instead of x², omit a coefficient of 1 and use decimals or fractions such as 1/2x². An expression on its own is set equal to zero. Expand any parentheses first.
  2. The calculation shows the normalized equation and the values of a, b and c after moving right-hand terms to the left. A quadratic term must remain after like terms combine. To enter the coefficients directly, use the following steps.
  3. Move every term to one side so the other side is zero. For 2x² = 3x + 2, use 2x² − 3x − 2 = 0.
  4. Enter a = 2, b = −3 and c = −2 for that example. A missing x term has b = 0; a missing constant has c = 0. A written x² has coefficient 1.
  5. Calculate, then read the discriminant and roots together. A repeated root appears in both result fields but is only one distinct solution.
  6. Check a real answer by substituting it into the original equation. Here x = 2 gives 8 = 8, and x = −0.5 gives 0.5 = 0.5.

How the calculation works

Discriminant D=b²−4ac. Roots=(-b±√D)/(2a). Vertex x=−b/(2a), y=c−b²/(4a). A numerically stable real-root computation reduces cancellation in the displayed answers.

Worked example

For x²−3x+2=0, D=1 and roots are 1 and 2. The vertex is (1.5, −0.25). For x²+1=0, the roots are +i and −i.

Three root cases, one formula

For real coefficients and a nonzero quadratic term. The graph shows real x and y values; complex roots are shown numerically.
Discriminant DWhat the roots meanExample
D > 0Two distinct real roots; the parabola crosses the horizontal axis twice.x² − 3x + 2 = 0: D = 1, roots 1 and 2.
D = 0One repeated real root; the vertex touches the horizontal axis.x² + 2x + 1 = 0: D = 0, root −1.
D < 0Two non-real complex conjugate roots; no real-axis intersection.x² + 1 = 0: D = −4, roots +i and −i.

Try the original equation before rearranging it

Open the example to enter 2x² = 3x + 2 as written. Calculate to see the normalized equation 2x² − 3x − 2 = 0, the discriminant of 25 and roots 2 and −0.5. Check the roots in the original equation. At x = 2 both sides give 8, and at x = -0.5 both sides give 0.5.

Load the equation 2x² = 3x + 2

Why the graph and the roots can look different

The plotted curve is a local view around the vertex, not an adjustable full graph. Read the root values directly even when an intercept is outside that window. A complex root is not an x-intercept on this real-coordinate graph.

Keep the entered coefficient signs. For b = −3, the numerator starts with −b = 3, while b² = 9. The substituted formula shows those parentheses so the sign change can be checked.

Assumptions and limitations

Coefficient a must be nonzero. Coefficients use floating-point arithmetic, so very close roots can lose precision. Radical-form output is the substituted formula, not a fully simplified symbolic expression.

Use the equation as written with all terms on one side. The plotted span is local to the vertex and is not an exhaustive graph of arbitrarily large coordinates.

Sources and editorial responsibility

Maintained by Renvoro Pty Ltd. Sources inform the methods and assumptions shown here; outputs have the limitations described on this page.

Common questions

What does the discriminant tell me?

For ax² + bx + c = 0, compute b² − 4ac. A positive value gives two real roots, zero gives a repeated real root and a negative value gives a complex conjugate pair.

Why is a zero leading coefficient rejected?

If a is zero, the equation is no longer quadratic. Solve the remaining linear equation when b is nonzero.

How do I find the vertex of a quadratic?

The vertex has x-coordinate −b/(2a). Substitute that value into the polynomial to find its y-coordinate.

Guide updated 2026-11-19. Calculation method and source dates remain separate.

Method reviewed 2026-10-13. Calculation standards · Report an issue