Solve ax² + bx + c = 0: type a, b and c to get the roots, with the discriminant, vertex, factored form and a graph of the curve.
Printed from Calxy · https://www.calxy.net/math/quadratic-formula-calculator
The number in front of x². It cannot be 0.
The number in front of x.
The number on its own, with no x.
Write your equation as ax² + bx + c = 0 and type a, b and c. Use a minus sign for negative numbers. a cannot be 0.
Roots
2 and 3
Discriminant b² − 4ac1
Vertex(2.5, -0.25)
Axis of symmetryx = 2.5
Vertex form1(x − 2.5)² + (-0.25)
Factored form1(x − (2))(x − (3))
y = ax² + bx + c
How this was calculated
Work out the discriminant (D), the part that goes under the square root in the formula. It tells you how many answers there are: positive means two, zero means one, and negative means there are no real answers, only complex ones.Discriminant D = b² − 4acPut in your numbers: (-5)² − 4 × 1 × 6Answer: D = 1 (positive, so two distinct real roots)
Put b, a and D into the quadratic formula. The ± sign means you do it twice: once adding the square root and once taking it away.Quadratic formula x = (−b ± √D) ÷ (2a)Put in your numbers: (−(-5) ± √1) ÷ (2 × 1)Answer: x = 2 or x = 3√1 = 1, so x = (5 + 1) ÷ 2 = 3 or x = (5 − 1) ÷ 2 = 2
Another way to solve it is called completing the square. Start by dividing every term by a, so that x² has nothing in front of it.Completing the square — 1. Divide every term by aPut in your numbers: x² + (-5 ÷ 1)x + 6 ÷ 1 = 0Answer: x² + (-5)x + 6 = 0
Move the number that has no x (the constant) to the other side of the equals sign. Its sign flips when it moves.2. Move the constant term to the rightAnswer: x² + (-5)x = -6
Take half of the number in front of x, square it, and add it to both sides. This makes the left side a perfect square.3. Add (b ÷ 2a)² to both sidesPut in your numbers: ((-5) ÷ 2)² = (-2.5)² = 6.25Answer: x² + (-5)x + 6.25 = -6 + 6.25 = 0.25
The left side can now be written as one bracket, squared.4. Factor the left side as a perfect squareAnswer: (x + (-2.5))² = 0.25
Take the square root of both sides. It can be + or −, which gives the two answers.5. Take the square root of both sidesPut in your numbers: x + (-2.5) = ±√0.25 = ±0.5Answer: x = 2 or x = 3
Find the vertex, the turning point of the curve (called a parabola). It is the lowest point when a is positive and the highest point when a is negative.Vertex form: ax² + bx + c = a(x − h)² + k, with h = −b ÷ (2a) and k = c − b² ÷ (4a)Put in your numbers: h = −(-5) ÷ (2 × 1) = 2.5; k = 6 − (-5)² ÷ (4 × 1) = -0.25Answer: 1(x − 2.5)² + (-0.25)
Quadratic equations in simple words
A quadratic equation has an x² in it, like x² − 5x + 6 = 0. Solving it means finding the values of x that make the left side equal 0. These answers are called roots.
Write the equation as ax² + bx + c = 0. Here a is the number in front of x², b is the number in front of x, and c is the number on its own. For x² − 5x + 6 = 0, a = 1, b = −5 and c = 6.
First work out the discriminant, b² − 4ac: (−5)² − 4 × 1 × 6 = 25 − 24 = 1. Then use the quadratic formula x = (−b ± √D) ÷ 2a: x = (5 + 1) ÷ 2 = 3 or x = (5 − 1) ÷ 2 = 2. Check: 3² − 5 × 3 + 6 = 0.
If you draw y = ax² + bx + c you get a U-shaped curve called a parabola. The roots are where the curve crosses the x-axis.
Formula and method
For a ≠ 0, roots are (−b ± √(b²−4ac))/(2a). The discriminant determines whether there are two real roots, one repeated real root or two complex conjugate roots. The vertex is at x = −b/(2a), y = ax² + bx + c.
Worked example
x² − 5x + 6 = 0 has discriminant 25 − 24 = 1 and roots 2 and 3. Its vertex is (2.5, −0.25), its axis is x = 2.5, and its factorization is (x−2)(x−3).
Solving by completing the square
Completing the square rewrites ax² + bx + c = 0 so the x terms form a perfect square. Divide every term by a, move the constant to the right, add (b ÷ 2a)² to both sides, factor the left side as (x + b ÷ 2a)², then take the square root of both sides.
Worked example: 2x² + 8x − 10 = 0. Divide by 2: x² + 4x − 5 = 0. Move the constant: x² + 4x = 5. Add (4 ÷ 2)² = 4: x² + 4x + 4 = 9. Factor: (x + 2)² = 9. Square root: x + 2 = ±3, so x = 1 or x = −5.
The same steps give the vertex form a(x − h)² + k with h = −b ÷ (2a) and k = c − b² ÷ (4a); for this example 2(x + 2)² − 18, so the vertex is (−2, −18). The calculator shows every step with your coefficients.
Inputs and limitations
Enter signed coefficients, not an entire equation. If a = 0 the equation is linear and should be solved separately. The graph is sampled near the vertex; it is not an exact symbolic curve. Coefficients are scaled internally to reduce overflow and real roots use a cancellation-resistant formula.
Last updated . Results are estimates for informational purposes only.