Quadratic Equation Solver

A quadratic equation ax² + bx + c = 0 is solved with the quadratic formula x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 3x + 2 = 0 the discriminant is 1 and the roots are x = 2 and x = 1.

Last updated · By · Runs in your browser, nothing is uploaded

Result

Step-by-Step Solution

Enter your values above to see the full working.

What Is a Quadratic Equation?

A quadratic equation is a polynomial equation of degree two, written in standard form as ax² + bx + c = 0, where a, b and c are numbers and a is not zero. Its graph is a parabola, and the solutions, called roots or zeros, are the x-values where the parabola crosses the x-axis.

Quadratics appear whenever a quantity depends on a square: the height of a thrown ball, the area of a rectangle with a fixed perimeter, the profit from a price that affects demand. Solving one tells you when the ball lands, which dimensions give a target area or what price breaks even.

The Discriminant Tells You the Type of Roots

Discriminant D = b² − 4acNumber and type of rootsParabolaExample
D > 0Two different real rootsCrosses the x-axis twicex² − 3x + 2 (D = 1)
D = 0One repeated real rootTouches the x-axis oncex² − 6x + 9 (D = 0)
D < 0Two complex roots (conjugates)Never reaches the x-axisx² + 2x + 5 (D = −16)

The Quadratic Formula

x = ( −b ± √(b² − 4ac) ) ÷ 2a D = b² − 4ac Sum of roots = −b ÷ a Product of roots = c ÷ a
  • a is the coefficient of x². It must not be zero, otherwise the equation is linear.
  • b is the coefficient of x.
  • c is the constant term.
  • The ± sign produces the two roots: one using plus, one using minus.
  • The sum and product relationships give a quick check on your answers.

The formula comes from completing the square on the general equation. If the quadratic factors nicely, the factoring calculator is a faster route.

How Is It Calculated? Worked Examples

x² − 3x + 2 = 0

  1. Identify a = 1, b = −3 and c = 2.
  2. Discriminant: (−3)² − 4 × 1 × 2 = 9 − 8 = 1.
  3. √1 = 1, so x = (3 ± 1) ÷ 2.
  4. x₁ = (3 + 1) ÷ 2 = 2 and x₂ = (3 − 1) ÷ 2 = 1.
  5. Check: sum = 3 = −b ÷ a ✓ and product = 2 = c ÷ a ✓.

The Three Cases

EquationDRoots
2x² + 4x − 6 = 064x = 1 and x = −3
x² − 6x + 9 = 00x = 3 (repeated)
x² + 2x + 5 = 0−16x = −1 + 2i and x = −1 − 2i

A Ball Thrown Upward

A ball is thrown from a height of 2 m, so its height after t seconds is h = −4.9t² + 14.7t + 2. When does it hit the ground (h = 0)?

  1. a = −4.9, b = 14.7, c = 2.
  2. D = 14.7² − 4(−4.9)(2) = 216.09 + 39.2 = 255.29, and √D = 15.978.
  3. t = (−14.7 ± 15.978) ÷ (−9.8), giving t = −0.130 or t = 3.130.
  4. Time cannot be negative, so the ball lands after about 3.13 seconds.

How to Use This Quadratic Equation Solver

  1. Rewrite your equation in the form ax² + bx + c = 0, moving every term to one side.
  2. Enter the coefficients a, b and c. Include the signs, and use 0 for a missing term.
  3. Read the discriminant and the roots (real or complex). The steps show each substitution.

For the minimum or maximum point of the same parabola, use the vertex of a parabola calculator. For equations with an x³ term, see the cubic equation solver.

Where Quadratic Equations Are Used

  • Physics: projectile motion, falling objects and braking distances.
  • Geometry: finding side lengths from an area, or using the Pythagorean theorem.
  • Business and economics: maximising profit or revenue when price affects demand.
  • Engineering: parabolic reflectors, bridge cables and vibration problems.
  • Computer graphics: ray–sphere intersection reduces to a quadratic.
  • Finance: solving for an interest rate in two-period problems.

What Are the Most Common Mistakes With the Quadratic Equation Solver?

  • Setting a = 0. Then the equation is linear, not quadratic. Use the linear equation solver.
  • Wrong sign for b. In x² − 3x + 2, b is −3, so −b = +3.
  • Not moving everything to one side. The equation must equal zero before you read off the coefficients.
  • Dividing only part of the numerator by 2a. The whole of −b ± √D is divided by 2a.
  • Dropping a root. There are two roots, even when they are equal, and you must decide which are physically meaningful.
  • Ignoring complex roots. A negative discriminant does not mean “no solution”. It means the solutions are complex, though there are no real x-intercepts.

Where Can You Verify These Formulas?

The definitions and formulas on this page follow standard references. Check them against these sources:

Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.

Frequently Asked Questions

What is the quadratic formula?

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

What does the discriminant tell you?

The sign of b² − 4ac shows the root type: positive gives two real roots, zero gives one repeated real root, and negative gives two complex roots.

How do I solve a quadratic with complex roots?

Use the same formula. When the discriminant is negative, its square root is imaginary, so the roots are of the form p ± qi. For x² + 2x + 5 they are −1 ± 2i.

Can a quadratic equation have only one solution?

Yes, when the discriminant is zero. The parabola just touches the x-axis and the single root is repeated, as in x² − 6x + 9 = 0 with x = 3.

When should I use factoring instead of the formula?

Factoring is quicker when the roots are simple numbers. The quadratic formula always works, including when factoring is not possible with whole numbers.

How do I check my answers?

Substitute each root back into the equation, or check that the roots add up to −b ÷ a and multiply to c ÷ a.