Quadratic Formula Calculator

Free quadratic equation solver for ax² + bx + c = 0. Get both roots, the discriminant, the vertex, factored form, a parabola graph, and every step of the working.

Enter your coefficients

Type the numbers from ax² + bx + c = 0. Fractions such as 3/4 work too.

Try an example
Your equation
x² − 5x + 6 = 0

Roots

Two distinct real roots
x₁
3
x₂
2
Discriminant (b² − 4ac)1
Vertex(2.5, −0.25)
Axis of symmetryx = 2.5
y-intercept(0, 6)
Sum of roots5
Product of roots6
Parabola opensUpward
Factored form
(x − 3)(x − 2) = 0

Step-by-step working

  1. 1
    Write the equation in standard form
    x² − 5x + 6 = 0
  2. 2
    Work out the discriminant
    D = (−5)² − 4(1)(6)
  3. 3
    Work out the discriminant
    D = 1
  4. 4
    Put the values into the quadratic formula
    x = (5 ± √1) / 2
  5. 5
    Simplify the square root
    x = (5 ± 1) / 2
  6. 6
    Find the vertex with x = −b / 2a
    (2.5, −0.25)

Graph of the parabola

Green dots mark where the curve crosses the x-axis. The amber dot marks the vertex.

Free Quadratic Formula Calculator

A quadratic equation has the form ax² + bx + c = 0. This quadratic formula calculator solves it with x = (−b ± √(b² − 4ac)) / 2a and shows the working line by line. You get both roots, the discriminant, the vertex, the factored form when it exists, and a graph of the parabola. Real roots, repeated roots, and complex roots are all covered.

x = (−b ± √(b² − 4ac)) / 2a

What Is the Quadratic Formula?

The quadratic formula is the standard way to solve any second-degree equation written as ax² + bx + c = 0, as long as a is not zero. The value under the square root, b² − 4ac, is the discriminant. It tells you how many real solutions exist before you finish the rest of the arithmetic.

  • Discriminant > 0: two different real roots
  • Discriminant = 0: one repeated real root (the parabola just touches the x-axis)
  • Discriminant < 0: two complex roots of the form p ± qi

Factoring is faster when the numbers are friendly. Completing the square works too. When the numbers are messy, or you want a method that never fails, use the quadratic formula. This page does that work for you and keeps every intermediate line visible.

How to Solve a Quadratic Equation

  1. Move every term to one side so the equation reads ax² + bx + c = 0. Missing terms count as zero. For x² − 9 = 0, b is 0.
  2. Identify a, b, and c, including each minus sign. In 2x² − 3x − 5 = 0, a is 2, b is −3, and c is −5.
  3. Compute the discriminant D = b² − 4ac. Then substitute into the formula and simplify both the + and − cases.
  4. Check with Vieta: the roots should add to −b/a and multiply to c/a. If they do not, rework the arithmetic.

Example: x² − 5x + 6 = 0 has a = 1, b = −5, c = 6. D = 25 − 24 = 1, so the roots are (5 ± 1) / 2, which gives x = 3 and x = 2. The factored form is (x − 3)(x − 2) = 0, and the vertex sits at (2.5, −0.25).

Why Use This Quadratic Equation Solver?

Step-by-Step Working

Standard form, discriminant, substitution, simplification, and roots — each line is there so you can check your own method.

Graph Matches the Algebra

The parabola is drawn from your coefficients, with the roots and the vertex marked where they fall.

Complex Roots Included

A negative discriminant does not stop it. You get both complex roots in p ± qi form instead of an error.

Free, Fast, and Private

No sign-up and no server call. The solver runs in your browser and updates as soon as you change a coefficient.

How this Quadratic Formula Calculator works

This quadratic formula calculator applies x = (−b ± √(b² − 4ac)) / 2a to the coefficients you enter and shows the arithmetic, not only the answer. Type a, b, and c as decimals or as fractions such as 3/4. The equation preview rebuilds as you type, so you can confirm the signs before you trust the result.

It works out the discriminant first, because that single value decides the rest. A positive discriminant gives two distinct real roots, zero gives one repeated root, and a negative discriminant gives a conjugate pair of complex roots in p ± qi form rather than an error. Tiny floating-point remainders are cleared before the check, so a true double root is not misreported as complex.

Around the roots you also get the vertex at x = −b / 2a, the axis of symmetry, the y-intercept, and the sum and product of the roots through Vieta's formulas, which is the fastest way to check your own working. When both roots are rational, the factored form appears as well. If a is zero, the equation is no longer quadratic; the tool says so and solves the linear case instead of dividing by zero. The parabola is drawn from your coefficients with the roots and vertex marked, so a negative discriminant shows up as a curve that never meets the x-axis. Everything runs in your browser.

How to use this Quadratic Formula Calculator

1

Write the equation in standard form

Move every term to one side so it reads ax² + bx + c = 0. The three numbers left in front of x², x, and the constant are what you type in.

2

Enter a, b, and c

Type each coefficient, including the minus sign where there is one. Fractions such as 3/4 work, and the equation preview confirms what you entered.

3

Read the roots and the working

You get the discriminant, both roots, the vertex, the factored form, a graph of the parabola, and every line of the calculation.

Example Usage

Solving x² − 5x + 6 = 0 with the quadratic formula:

Input
a = 1, b = −5, c = 6
Output
Discriminant: 1 x₁ = 3, x₂ = 2 Vertex: (2.5, −0.25) Factored: (x − 3)(x − 2) = 0

Frequently Asked Questions

What is the quadratic formula?
x = (−b ± √(b² − 4ac)) / 2a. It solves any equation written as ax² + bx + c = 0, as long as a is not zero. The plus and minus sign is what produces the two roots, and this calculator works through the substitution line by line so you can follow it.
What does the discriminant tell me?
The discriminant is b² − 4ac, the part under the square root. If it is positive there are two different real roots. If it is exactly zero there is one repeated root, and the parabola just touches the x-axis. If it is negative the roots are complex, and the curve never crosses the x-axis at all.
Why does my equation have no real solutions?
Because the discriminant came out negative, and you cannot take the square root of a negative number within the real numbers. The equation still has two solutions, they are just complex, written in the form p ± qi. The graph on this page shows why: the parabola sits entirely above or below the x-axis.
Can I use this if a is 0?
You can type it, but the equation is no longer quadratic. With no x² term it becomes bx + c = 0, a straight line with a single solution. The tool notices this, tells you, and solves the linear equation instead of dividing by zero.
How do I find a, b, and c from a messy equation?
Get everything on one side first. For 3x² = 7x − 2, subtract 7x and add 2 to both sides, which gives 3x² − 7x + 2 = 0. Now a is 3, b is −7, and c is 2. Missing terms count as zero, so x² − 9 = 0 has b = 0.
What is the vertex and why is it shown?
The vertex is the turning point of the parabola, found at x = −b / 2a. It gives you the minimum value of the expression when a is positive, or the maximum when a is negative. That matters in word problems about maximum height, minimum cost, or largest area.
Should I factor instead of using the formula?
Factoring is faster when the numbers are friendly, and this page shows the factored form whenever the roots turn out rational. When they do not, factoring by inspection will not work and the formula is the reliable route. Completing the square is a third option that leads to the same answers.
Does the calculator show the steps for homework?
Yes. The step-by-step panel writes out the standard form, the discriminant substitution, the formula with your values plugged in, the simplified version, and the final roots. Copy them into your working, but make sure you can reproduce the method yourself before a test.
Can I enter fractions or decimals as coefficients?
Both work. Type 0.5 or 1/2 and the calculator treats them the same. Decimals are handled with full floating point precision, and results are rounded for display rather than for the calculation itself.
What do the sum and product of roots mean?
For any quadratic, the two roots add up to −b/a and multiply to c/a. These are known as Vieta's formulas. They are a quick way to check your answers: if your two roots do not add and multiply to those values, something went wrong in the working.
Why does the graph matter?
Because it makes the algebra concrete. The roots are exactly where the curve crosses the x-axis, the vertex is the turning point, and the sign of a decides whether the parabola opens upward or downward. Seeing all three together tends to make the discriminant rule stick.
Is my input sent anywhere?
No. The solver runs entirely in your browser. Nothing is uploaded, and there is no account or history. Refresh the page and your coefficients are gone.

Related Tools

The Quadratic Formula Calculator is maintained by CodeItBro. We aim to provide the best free developer tools on the web. If you have feedback or suggestions, please visit our contact page.

Comments

Questions, corrections, and useful tips are welcome. Comments are reviewed before publication.

Loading comments...

Comments are stored and moderated using Cusdis Cloud. Email is optional. Privacy Policy

As featured on

CodeItBro - Free dev tools + practical guides to help you ship faster | Product HuntCodeItBro - Free Online Developer Tools badgeCodeItBro badge