Algebra & Equations

Quadratic Formula Calculator

This quadratic formula calculator, or quadratic equation solver, solves ax2+bx+c=0ax^2 + bx + c = 0 with x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

Try
Enter

Any non-zero number, decimal or fraction.

Enter 0 if there is no x term.

Enter 0 if there is no constant.

Result

Solutions: x = 0.6972243623, x = 4.302775638

Solutions

x1=5−132,x2=5+132x_1 = \frac{5 - \sqrt{13}}{2}, \quad x_2 = \frac{5 + \sqrt{13}}{2}

x = 0.6972243623, x = 4.302775638

Discriminant D
1313
Nature of the roots
Two distinct real roots
Decimal roots
x = 0.6972243623, x = 4.302775638
Vertex (turning point)Minimum point
(52,−134)\left(\frac{5}{2}, -\frac{13}{4}\right)
Axis of symmetry
x=52x = \frac{5}{2}
Sum of roots (−b/a)
55
Product of roots (c/a)
33
y-intercept
(0, 3)

The parabola crosses the x-axis at x ≈ 0.6972243623 and x ≈ 4.302775638. These are the two values of x that make the expression equal to zero.

Graph of y = x² - 5x + 3
0510−10123456xyParabolaReal roots
Step-by-step working (6 steps)
  1. Identify the coefficients

    Compare with ax2+bx+c=0ax^2 + bx + c = 0: a = 1, b = -5, c = 3.

    x2−5x+3=0x^{2} - 5x + 3 = 0
  2. Compute the discriminant

    D is positive, so there are two distinct real roots.

    D=b2−4ac=(−5)2−4(1)(3)=13D = b^2 - 4ac = \left(-5\right)^2 - 4\left(1\right)\left(3\right) = 13
  3. Simplify the square root

    Take square factors out of the root.

    13=13\sqrt{13} = \sqrt{13}
  4. Apply the quadratic formula

    x=−b±D2a=5±132⋅1x = \frac{-b \pm \sqrt{D}}{2a} = \frac{5 \pm \sqrt{13}}{2 \cdot 1}
  5. Simplify the two roots

    x1=5−132,x2=5+132x_1 = \frac{5 - \sqrt{13}}{2}, \quad x_2 = \frac{5 + \sqrt{13}}{2}
  6. Find the vertex

    The parabola opens upward, so the vertex is its minimum.

    xv=−b2a=52,yv=c−b24a=−134x_v = -\frac{b}{2a} = \frac{5}{2}, \quad y_v = c - \frac{b^2}{4a} = -\frac{13}{4}

Enter a, b and c for exact and decimal roots, the discriminant, vertex, graph and every step, complex roots included.

By Hira Noor, mathematicianLast reviewed Free, no sign-up, runs in your browserReport a problem

How to use this calculator

  1. Rewrite your equation in standard form so that one side is zero, for example 3x2=7x−23x^2 = 7x - 2 becomes 3x2−7x+2=03x^2 - 7x + 2 = 0. To skip the rearranging, choose The whole equation and type it as written. For equations that are not quadratic, use the equation solver.
  2. Enter the coefficient of x2x^2 as a, the coefficient of xx as b and the constant as c. Keep the signs: for x2−5x+3x^2 - 5x + 3, b is −5. Enter 0 for a missing term.
  3. Use decimals or fractions freely. Values such as 0.5 or 3/4 are treated exactly, so the roots stay exact too.
  4. Read the solutions at the top of the result, then open the step-by-step working to see the quadratic formula applied to your numbers.

Formulas

Quadratic formula

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Plain-text formula: x = (−b ± √(b^2 − 4ac))/(2a)

aa
coefficient of x2x^2 (not zero)
bb
coefficient of xx
cc
constant term

The quadratic formula gives both solutions of every quadratic equation with a≠0a \ne 0. The ± produces the two roots: one with plus, one with minus.

Discriminant

D=b2−4acD = b^2 - 4ac

Plain-text formula: D = b^2 − 4ac

The expression under the square root decides the type of roots: two real roots when D > 0, one repeated root when D = 0, and two complex conjugate roots when D < 0. The table below sets out the three cases.

Vertex of the parabola

(−b2a,;c−b24a)\left(-\frac{b}{2a},; c - \frac{b^2}{4a}\right)

Plain-text formula: (−b/(2a), ;c − b^2/(4a))

The turning point lies halfway between the roots. It is a minimum when a > 0 and a maximum when a < 0.

Reading the result

The solutions are the x-values where ax2+bx+cax^2 + bx + c equals zero, which are the points where the parabola y=ax2+bx+cy = ax^2 + bx + c crosses the x-axis. Exact forms such as 5+132\frac{5 + \sqrt{13}}{2} are best for further algebra; the decimals are what you would write for a measured or applied answer.

When the discriminant is negative, the roots are complex numbers of the form p±qip \pm qi. They are still valid solutions, but there is no point where the graph meets the x-axis. In applied problems such as projectile heights, that usually means the event never happens (the object never reaches that height).

The sum and product of the roots (−b/a-b/a and c/ac/a, from Vieta’s formulas) give a quick check: add or multiply your two answers and compare.

What the discriminant tells you

Before using the full quadratic formula, the discriminant D=b2−4acD = b^2 - 4ac tells you how many solutions to expect and what the graph looks like. Each example below is one of the presets above the calculator.

The three discriminant cases
DiscriminantRootsGraph of y = ax² + bx + cExample
D>0D > 0Two distinct real roots (rational when D is a perfect square)Crosses the x-axis twicex2−5x+6=0x^2 - 5x + 6 = 0: D = 1, x = 2 or x = 3
D=0D = 0One repeated real root, x=−b2ax = -\frac{b}{2a}Touches the x-axis at the vertexx2−6x+9=0x^2 - 6x + 9 = 0: D = 0, x = 3
D<0D < 0Two complex conjugate roots, no real rootsNever meets the x-axisx2+2x+5=0x^2 + 2x + 5 = 0: D = −16, x = −1 ± 2i

Where the quadratic formula comes from

The formula is what you get by completing the square on the general equation. Divide ax2+bx+c=0ax^2 + bx + c = 0 by a and move the constant across: x2+bax=−cax^2 + \frac{b}{a}x = -\frac{c}{a}.

Add (b2a)2\left(\frac{b}{2a}\right)^2 to both sides so the left side becomes a perfect square: (x+b2a)2=b2−4ac4a2\left(x + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}.

Take the square root of both sides, remembering ±: x+b2a=±b2−4ac2ax + \frac{b}{2a} = \pm\frac{\sqrt{b^2 - 4ac}}{2a}. Subtracting b2a\frac{b}{2a} gives x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

Other ways to solve a quadratic equation

Factoring is fastest when the roots are whole numbers or simple fractions: x2−5x+6=(x−2)(x−3)x^2 - 5x + 6 = (x - 2)(x - 3). The calculator shows a factored form whenever both roots are rational, and the factoring calculator shows the factoring steps.

Square roots work when there is no x term (b = 0): x2=7x^2 = 7 gives x=±7x = \pm\sqrt{7}.

Completing the square rewrites the equation as a(x−h)2+k=0a(x - h)^2 + k = 0, where (h,k)(h, k) is the vertex. It is the method the quadratic formula comes from, and it is useful for sketching graphs.

Graphing shows the real roots as x-intercepts. The graphing calculator plots the parabola and lists the intercepts automatically.

For a full walkthrough of choosing a method, read how to use the quadratic formula. The roots are also the boundary points of an inequality such as x2−5x+6<0x^2 - 5x + 6 < 0; see how to solve quadratic inequalities.

Solving a quadratic on a Casio or TI-84 calculator

Many scientific and graphing calculators have a built-in quadratic solver. Key sequences differ between models and operating system versions, so check your manual if a menu looks different.

Casio fx-991EX and other ClassWiz models: press MENU, choose Equation/Func, then Polynomial, then degree 2 (ax2+bx+cax^2 + bx + c). Enter a, b and c, pressing = after each, then keep pressing = to step through the roots and the vertex.

Casio fx-991ES PLUS: press MODE, choose EQN, then aX2+bX+c=0aX^2 + bX + c = 0. Enter the coefficients and press = to show X1, then = again for X2.

TI-84 Plus CE: open APPS, start PlySmlt2 and choose Poly Root Finder with degree 2, enter the coefficients and choose SOLVE. Without the app, graph Y1=ax2+bx+cY_1 = ax^2 + bx + c and use 2nd, CALC, zero to find each x-intercept.

A handheld gives the roots but not the working. Use this calculator when you need every step written out, the discriminant and vertex explained, or a graph next to the answer.

Worked example

Solve 2x² − 4x − 3 = 0 with the quadratic formula

Find the exact and decimal solutions.

  1. Coefficients: a = 2, b = −4, c = −3.
  2. Discriminant: D=(−4)2−4(2)(−3)=16+24=40D = (-4)^2 - 4(2)(-3) = 16 + 24 = 40, which is positive, so there are two real roots.
  3. Simplify the root: 40=4⋅10=210\sqrt{40} = \sqrt{4 \cdot 10} = 2\sqrt{10}.
  4. Quadratic formula: x=4±2104=2±102x = \frac{4 \pm 2\sqrt{10}}{4} = \frac{2 \pm \sqrt{10}}{2}.
  5. Decimals: 10≈3.1623\sqrt{10} \approx 3.1623, so x≈2.5811x \approx 2.5811 or x≈−0.5811x \approx -0.5811.

Answer: x=2+102≈2.5811x = \frac{2 + \sqrt{10}}{2} \approx 2.5811 and x=2−102≈−0.5811x = \frac{2 - \sqrt{10}}{2} \approx -0.5811. Check: their sum is 2 = −b/a and their product is −1.5 = c/a.

Frequently asked questions

What is the quadratic formula?

It is x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}, the general solution of ax2+bx+c=0ax^2 + bx + c = 0. Substitute the three coefficients and evaluate once with + and once with − to get both roots.

What if a is 0?

Then there is no x2x^2 term and the equation is linear, bx+c=0bx + c = 0, with the single solution x=−c/bx = -c/b. The quadratic formula would divide by zero, so the calculator asks for a non-zero a.

What does a negative discriminant mean?

There are no real solutions: the parabola does not cross the x-axis. The two solutions are complex conjugates, −b2a±4ac−b22ai-\frac{b}{2a} \pm \frac{\sqrt{4ac - b^2}}{2a}i, and the calculator shows them in that form.

Why are my roots shown with square roots instead of decimals?

Square roots of non-square numbers are irrational, so any decimal is an approximation. The exact form keeps full precision; the decimal values are listed underneath for convenience.

Can I enter fractions or decimals?

Yes. Type 3/4, 1 1/2 or 0.75. They are converted to exact fractions before solving, so 0.5x² + 0.25x − 1 = 0 gives exact roots rather than rounded ones.

Is a quadratic equation calculator the same as a quadratic formula calculator?

In practice, yes. Both solve ax2+bx+c=0ax^2 + bx + c = 0 from the three coefficients. This one applies the quadratic formula for every equation and also gives the factored form whenever the roots are rational.

Should I use the quadratic formula or factoring?

Factoring is quicker when the roots are whole numbers or simple fractions, which happens when the discriminant is a perfect square. The quadratic formula always works, including for irrational and complex roots.

How do I solve a quadratic on a Casio or TI-84 calculator?

On a Casio fx-991EX, use MENU, Equation/Func, Polynomial, degree 2; on an fx-991ES PLUS, use MODE, EQN, then the aX2+bX+c=0aX^2 + bX + c = 0 type. On a TI-84 Plus CE, open the PlySmlt2 app and choose Poly Root Finder with degree 2. The full key sequences are above.

How do I check my answer?

Substitute each root back into ax2+bx+cax^2 + bx + c; the result should be 0 (or extremely close for rounded decimals). You can also check that the roots add up to −b/a-b/a and multiply to c/ac/a.

Factoring Calculator

Factor a polynomial completely, with each step labeled by method and a check by expanding.

Algebra & Equations

Complex Number Calculator

Complex arithmetic, powers and roots with steps, in rectangular, polar and exponential form.

Algebra & Equations

Cubic Equation Solver

Exact and complex roots of ax³ + bx² + cx + d = 0 with the discriminant, steps and a root check.

Algebra & Equations

Polynomial Root Finder

All real and complex roots of a polynomial up to degree 10, with multiplicities, exact forms and steps.

Algebra & Equations

Inequality Calculator

Linear, compound, absolute-value, quadratic and rational inequalities solved step by step.

Algebra & Equations

Graphing Calculator

Plot functions, equations, inequalities, parametric and polar curves; find roots and intersections.

Tools

Learn more: For the quadratic formula worked by hand, read how to solve a quadratic equation. Why answers such as (5 ± √13)/2 stay exact: exact vs decimal answers.

Sources and further reading

  1. Quadratic Equations (Section 2.5), Algebra and Trigonometry 2e (opens in a new tab), OpenStax, Rice University
  2. NIST Digital Library of Mathematical Functions, §1.11 Zeros of Polynomials (opens in a new tab), National Institute of Standards and Technology

Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?