Free tool · Math and study
Quadratic formula calculator
Enter a, b and c to solve a quadratic equation. You get the discriminant, the exact roots as whole numbers, fractions or surds, the decimals, the vertex and a graph of the parabola.
- Free
- No sign-up
- Runs in your browser
x = 2 ± √3x ≈ 0.2679 and x ≈ 3.7321
- Two real roots
- Δ > 0
- Opens up
- Discriminant
- 12
- Vertex
- (2, -3)
- Axis of symmetry
- x = 2
- y-intercept
- (0, 1)
- Opens
- Upward (a > 0)
- Vertex form
- y = (x − 2)² − 3
Graph
The navy line is the parabola, the red dot is the vertex and the dashed line is the axis of symmetry. Teal dots mark where it crosses the x-axis.
Steps
- Write the equation as ax² + bx + c = 0. From your numbers, x² − 4x + 1 = 0, so a = 1, b = -4, c = 1.
- The quadratic formula gives both roots: x = (−b ± √(b² − 4ac)) ÷ 2a.
- Find the discriminant Δ = b² − 4ac: Δ = (-4)² − 4 × 1 × 1 = 16 − 4 = 12. Δ is positive, so there are two different real roots.
- Substitute into the formula. x = (4 ± √12) ÷ 2.
- Simplify the square root. 12 = 4 × 3, so √12 = 2√3. The roots are x = (4 ± 2√3) ÷ 2, which reduces to x = 2 ± √3.
- Decimal values. x ≈ 0.2679 and x ≈ 3.7321 (rounded to 4 decimal places).
- Check. The two roots should add up to −b ÷ a = 4 and multiply to c ÷ a = 1.
- Vertex and axis. The axis of symmetry is x = −b ÷ 2a = 2. Putting that x back in gives the vertex height k = c − b² ÷ 4a = -3, so the vertex is (2, -3).
How to use the Quadratic Equation Solver
- Type a, b and c for your equation ax² + bx + c = 0. Use whole numbers, decimals or fractions such as 1/2, and 0 for a missing term.
- Choose how many decimal places to Round decimals to.
- Read the roots under Result, with the discriminant, vertex, axis of symmetry and factored form where it exists.
- Look at the Graph of the parabola, follow the numbered Steps, or press Copy results.
What is the quadratic formula?
Every quadratic equation ax² + bx + c = 0, with a not equal to 0, has its roots given by x = (−b ± √(b² − 4ac)) ÷ 2a. The ± means you work it out twice, once with a plus and once with a minus, to get the two roots. The tool opens on x² − 4x + 1 = 0, so a = 1, b = −4 and c = 1. Then b² − 4ac = 16 − 4 = 12 and x = (4 ± √12) ÷ 2. Since √12 = 2√3, the roots simplify to x = 2 ± √3, which are about 3.7321 and 0.2679.
Your coefficients are kept as exact numbers, so the discriminant and the exact roots do not suffer from rounding. If you type 0.5 or 1/2, the whole equation is first multiplied by a common number to make a, b and c whole numbers, which does not change the roots. A square root that is not a whole number is simplified as far as it will go and left as a surd, and the decimal value is shown beside it.
What does the discriminant tell me?
The discriminant is Δ = b² − 4ac, the part under the square root. If Δ is positive there are two different real roots, and the parabola crosses the x-axis twice. If Δ is exactly 0 there is one repeated root, x = −b ÷ 2a, where the parabola just touches the axis. If Δ is negative there are no real roots, because you cannot take the real square root of a negative number, and the parabola stays entirely above or below the axis. A positive Δ that is a perfect square, such as 64 for 2x² − 4x − 6 = 0, means the roots are whole numbers or fractions (−1 and 3) and the equation can be factored as 2(x + 1)(x − 3).
What do I do when the discriminant is negative?
Use the imaginary unit i, defined by i² = −1, so that √(−n) = i√n. For x² − 2x + 5 = 0 the discriminant is 4 − 20 = −16, and √(−16) = 4i, so x = (2 ± 4i) ÷ 2 = 1 ± 2i. The two roots are complex conjugates, a real part of 1 and an imaginary part of plus or minus 2. When the root is not a perfect square, as in x² + x + 1 = 0, the tool shows the exact form (−1 ± √3 i)/2 and the decimals −0.5 ± 0.866i. The graph shows the parabola missing the x-axis.
How do I find the vertex of a parabola, and what about factoring?
The axis of symmetry is the line x = −b ÷ 2a, and the vertex lies on it at x = −b ÷ 2a. Put that x back into the equation to get the height k, which equals c − b² ÷ 4a. For x² − 4x + 1 the vertex is (2, −3), so the vertex form is y = (x − 2)² − 3. The vertex is the lowest point when a is positive and the highest when a is negative. The two roots always add up to −b ÷ a and multiply to c ÷ a, and the steps use that as a check.
Factoring is the other route to the same roots. It works with whole numbers only when the discriminant is a perfect square, so the tool shows the factored form in that case and says nothing when it does not exist. To solve by completing the square, write the vertex form and set it to 0: for the example, (x − 2)² = 3, so x = 2 ± √3.
Use it with
- Square Root Calculator: roots and exponents.
- Pythagorean Theorem Calculator: find a missing side.
- Fraction Calculator: add, subtract, multiply, divide fractions with steps.
Questions
What is the quadratic formula?
For ax² + bx + c = 0 the roots are x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 4x + 1 = 0 that gives x = 2 ± √3, about 3.7321 and 0.2679.
What does the discriminant tell me?
Δ = b² − 4ac. Positive means two real roots, zero means one repeated root, and negative means two complex roots with no real solution.
How do I solve a quadratic by factoring or completing the square?
Factoring works with whole numbers when Δ is a perfect square: 2x² − 4x − 6 = 2(x + 1)(x − 3). Completing the square rewrites the equation as a(x − h)² + k = 0, and the same roots follow.
What do I do when the discriminant is negative?
Take the square root with i, where i² = −1. For x² − 2x + 5 = 0, Δ = −16 and the roots are 1 + 2i and 1 − 2i.
How do I find the vertex of a parabola?
The vertex is at x = −b ÷ 2a. Substitute that x into the equation for the height. For x² − 4x + 1 it is (2, −3).
How this page was made: the tool's results are computed in your browser by the code on this page; the explanations were drafted with AI help and checked against the tool's own output.