Home/Math/Quadratic Formula Calculator

Quadratic Formula Calculator

Solve ax² + bx + c = 0 with full working — roots, discriminant, vertex, axis of symmetry, factorisation and a graph.

Quick Answer: What Is the Quadratic Formula?

The quadratic formula solves any equation of the form ax² + bx + c = 0. It states that x = (−b ± √(b² − 4ac)) ÷ 2a. The part under the square root, b² − 4ac, is called the discriminant: if it is positive there are two real roots, if it is zero there is one repeated root, and if it is negative the roots are complex. Enter your coefficients below to see every step.

Quadratic Equation Solver

Enter the coefficients from ax² + bx + c = 0. Decimals and negatives are fine. If a is 0 the equation is linear, and the calculator will solve it as such.

Keyboard: Enter solves · Esc clears

Solution
Roots
x₁ = 3, x₂ = 2
two distinct real roots

The graph rescales automatically to show the vertex and any real roots clearly. It is a visual guide and may not use equal units on both axes.

Why this calculator is accurate on hard cases. The textbook formula can lose significant precision on one root when b² is much larger than 4ac, because it subtracts two nearly equal numbers. This calculator uses a numerically stable alternative that avoids that subtraction, so both roots stay accurate. You can verify it yourself with Vieta’s check in the results table: the product of the roots should always equal c/a.

What Is a Quadratic Equation?

A quadratic equation is any equation where the highest power of the unknown is 2. Written in standard form it looks like this:

ax² + bx + c = 0   where a ≠ 0

The letters a, b and c are the coefficients. The condition a ≠ 0 matters: if a were 0 the x² term would vanish and the equation would be linear, with just one solution. Every quadratic graphs as a parabola, a symmetrical U-shaped curve, and its solutions are the points where that curve crosses the x-axis.

The Quadratic Formula

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

The ± sign is what produces two answers: one using the plus, one using the minus. The formula works for every quadratic, whether or not it factorises, which is why it is worth memorising.

Where it comes from. The formula is the result of completing the square on the general equation ax² + bx + c = 0. Rather than completing the square each time, mathematicians did it once with letters, and the formula is the answer.

The Discriminant

The expression under the square root has its own name and its own job. The discriminant, written D or Δ, tells you what kind of roots to expect before you finish solving.

D = b² − 4ac
DiscriminantRootsGraphExample
D > 0Two distinct real rootsCrosses the x-axis twicex² − 5x + 6 → 3 and 2
D = 0One repeated real rootTouches the x-axis oncex² + 2x + 1 → −1
D < 0Two complex rootsNever touches the x-axisx² + 2x + 5 → −1 ± 2i

There is one more useful case: when D is a perfect square, the roots are rational and the quadratic factorises neatly with whole numbers. This calculator checks for that and shows the factorisation when it exists.

How to Use the Calculator

Enter a, b and c from your equation in standard form. If your equation is written differently — say 2x² = 5x − 3 — rearrange it so one side is zero first: 2x² − 5x + 3 = 0. The live display above the inputs shows the equation as you type, so you can check you have entered it correctly. Press Solve or the Enter key. You get the roots, the discriminant, the vertex, the axis of symmetry, the intercepts, a factorisation where one exists, a graph, and the full working.

Worked Examples

1. Two distinct real roots: x² − 5x + 6 = 0

a = 1, b = −5, c = 6
D = (−5)² − 4(1)(6) = 25 − 24 = 1
x = (5 ± 1) ÷ 2
x₁ = 3, x₂ = 2 — and it factorises as (x − 3)(x − 2)

2. One repeated root: x² + 2x + 1 = 0

D = 4 − 4 = 0
x = −2 ÷ 2
x = −1 (repeated) — a perfect square, (x + 1)²

3. Complex roots: x² + 2x + 5 = 0

D = 4 − 20 = −16, which is negative
√(−16) = 4i
x = −1 ± 2i — the parabola never crosses the x-axis

4. A leading coefficient: 2x² + 5x − 3 = 0

D = 25 + 24 = 49, a perfect square
x = (−5 ± 7) ÷ 4
x₁ = 0.5, x₂ = −3 — factorises as (2x − 1)(x + 3)

5. No linear term: x² − 9 = 0

D = 0 + 36 = 36
x = ±6 ÷ 2
x = ±3 — a difference of two squares, (x − 3)(x + 3)

6. Physics — a projectile

A ball thrown up at 20 m/s from 1.5 m: h = −4.9t² + 20t + 1.5
Setting h = 0 and solving gives the time it lands
t ≈ 4.16 seconds (the negative root, −0.07, is discarded as it is before the throw)

Factoring vs the Quadratic Formula

FeatureFactoringQuadratic formula
SpeedVery fast when it worksSteady, always the same effort
Works whenRoots are rationalAlways
Complex rootsCannot find themHandles them
RiskTime wasted hunting for factors that do not existArithmetic slips with signs
Best forNeat exam questionsAnything real-world or messy

A good strategy is to check the discriminant first. If it is a perfect square, factoring will work and is quicker. If not, go straight to the formula rather than searching for factors that cannot exist.

Completing the Square

This third method rewrites the equation so the variable appears only once, which also converts it to vertex form. For x² + 6x + 5 = 0: halve the b coefficient to get 3, square it to get 9, then write x² + 6x + 9 − 9 + 5 = 0, giving (x + 3)² − 4 = 0. From there x + 3 = ±2, so x = −1 or −5.

Completing the square is how the quadratic formula itself is derived, and it is the fastest route to the vertex.

The Parabola: Vertex and Axis of Symmetry

vertex x = −b ÷ 2a  ·  axis of symmetry: x = −b ÷ 2a
vertex form: y = a(x − h)² + k where (h, k) is the vertex

The vertex is the turning point — the minimum if a is positive and the parabola opens upward, or the maximum if a is negative and it opens downward. The axis of symmetry is the vertical line through the vertex, and the two roots always sit an equal distance either side of it.

FeatureStandard formVertex form
Writteny = ax² + bx + cy = a(x − h)² + k
Shows immediatelyThe y-intercept, cThe vertex, (h, k)
Best forApplying the formulaGraphing and transformations
Exampley = x² − 4x + 3y = (x − 2)² − 1

Real vs Complex Roots

FeatureReal rootsComplex roots
DiscriminantD ≥ 0D < 0
FormPlain numbersp ± qi, where i = √(−1)
On the graphx-axis crossingsNo crossings at all
Always occurIndividuallyIn conjugate pairs
Physical meaningReal solutions existOften means "never happens"

Complex roots are not a failure. In a projectile problem, complex roots mean the object never reaches that height. In electronics they describe oscillation, and in control systems they signal a system that rings rather than settling smoothly.

Where Quadratics Are Used

Physics

Projectile motion under gravity is quadratic in time, so roots give launch and landing.

h = −½gt² + v₀t + h₀

Engineering

Beam deflection, arch shapes and parabolic reflectors are all quadratic curves.

y = ax² + bx + c

Business

Profit often peaks at a vertex, so maximising revenue is a quadratic problem.

P = −ax² + bx − c

Machine Learning

Squared-error loss is quadratic, and gradient descent walks down that curve.

MSE = Σ(y−ŷ)²/n

Computer Graphics

Bézier curves and ray–sphere intersection both reduce to solving a quadratic.

at² + bt + c = 0

Architecture

Parabolic arches distribute load evenly, which is why they appear in bridges.

parabolic arch

Satellite Dishes

A parabolic dish focuses every incoming signal to a single point.

y = x²/4f

Finance

Risk–return optimisation and some pricing models minimise a quadratic function.

minimise variance

Common Mistakes

Watch out for these:
  • Not rearranging to standard form first. The formula needs ax² + bx + c = 0, so move everything to one side before reading off a, b and c.
  • Losing a minus sign. If b = −5 then −b = +5. Sign slips are the most common error in this topic.
  • Forgetting that (−5)² = 25, not −25. Squaring a negative gives a positive.
  • Dividing only one term by 2a. The entire numerator −b ± √D is divided by 2a.
  • Assuming a negative discriminant means no solution. There are no real solutions, but two complex ones exist.
  • Using the formula when a = 0. That is a linear equation and dividing by 2a would divide by zero.
  • Giving only one root. Unless D = 0, a quadratic has two.

Practice Questions

Beginner (with answers)

  1. Solve x² − 7x + 12 = 0.
  2. Solve x² − 4 = 0.
  3. Find the discriminant of x² + 3x + 2 = 0.
  4. Solve x² + 6x + 9 = 0.
  5. What is the vertex of y = x² − 4x + 3?
Show answers

1) x = 4 and 3   2) x = ±2   3) D = 1   4) x = −3 (repeated)   5) (2, −1)

Advanced (with answers)

  1. Solve 2x² + 5x − 3 = 0.
  2. Solve x² + 4x + 13 = 0.
  3. Solve 3x² − 2x − 1 = 0.
  4. For what value of k does x² + kx + 9 = 0 have exactly one root?
  5. Find the axis of symmetry of y = 2x² + 8x + 5.
Show answers

1) x = 0.5 and −3   2) x = −2 ± 3i   3) x = 1 and −⅓   4) k = ±6 (so that D = 0)   5) x = −2

Did you know? Babylonian mathematicians were solving quadratic problems around 2000 BC, using geometric methods on clay tablets. The formula in the algebraic shape we use today only settled in the 16th and 17th centuries, once symbolic notation and negative numbers were accepted.
Pro tip. Check your roots with Vieta's formulas: the two roots must add to −b/a and multiply to c/a. For x² − 5x + 6, the roots 3 and 2 sum to 5 and multiply to 6. It catches sign errors instantly.
Pro tip. Calculate the discriminant first. It tells you what kind of answer to expect, and if it is a perfect square you can factor instead and save time.

🔑 Key Takeaways

  • The quadratic formula solves every quadratic: x = (−b ± √(b² − 4ac)) ÷ 2a
  • The discriminant b² − 4ac tells you the number and type of roots
  • D > 0 gives two real roots, D = 0 one repeated, D < 0 two complex
  • The vertex sits at x = −b/2a, on the axis of symmetry
  • Check answers with Vieta's: roots sum to −b/a and multiply to c/a

Frequently Asked Questions

What is the quadratic formula?

The quadratic formula solves any equation of the form ax squared plus bx plus c equals 0. It states that x equals minus b, plus or minus the square root of b squared minus 4ac, all divided by 2a.

What is a quadratic equation?

A quadratic equation is one where the highest power of the unknown is 2. In standard form it is written ax squared plus bx plus c equals 0, where a is not zero.

How do you solve a quadratic equation?

Rearrange it into standard form, identify a, b and c, then substitute them into the quadratic formula. You can also factorise or complete the square, but the formula always works.

What is the discriminant?

The discriminant is the part under the square root, b squared minus 4ac. It tells you how many roots there are and whether they are real or complex before you finish solving.

What does the discriminant tell you?

If it is positive there are two distinct real roots, if it is zero there is one repeated root, and if it is negative there are two complex roots. A discriminant that is a perfect square also means the equation factorises with whole numbers.

When does a quadratic have two roots?

When the discriminant is greater than zero. On a graph, the parabola crosses the x-axis at two separate points.

When does a quadratic have one root?

When the discriminant is exactly zero. The parabola touches the x-axis at a single point, which is also its vertex, and the root is described as repeated.

When does a quadratic have no real roots?

When the discriminant is negative. The parabola never reaches the x-axis, and the two solutions are complex numbers forming a conjugate pair.

What are complex roots?

Complex roots contain i, the square root of minus 1. They come in pairs such as minus 1 plus 2i and minus 1 minus 2i, and they occur whenever the discriminant is negative.

What is the vertex of a parabola?

The vertex is the turning point of the curve, found at x equals minus b divided by 2a. It is the lowest point when a is positive and the highest point when a is negative.

What is the axis of symmetry?

The axis of symmetry is the vertical line through the vertex, at x equals minus b over 2a. The two roots always sit an equal distance either side of it.

What is standard form?

Standard form is ax squared plus bx plus c equals 0. You need the equation in this shape before reading off the coefficients for the formula.

What is vertex form?

Vertex form is y equals a times x minus h, squared, plus k, where h and k give the vertex directly. It is more convenient than standard form for graphing.

How do you factor a quadratic?

Find two numbers that multiply to give a times c and add to give b, then split the middle term and group. Factoring only works neatly when the discriminant is a perfect square.

What is the difference between factoring and using the formula?

Factoring is quicker but only works when the roots are rational. The quadratic formula works for every quadratic, including those with irrational or complex roots.

What is completing the square?

Completing the square rewrites the equation so the variable appears only once, which also gives vertex form. It is the method from which the quadratic formula is derived.

Why can a not be zero?

If a were zero the x squared term would disappear and the equation would be linear rather than quadratic. The formula would also require dividing by 2a, which would be division by zero.

How do you find the x-intercepts?

The x-intercepts are the roots, the values of x where y equals 0. Solve the quadratic and each real root gives one crossing point on the graph.

How are quadratic equations used in physics?

Projectile motion under gravity is quadratic in time, so the roots give when an object leaves and returns to a given height. The vertex gives the maximum height reached.

How are quadratics used in engineering?

Engineers use them for beam deflection, arch design, parabolic reflectors and optimisation problems where a maximum or minimum sits at the vertex of a curve.

What are Vieta's formulas?

Vieta's formulas say the two roots add up to minus b over a and multiply to c over a. They give a quick way to check a solution without re-solving the equation.

Is this Quadratic Formula Calculator free?

Yes. It is free with no sign-up, works on any device, and runs entirely in your browser so your entries stay private.

References

Last updated: July 2026
Reviewed by Mohsin Iqbal using standard algebraic methods and trusted educational references. Roots are computed with the numerically stable form of the quadratic formula, which avoids the loss of precision that affects the textbook version when b² is much larger than 4ac. Complex roots, repeated roots and the degenerate linear case are all handled explicitly. This page is for educational purposes.