A quadratic equation solver finds the values of x that make ax² + bx + c = 0 true. Enter the three coefficients a, b and c, and this free quadratic equation solver uses the quadratic formula to give the roots, whether they are two real numbers, one repeated root or a pair of complex numbers. It also shows the discriminant, the vertex of the parabola, its axis of symmetry and the step-by-step working.
The quadratic formula
For any quadratic equation ax² + bx + c = 0 with a not equal to 0, the roots are:
x = (−b ± √(b² − 4ac)) ÷ 2a
The plus–minus sign means there are usually two answers: one using + and one using −. The roots are also called the zeros or solutions of the equation. Other methods, such as completing the square, give the same solutions; in fact the quadratic formula is derived by completing the square on the general equation.
The discriminant: how many roots?
The part under the square root, Δ = b² − 4ac, is called the discriminant. When a, b and c are real numbers, it tells you what kind of roots to expect before you finish the calculation:
- Δ greater than 0: two different real roots.
- Δ equal to 0: one repeated real root.
- Δ less than 0: no real roots, but two complex roots that are complex conjugates of each other, such as −1 + 2i and −1 − 2i.
How to use the quadratic equation solver
- Write your equation in standard form, with everything on one side and 0 on the other, then read off a, b and c. For 2x² = 3x − 1, rearrange to 2x² − 3x + 1 = 0, so a = 2, b = −3 and c = 1.
- Enter a, b and c. Use a minus sign for negative numbers. Decimals work, and if a term is missing its coefficient is 0.
- Press Solve. The roots appear with the discriminant, the vertex, the axis of symmetry and the y-intercept.
The grey numbers in the boxes show an example, x² − 3x + 2 = 0; type your own values over them.
Worked examples
Two real roots
For x² − 3x + 2 = 0, a = 1, b = −3 and c = 2. The discriminant is (−3)² − 4 × 1 × 2 = 9 − 8 = 1, which is positive, so there are two real roots: x = (3 ± 1) ÷ 2, giving x = 1 and x = 2. The parabola's vertex is at (1.5, −0.25).
Fractions work too: for ½x² − 3x + 5/2 = 0, enter a = 0.5, b = −3 and c = 2.5. The roots are x = 1 and x = 5, the two points where the graph crosses the x-axis.
One repeated root
For x² − 6x + 9 = 0, the discriminant is 36 − 36 = 0, so there is one repeated root, x = 3. The parabola just touches the x-axis at its vertex, (3, 0).
Complex roots
For x² + 2x + 5 = 0, the discriminant is 4 − 20 = −16. It is negative, so the roots are complex: x = (−2 ± 4i) ÷ 2, giving x = −1 + 2i and x = −1 − 2i. The parabola never crosses the x-axis.
Factoring and the quadratic formula
When the roots are whole numbers or simple fractions, the equation can also be solved by factoring. The roots 1 and 2 of x² − 3x + 2 = 0 mean it factors as (x − 1)(x − 2) = 0, and you can check this by multiplying the brackets out. For 2x² − 3x + 1 = 0 the roots are 0.5 and 1, so it factors as (2x − 1)(x − 1) = 0. The solver shows a root as a fraction as well as a decimal when it is a simple fraction, which makes the factors easy to write down. When the roots are not rational, such as for x² − 2 = 0, whose roots are about ±1.414214, factoring with whole numbers is not possible, and the formula is the quickest route.
The graph of a quadratic
The graph of y = ax² + bx + c is a parabola. Its real roots are the x-values where it crosses the x-axis, its x-intercepts. The quadratic formula also gives the parabola's axis of symmetry, the vertical line x = −b ÷ 2a, which passes through the vertex, the parabola's highest or lowest point. When a is positive the parabola opens upwards and the vertex is a minimum; when a is negative it opens downwards and the vertex is a maximum. The y-intercept is simply c, the value of y when x is 0.
Where quadratic equations are used
Quadratic equations appear whenever something depends on the square of a quantity. In physics they describe the height of a thrown ball over time, in geometry they give the side of a square or rectangle from its area, and in business they help find the price that gives the most profit when demand falls as the price rises. Solving them is one of the core skills in school algebra.
Common mistakes
- Not starting from standard form. Move every term to one side first, so the other side is 0.
- Dropping a minus sign. If the equation has −3x, then b is −3, and −b is +3.
- Dividing only part of the top by 2a. The whole of −b ± √Δ is divided by 2a.
- Squaring a negative b wrongly. (−3)² is 9, not −9.
- Setting a to 0. If a is 0 there is no x² term, and the equation is linear, not quadratic.
Related math tools
See the parabola drawn with the graphing calculator, check a square root or power with the scientific calculator, and find the gradient of a line with the slope calculator.
What next
Use this often? Add Quadratic Eq to your Home screen.
Frequently asked questions
How does the quadratic equation solver work?
It puts a, b and c into the quadratic formula, x = (−b ± √(b² − 4ac)) ÷ 2a, and shows the roots with the discriminant and the vertex.
What is the discriminant?
b² − 4ac. If it is positive there are two real roots, if it is zero one repeated root, and if it is negative two complex roots.
What are the roots of x² − 3x + 2 = 0?
x = 1 and x = 2. The discriminant is 1, so there are two real roots.
Can a quadratic equation have no real solution?
Yes. When the discriminant is negative there are no real roots, but there are two complex roots, such as −1 ± 2i for x² + 2x + 5 = 0.
What if a is 0?
Then there is no x² term and the equation is linear, not quadratic, so the quadratic formula doesn't apply.
Sources
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.