Sizely
Quadratic Formula Calculator

Quadratic Formula Calculator

Quadratic formula calculator: enter a, b and c to solve ax² + bx + c = 0 for real or complex roots in a ± bi form. Learn what the discriminant tells you.

Nella Cheng

Written by

Nella Cheng

Updated

There was an error with your calculation.

ax2+bx+c=0

x =

-

6

11

±

√19i

11

or -0.54545 ± 0.39626i

Quadratic formula calculator at a glance#

What is the quadratic formula?#

The quadratic formula is used to solve any equation that takes the form ax² + bx + c = 0, where a is not equal to 0: x = (−b ± √(b² − 4ac)) ÷ (2a). The ± symbol provides two outcomes, one with addition and one with subtraction. These outcomes are referred to as the roots, which are the values of x that satisfy the equation.

How do you use the calculator?#

To use the calculator, start by writing the equation in the form ax² + bx + c = 0. Enter the values for a, b, and c, making sure to include their signs. The calculator will then provide the roots. It will display two real roots, or one repeated root, as decimals rounded to five places. When roots are complex, it shows them as decimals in a ± bi form, such as 1 ± 1.41421i, usually next to an exact form like 1 ± √2 i. When b² − 4ac is a negative perfect square, as in x² + 4 = 0, the exact form needs no root sign: 0 ± 2i.

What are the roots of 2x² + 17x + 39 = 0?#

Here, a = 2, b = 17 and c = 39. The part of the formula under the square root, 17² − 4 × 2 × 39 = 289 − 312 = −23, is negative. As a result, the roots are complex: x = (−17 ± √23 i) ÷ 4, which is approximately −4.25 ± 1.19896i.

What the quadratic formula solves#

A quadratic equation has x² as its highest power. In standard form it's ax² + bx + c = 0, where a is the number in front of x², b is the number in front of x, and c is the constant. The example on this page is 2x² − 4x − 6 = 0, so a = 2, b = −4 and c = −6.

Every quadratic also describes a curve. Graph y = 2x² − 4x − 6 and you get a U-shaped parabola. The roots of the equation are the places where that curve crosses the x-axis, because those are the points where y = 0. This one crosses at x = −1 and x = 3, and its lowest point, the vertex, is at (1, −8).

Graph of the parabola y = 2x² − 4x − 6 crossing the x-axis at the roots x = −1 and x = 3, with its vertex at (1, −8). With a = 2, b = −4 and c = −6, b² − 4ac = 64 and x = (4 ± 8) ÷ 4
The roots are where the parabola crosses the x-axis.

How to use the quadratic formula, step by step#

OpenStax Elementary Algebra 2e gives the formula as x = (−b ± √(b² − 4ac)) ÷ (2a) for any ax² + bx + c = 0 with a ≠ 0. For 2x² − 4x − 6 = 0:

  1. Identify the coefficients with their signs: a = 2, b = −4, c = −6.
  2. Work out the discriminant: b² − 4ac = (−4)² − 4 × 2 × (−6) = 16 + 48 = 64.
  3. Take the square root: √64 = 8. The square root calculator handles roots that aren't whole numbers.
  4. Fill in the formula: x = (4 ± 8) ÷ 4, since −b = 4 and 2a = 4.
  5. Split the ±: x = (4 + 8) ÷ 4 = 3, and x = (4 − 8) ÷ 4 = −1.

Check each root by putting it back into the equation, by hand or in the math equation solver. For x = 3, 2 × 9 − 12 − 6 = 0. For x = −1, 2 × 1 + 4 − 6 = 0. A faster check uses the sum and product of the roots, which always equal −b ÷ a and c ÷ a. Here 3 + (−1) = 2 = 4 ÷ 2, and 3 × (−1) = −3 = −6 ÷ 2.

The most common slip is the sign of b. With b = −4, −b is +4, and b² is +16, not −16. Put negative numbers in parentheses before you square them.

What the discriminant tells you#

The discriminant is the component under the square root, b² − 4ac. It allows you to determine the number and type of roots before completing the solution. According to OpenStax, there are three scenarios:

  • If it's positive, you have two different real roots. The graph of the parabola intersects the x-axis at two points.
  • If it equals zero, there's one real root, repeated. The parabola just grazes the x-axis at its vertex.
  • If it's negative, there are no real roots since a negative value doesn't have a real square root. The parabola doesn't intersect the x-axis.

By altering only the value of c, you can observe all three cases. For example, 2x² − 4x − 6 = 0 has a discriminant of 64 and two roots: −1 and 3. Then, 2x² − 4x + 2 = 0 has a discriminant of 16 − 16 = 0 and has one root: x = 1. And 2x² − 4x + 6 = 0 has a discriminant of 16 − 48 = −32 and lacks any real roots.

Three parabolas y = 2x² − 4x + c: with c = −6 the discriminant is 64 and the curve crosses the x-axis twice, with c = 2 it is 0 and the curve touches once, with c = 6 it is −32 and the curve never reaches the x-axis
Raising c lifts the parabola and changes the number of real roots.

Since the calculator doesn't display the discriminant, you'll need to calculate it manually when required. For instance, with −7x² + 5x + 3 = 0, the discriminant is 5² − 4 × (−7) × 3 = 25 + 84 = 109.

Complex roots#

In cases where the discriminant is negative, the equation still has two roots, though they will be complex numbers. These use i, the imaginary unit, which is defined by i² = −1, so √(−32) = √32 × i = 4√2 i. According to OpenStax Intermediate Algebra 2e, a negative discriminant gives two complex solutions.

Take 2x² − 4x + 6 = 0 as an example: x = (4 ± 4√2 i) ÷ 4 = 1 ± √2 i, approximately 1 ± 1.41421i. The calculator shows both forms: 1 ± √2 i and 1 ± 1.41421i. When dealing with equations that have real coefficients, complex roots are always paired in this manner, sharing the same real part but having opposite imaginary parts.

Putting an equation in standard form first#

The formula only works when everything is on one side and the other side is 0. Move every term across, then combine like terms.

  • 2x² + 4 = 8x needs to become 2x² − 8x + 4 = 0. In this form, a = 2, b = −8, and c = 4. The roots then are 2 ± √2, which the calculator shows as 3.41421 and 0.58579.
  • With 5(x² − 8) − 9 = 6, it becomes 5x² − 40 − 9 − 6 = 0, or 5x² − 55 = 0. There's no x term here, so enter b = 0. The roots are ±√11, which is about ±3.31662.

If every coefficient shares a common factor, it's best to divide it out first to simplify the numbers. The equation 2x² − 4x − 6 = 0 has the same roots as x² − 2x − 3 = 0, and the GCF calculator identifies that factor.

Where quadratic equations come up#

Quadratic equations often appear in real-world scenarios, and projectile height is a classic application. OpenStax describes the height of an object shot upward in feet with the formula h = −16t² + v0t, where v0 is the starting speed in feet per second and t is the elapsed time in seconds. For instance, when a ball is thrown upward at 48 feet per second, its height is 32 feet when −16t² + 48t = 32 holds true, specifically −16t² + 48t − 32 = 0. The roots of these equations are t = 1 and t = 2, so the ball reaches 32 feet on the ascent after 1 second, and again on descent after 2.

Another common use is in solving area problems. A rectangle with a length 3 feet longer than its width has an area of 40 square feet, which gives the equation w(w + 3) = 40. This simplifies to w² + 3w − 40 = 0. The solutions are 5 and −8. Since a width can't be negative, the rectangle measures 5 feet by 8 feet.

Quadratic equations people search, solved#

The table puts equations gathered from real online searches into standard form, then lists both the discriminant and the exact roots. Decimals are rounded to five places to match the calculator.

Quadratic equations people search, solved
EquationStandard FormDiscriminantExact RootsDecimal Roots
2x² + 17x + 39 = 02x² + 17x + 39 = 0−23−17/4 ± (√23/4)i−4.25 ± 1.19896i
2x² + 11x + 19 = 02x² + 11x + 19 = 0−31−11/4 ± (√31/4)i−2.75 ± 1.39194i
4x² + 31 = −20x4x² + 20x + 31 = 0−96−5/2 ± (√6/2)i−2.5 ± 1.22474i
4x² = 17x − 194x² − 17x + 19 = 0−1517/8 ± (√15/8)i2.125 ± 0.48412i
2x² = 11x − 202x² − 11x + 20 = 0−3911/4 ± (√39/4)i2.75 ± 1.56125i
2x² + 4 = 8x2x² − 8x + 4 = 0322 ± √23.41421 and 0.58579
x² − 109 = −8xx² + 8x − 109 = 0500−4 ± 5√57.18034 and −15.18034
−7x² + 5x + 3 = 0−7x² + 5x + 3 = 01095/14 ± √109/14−0.38859 and 1.10288
5(x² − 8) − 9 = 65x² − 55 = 01,100±√113.31662 and −3.31662
2x² − 4x − 6 = 02x² − 4x − 6 = 0643 and −13 and −1

Sources#

Frequently asked questions#

Why can't a be 0?#

When a is 0, the x² term disappears and the equation simplifies to bx + c = 0. That's a linear equation rather than a quadratic one. The formula would also divide by 2a = 0, which is why the calculator requires a nonzero a.

Is the quadratic formula better than factoring?#

Factoring can be quicker when the numbers are favorable, such as in x² − 2x − 3 = (x − 3)(x + 1). However, the quadratic formula is reliable in all cases, even when the roots are irrational or complex and factoring with whole numbers isn't feasible.

Where does the quadratic formula come from?#

The formula is derived by completing the square on ax² + bx + c = 0. That means dividing by a, shifting c ÷ a to the opposite side, adding (b ÷ 2a)² to both sides to form a perfect square, and then taking the square root of both sides to solve for x.

What is the vertex of the parabola?#

The vertex is found halfway between the roots at x = −b ÷ (2a). For the equation 2x² − 4x − 6, that's x = 4 ÷ 4 = 1, and substituting 1 back in provides y = 2 − 4 − 6 = −8. So the vertex is at (1, −8).

How do you type the quadratic formula into a handheld calculator?#

To enter the quadratic formula in a calculator, enclose the entire numerator and denominator in parentheses: (−b + √(b² − 4ac)) ÷ (2a). Repeat the process with − instead of +. A common mistake is omitting the parentheses around 2a, causing the calculator to divide by 2 and then multiply by a.