Skip to content

Quadratic Formula Calculator

Enter the coefficients a, b and c of ax² + bx + c = 0 to get both solutions, the discriminant that tells you what kind they are, and the vertex of the parabola.

Calculator Details

Roots:x = 2, x = 3See results ↓

Slope and line through two points, a line from a point and a slope, the other endpoint from a midpoint, or a quadratic equation

Coefficient of x² (not 0)

Coefficient of x

Constant term

Your Results

Roots: x = 2, x = 3

Roots

x = 2, x = 3

Two real roots (D > 0)

Discriminant (b² − 4ac)

1

Completed square

(x − 5/2)² = 1/4

Vertex form

y = (x − 5/2)² − 1/4

Graph

x1x2vertex
Parabola y = 1x² + (−5)x + (6). Axes cross at (0, 0); not to scale.

The discriminant is 1, so the equation has two real roots, x = 2 and x = 3. Completing the square gives (x − 5/2)² = 1/4; the vertex is (5/2, −1/4).

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Detailed Breakdown

Properties of y = 1x² + (−5)x + (6)
PropertyExactNote
Discriminant (b² − 4ac)1Two real roots (D > 0)
Root 1x = 2≈ 2
Root 2x = 3≈ 3
Vertex(5/2, −1/4)Minimum (opens up)
Axis of symmetryx = 5/2
Vertex formy = (x − 5/2)² − 1/4
Completed square(x − 5/2)² = 1/4(x + b/2a)² = (b² − 4ac) ÷ 4a²
Factored form(x − 2)(x − 3)
Sum of roots5−b ÷ a
Product of roots6c ÷ a

How This Calculator Works

How the Quadratic Is Solved

The quadratic formula with your coefficients, in exact fractions:

a = 1, b = −5, c = 6

D = b² − 4ac = (−5)² − 4·(1)·(6) = 1

x = (−b ± √D) ÷ 2a = (−(−5) ± √(1)) ÷ (2·1)

x = 2 or x = 3

Vertex: h = −b ÷ 2a = 5/2, k = c − b² ÷ 4a = −1/4

Completing the square

Move the constant across: x² − 5x = −6

Add (b/2a)² = (−5/2)² = 25/4 to both sides: x² − 5x + 25/4 = −6 + 25/4

Write the left side as a square: (x − 5/2)² = 1/4

Take square roots: x − 5/2 = ±√(1/4), so x = 2 or 3

Vertex form: y = (x − 5/2)² − 1/4

Frequently Asked Questions

What does the discriminant tell me?

The discriminant, b² − 4ac, is the part under the square root. Positive: two different real roots, and the parabola crosses the x-axis twice. Zero: one repeated root where it just touches the axis. Negative: no real roots, only a pair of complex ones, and the parabola never meets the axis.

Should I factor or use the quadratic formula?

Factor when the roots are small whole numbers and you can spot two numbers that multiply to c and add to b, as with x² − 5x + 6 = (x − 2)(x − 3). The formula always works, including for roots like (1 ± √5) ÷ 2 that never factor neatly, so use it whenever factoring is not quick.

What if a is 0?

Then the equation is not quadratic: bx + c = 0 is linear, with one solution x = −c ÷ b. The quadratic formula would divide by zero, so the calculator asks for a value of a other than 0.

How do I solve x² = 9 or 2x² − 8x = 0?

Write them in standard form with every term on one side. x² − 9 = 0 has a = 1, b = 0, c = −9, giving x = ±3. 2x² − 8x = 0 has c = 0, giving x = 0 and x = 4. A missing term just means its coefficient is 0.

Included: slope, intercepts, slope-intercept, point-slope and standard forms, distance, midpoint and angle for lines; the other endpoint of a segment from one end and the midpoint; discriminant, exact real or complex roots, vertex, vertex and factored forms and completing the square step by step for quadratics. Inputs are converted to exact fractions from their decimal digits.

Left out: cubic and higher-degree equations, systems of equations, inequalities and fraction input such as 1/3 (enter 0.3333 or scale the equation). The graph is a preview, not to scale.

Quadratic Formula Calculator: Solve ax² + bx + c = 0

By FindMySum · Last reviewed

A quadratic formula calculator solves any equation of the form ax² + bx + c = 0, where a is not zero. The quadratic formula, x = (−b ± √(b² − 4ac)) ÷ 2a, gives both solutions at once; the ± is the reason a quadratic usually has two. This page shows the roots exactly where it can (fractions and square roots, not just decimals), the discriminant, and the vertex of the parabola y = ax² + bx + c.

Worked example

Solve x² − 5x + 6 = 0, so a = 1, b = −5 and c = 6.

  1. Discriminant: b² − 4ac = (−5)² − 4 × 1 × 6 = 25 − 24 = 1.
  2. Square root: √1 = 1.
  3. Roots: x = (5 ± 1) ÷ 2, so x = 3 or x = 2.
  4. Vertex: x = −b ÷ 2a = 2.5, and y = 2.5² − 5 × 2.5 + 6 = −0.25, so the vertex is (2.5, −0.25).

Check by substituting: 3² − 5 × 3 + 6 = 0 and 2² − 5 × 2 + 6 = 0. The vertex sits halfway between the two roots, which is always true for a parabola.

Avoiding sign errors

Most wrong answers come from the signs of b and c. Here b is −5, so −b is +5, and b² is +25 whatever the sign of b. Write the equation in standard form before reading off a, b and c, and keep their signs.

The same equation in vertex form is y = (x − 2.5)² − 0.25, which is the completed square. For straight lines, slopes and the other modes, see the slope and line calculator.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy