Skip to content
Math guide

How to Use the Quadratic Formula

Where the quadratic formula comes from, how to apply it without sign errors and how to read the roots in real problems, from a garden plot to a ball thrown in the air.

How to Use the Quadratic Formula

The quadratic formula is the one tool that solves every equation of the form ax² + bx + c = 0, whether or not it factors nicely. It shows up in school algebra, but also whenever something follows a curved path or an area depends on a length squared. This guide explains where the formula comes from, how to apply it without sign errors and how to read the answers in real problems.

What makes an equation quadratic

An equation is quadratic when the highest power of the unknown is 2. Before you solve it, write it in standard form, with everything on one side and zero on the other:

ax² + bx + c = 0

Here a, b and c are numbers and a is not zero. Getting this step right is half the work. For example, x(x + 4) = 96 is quadratic, but you only see the coefficients after expanding and moving 96 across: x² + 4x − 96 = 0, so a = 1, b = 4 and c = −96.

Where the formula comes from

The formula is what you get when you solve the general equation by completing the square:

  1. Divide by a: x² + (b/a)x + c/a = 0.
  2. Move the constant: x² + (b/a)x = −c/a.
  3. Add (b/2a)² to both sides so the left side becomes a perfect square: (x + b/2a)² = (b² − 4ac) / 4a².
  4. Take the square root of both sides: x + b/2a = ±√(b² − 4ac) / 2a.
  5. Subtract b/2a: x = (−b ± √(b² − 4ac)) / 2a.

The ± gives two answers, the 2a divides the whole numerator, and the expression under the root, b² − 4ac, is the discriminant that decides what kind of answers you get.

Three ways to solve, and when to use each

  • Factoring is fastest when the numbers are small and the roots are whole numbers or simple fractions: x² − 5x + 6 = (x − 3)(x − 2), so x = 3 or x = 2.
  • Completing the square is useful when you also want the vertex form of a parabola.
  • The quadratic formula always works, including for decimal coefficients and equations with no real roots. When factoring is not obvious within a few seconds, go straight to the formula.

Worked example 1: a garden plot

A rectangular garden is 4 m longer than it is wide and has an area of 96 m². How wide is it?

Let the width be x. Then x(x + 4) = 96, which becomes x² + 4x − 96 = 0.

  1. Coefficients: a = 1, b = 4, c = −96.
  2. Discriminant: 4² − 4 × 1 × (−96) = 16 + 384 = 400.
  3. √400 = 20.
  4. x = (−4 + 20) / 2 = 8 or x = (−4 − 20) / 2 = −12.

A width cannot be negative, so the garden is 8 m wide and 12 m long. The equation also factors as (x − 8)(x + 12), which confirms the result.

Worked example 2: a ball thrown upward

A ball is thrown straight up at 20 m/s from a height of 1.5 m. Ignoring air resistance, its height in meters after t seconds is roughly:

h = −4.9t² + 20t + 1.5

The −4.9 comes from half of gravity's acceleration, about 9.8 m/s².

When does it hit the ground? Set h = 0: a = −4.9, b = 20, c = 1.5.

  1. Discriminant: 20² − 4 × (−4.9) × 1.5 = 400 + 29.4 = 429.4.
  2. Roots: t ≈ 4.155 and t ≈ −0.074.
  3. Time cannot be negative here, so the ball lands after about 4.16 seconds.

How high does it go? The highest point is the vertex. Its time is −b / 2a = −20 / (−9.8) ≈ 2.04 s, and the height there is about 21.91 m.

When is it 10 m above the ground? Set h = 10 and move it across: −4.9t² + 20t − 8.5 = 0. The discriminant is 233.4, and the roots are t ≈ 0.48 s and t ≈ 3.60 s. Both make sense: once on the way up, once on the way down.

Line chart of the ball's height over time, rising from 1.5 m to a peak of about 21.9 m at 2 seconds and returning to the ground after about 4.16 seconds
h = −4.9t² + 20t + 1.5: the roots are where the curve meets the ground

The chart shows what the algebra means: the roots are where the parabola crosses the horizontal axis, and the vertex is its peak. Because a is negative, the curve opens downward.

Reading the discriminant

The discriminant tells you what to expect before you finish the calculation:

  • Positive: two different real roots. The parabola crosses the x-axis twice, like the ball's path.
  • Zero: one repeated root. The vertex just touches the axis, as in x² − 6x + 9 = (x − 3)².
  • Negative: no real roots, only a pair of complex ones. For x² + x + 1 = 0 the discriminant is −3 and the roots are −0.5 ± 0.866i. In a word problem this usually means the situation never happens, for example a ball that never reaches a certain height.

Using the Quadratic Formula Calculator

The Quadratic Formula Calculator asks only for a, b and c. Enter 0 for a missing term and remember to include minus signs. It returns the discriminant, the real or complex roots, the vertex, the axis of symmetry, the direction the parabola opens, the y-intercept and, when the roots are rational, the factored form. A step-by-step panel shows the substitution, which is handy for checking homework done by hand.

Common mistakes

  • Not using standard form. Solve x² + 4x = 96 only after moving 96 to the left. Otherwise c is wrong.
  • Dropping a negative sign. If b = −6, then −b is +6 and b² is +36. Writing the substitution with brackets, like (−6)², avoids this.
  • Dividing only part of the top by 2a. Both −b and the square root are divided by 2a.
  • Forgetting the second root. The ± always gives two values unless the discriminant is zero.
  • Keeping impossible answers. Negative widths or times usually need to be discarded, but say why.

FAQ

Do I need the formula if the equation factors?

No. If you can spot the factors quickly, factoring is faster and less error-prone. The formula is the safe fallback that always works, and it is a good way to check factored answers.

Can I use the formula when b or c is zero?

Yes. Just enter 0 for the missing coefficient. For x² − 9 = 0, b is 0 and the formula gives x = ±3. You could also solve it directly by taking the square root.

What if my equation has fractions?

You can use the fractions as they are, or multiply every term by a common denominator first to get whole numbers. Both give the same roots, because multiplying the whole equation by a nonzero number does not change its solutions.

Why do word problems often have one answer that does not fit?

The equation describes the math of the situation, not its real-world limits. A negative length or a time before the start is a valid solution of the equation but not of the problem, so you choose the root that fits the context.

Related tools