The quadratic formula solves ( ax^2 + bx + c = 0 ): ( x = frac{-b pm sqrt{b^2 – 4ac}}{2a} ). The discriminant ( b^2 – 4ac ) gives the number of real solutions: two if positive, one if zero, none (two complex) if negative. Example: ( 2x^2 – 7x + 3 = 0 ) gives ( x = 3 ) or ( x = frac12 ).
The quadratic formula solves any quadratic equation ( ax^2 + bx + c = 0 ) with ( a neq 0 ):
$$x = frac{-b pm sqrt{b^2 - 4ac}}{2a}$$
The ( pm ) gives two solutions: one with plus, one with minus. Unlike factoring, the formula always works, whether the roots are whole numbers, irrational, or complex.
How to use the quadratic formula
- Write the equation in standard form, ( ax^2 + bx + c = 0 ), with zero on one side.
- Identify a, b and c, including their signs.
- Compute the discriminant ( b^2 – 4ac ).
- Substitute into the formula and simplify both roots.
Example 1: two rational roots
Solve ( 2x^2 – 7x + 3 = 0 ). Here ( a = 2 ), ( b = -7 ), ( c = 3 ).

$$x = frac{7 pm sqrt{49 - 24}}{4} = frac{7 pm 5}{4}$$
So ( x = frac{12}{4} = 3 ) or ( x = frac{2}{4} = frac12 ).
Example 2: irrational roots
Solve ( x^2 – 4x – 1 = 0 ): ( a = 1 ), ( b = -4 ), ( c = -1 ).
$$x = frac{4 pm sqrt{16 + 4}}{2} = frac{4 pm sqrt{20}}{2} = frac{4 pm 2sqrt5}{2} = 2 pm sqrt5$$
That’s ( x approx 4.236 ) and ( x approx -0.236 ).
Example 3: rearranging first
Solve ( 3x^2 = 5x + 2 ). Move everything to one side: ( 3x^2 – 5x – 2 = 0 ). Then
$$x = frac{5 pm sqrt{25 + 24}}{6} = frac{5 pm 7}{6}$$
so ( x = 2 ) or ( x = -frac13 ).
Example 4: complex roots
Solve ( x^2 + 2x + 5 = 0 ). The discriminant is ( 4 – 20 = -16 ), and ( sqrt{-16} = 4i ):
$$x = frac{-2 pm 4i}{2} = -1 pm 2i$$
The discriminant
The expression under the square root, ( Delta = b^2 – 4ac ), tells you what kind of roots to expect before you finish the calculation.

| Discriminant | Number and type of roots | Graph of ( y = ax^2 + bx + c ) |
|---|---|---|
| Positive perfect square | two rational roots | crosses the x-axis twice |
| Positive, not a perfect square | two irrational roots | crosses the x-axis twice |
| Zero | one repeated root, ( x = -frac{b}{2a} ) | touches the x-axis at the vertex |
| Negative | two complex roots | doesn’t meet the x-axis |
For example, ( x^2 – 6x + 9 = 0 ) has ( Delta = 36 – 36 = 0 ), so its only root is ( x = 3 ), and indeed it factors as ( (x – 3)^2 ).
Derivation: completing the square
Start with ( ax^2 + bx + c = 0 ) and divide by a:

$$x^2 + frac{b}{a}x = -frac{c}{a}$$
Add ( left( frac{b}{2a} right)^2 ) to both sides so the left side becomes a perfect square:
$$left( x + frac{b}{2a} right)^2 = frac{b^2}{4a^2} - frac{c}{a} = frac{b^2 - 4ac}{4a^2}$$
Take square roots of both sides:
$$x + frac{b}{2a} = pmfrac{sqrt{b^2 - 4ac}}{2a}$$
Subtract ( frac{b}{2a} ), and you have the quadratic formula.
Quadratic formula calculator
Enter a, b and c to see the discriminant, both roots, the factored form and the vertex.
Quadratic Formula Solver
Solves \(ax^2 + bx + c = 0\): discriminant, roots (real or complex), vertex and factored form.
The full-page quadratic formula calculator has more examples.
Quadratic functions and their graphs: the parabola
A quadratic function is ( f(x) = ax^2 + bx + c ) with ( a neq 0 ). Its graph is a parabola.
- It opens up if ( a > 0 ) and down if ( a < 0 ).
- The roots are its x-intercepts, and c is its y-intercept.
- The vertex is at ( x = -frac{b}{2a} ), exactly halfway between the roots. It’s the minimum point when ( a > 0 ) and the maximum when ( a < 0 ).
- The axis of symmetry is the vertical line through the vertex.
In vertex form, ( y = a(x – h)^2 + k ), the vertex ( (h, k) ) can be read off directly.
Example 5: maximum height
A ball’s height is ( h(t) = -5t^2 + 20t + 1 ) metres. The vertex is at ( t = -frac{20}{2(-5)} = 2 ) s, and ( h(2) = -20 + 40 + 1 = 21 ) m, the maximum height. It lands when ( h(t) = 0 ):
$$t = frac{-20 pm sqrt{400 + 20}}{-10} approx 4.05 text{ s}$$
(the other root is negative). This is projectile motion in one dimension.
Other ways to solve quadratics
| Method | Best when |
|---|---|
| Factoring | the roots are small whole numbers or simple fractions |
| Square roots | there’s no x term: ( x^2 = 9 Rightarrow x = pm3 ) |
| Completing the square | you need vertex form |
| Quadratic formula | always works; use it when factoring isn’t quick |
Quadratics in calculus
Quadratics turn up constantly. Setting the derivative of a cubic to zero gives a quadratic, so finding critical points of ( f(x) = x^3 – 6x^2 + 9x ) means solving ( 3x^2 – 12x + 9 = 0 ), which gives ( x = 1 ) and ( x = 3 ). Quadratics that don’t factor also decide how partial fractions are set up. For higher-degree equations, see polynomials.
Common mistakes
- Sign of b. If ( b = -7 ), then ( -b = 7 ) and ( b^2 = 49 ).
- Partial division. The ( 2a ) divides the whole numerator, ( -b pm sqrt{Delta} ), not just the root.
- Not setting the equation to zero first. You can’t read off c from ( x^2 + 3x = 10 ) until it’s ( x^2 + 3x – 10 = 0 ).
- Simplifying radicals incorrectly. ( frac{4 pm 2sqrt5}{2} = 2 pm sqrt5 ); divide every term by 2.
- Calling negative-discriminant equations unsolvable. They have no real roots, but they do have complex ones.
Practice problems
Solve each equation.
- ( x^2 – 5x + 6 = 0 )
- ( x^2 + 4x – 21 = 0 )
- ( 2x^2 + 3x – 2 = 0 )
- ( x^2 – 2x – 2 = 0 )
- ( x^2 + 4x + 13 = 0 )
- Find the discriminant of ( 4x^2 – 12x + 9 = 0 ) and describe the roots.
Answers: (1) 2, 3; (2) 3, −7; (3) ( frac12 ), −2; (4) ( 1 pm sqrt3 ); (5) ( -2 pm 3i ); (6) 0, one repeated root ( x = frac32 ).
Quadratic equation MCQs
Test yourself; answers are below.
- The roots of ( x^2 – 7x + 12 = 0 ) are: (a) 3, 4 (b) −3, −4 (c) 2, 6 (d) 1, 12
- The discriminant of ( 2x^2 + 3x + 5 = 0 ) is: (a) 49 (b) −31 (c) 31 (d) −49
- ( x^2 + 6x + 9 = 0 ) has: (a) two distinct real roots (b) one repeated root (c) no real roots (d) three roots
- The sum of the roots of ( 3x^2 – 12x + 5 = 0 ) is: (a) −4 (b) 4 (c) ( frac53 ) (d) 12
- The vertex of ( y = x^2 – 4x + 1 ) is at: (a) ( (2, -3) ) (b) ( (-2, 13) ) (c) ( (4, 1) ) (d) ( (2, 3) )
- For which k does ( x^2 + kx + 16 = 0 ) have equal roots? (a) ( pm4 ) (b) ( pm8 ) (c) 16 (d) 0
Answers: (1) a; (2) b, since ( 9 – 40 = -31 ); (3) b, since ( Delta = 0 ); (4) b, since the sum of roots is ( -frac{b}{a} = 4 ); (5) a; (6) b, since ( k^2 – 64 = 0 ).
The sum and product shortcuts in questions 4 and 6 come from Vieta’s formulas: for ( ax^2 + bx + c = 0 ), the roots add to ( -frac{b}{a} ) and multiply to ( frac{c}{a} ).
FAQ
What is the quadratic formula?
( x = frac{-b pm sqrt{b^2 – 4ac}}{2a} ). It gives the solutions of ( ax^2 + bx + c = 0 ).
What is the discriminant?
( b^2 – 4ac ). It tells you whether a quadratic has two real roots, one repeated root, or two complex roots.
When should I use the quadratic formula instead of factoring?
Whenever the equation doesn’t factor quickly. The formula always works; factoring is just faster when it’s easy.
What is a quadratic equation?
An equation in which the highest power of the unknown is 2, such as ( 3x^2 – x + 4 = 0 ).
How do you find the vertex of a quadratic?
Use ( x = -frac{b}{2a} ), then substitute that x into the equation to find y.
Further reading
- Quadratic formula (Wikipedia) — derivations, history and the formula’s geometric meaning.
- Solving Quadratic Equations, Part II (Paul’s Online Math Notes) — completing the square, the quadratic formula and the discriminant.
- Parabolas (Paul’s Online Math Notes) — graphing quadratics, vertex form and intercepts.
Calculators for this topic
Keep learning
The Unit Circle: Angles, Coordinates and Trig Values
The unit circle explained: why the coordinates are cos and sin, every special angle in degrees and radians, tangent on the unit circle, and memory tricks.
Trigonometric Functions: Sin, Cos, Tan, Table and Graphs
The six trig functions with SOH-CAH-TOA and the unit circle, a table of exact values (sin 30, cos 180, sec 45), graphs, period and amplitude.

