Skip to main content

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

Find real or complex roots from a, b, and c. See the discriminant, the formula with your numbers plugged in, the vertex, and Vieta sum and product. Runs in your browser.

Coefficients a, b, c

Default is x² − 5x + 6 = 0, roots 2 and 3. The formula updates as you type. a = 0 is rejected.

Roots and Vertex

Roots, discriminant, and vertex will appear here

What Is a Quadratic Formula Calculator and Why Do You Need One?

A quadratic formula calculator solves ax² + bx + c = 0 for x when a is not zero. Completing the square once and for all produces

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

The expression under the radical is the discriminant Δ = b² − 4ac. Its sign decides the geometry of y = ax² + bx + c: two x-intercepts, a vertex sitting on the axis, or a pair of complex conjugate roots with no real crossing. Factoring is faster when the numbers are friendly (x² − 5x + 6 = (x−2)(x−3)), but the formula still works when they are not, including when Δ is negative.

This page also reports the vertex (−b/2a, f(−b/2a)), the axis of symmetry x = −b/2a, and Vieta’s formulas: the sum of roots is −b/a and the product is c/a, which remain true for complex roots. Calculation stays in your browser. Related tools: the slope calculator for a straight line instead of a parabola, the exponent calculator when you need a power rather than a root, and the scientific calculator for a one-off square root.

How to Use This Free Online Quadratic Formula Calculator

Using this ax² + bx + c solver:

  1. Enter a, b, and c. a is the x² coefficient and cannot be 0. b and c may be zero or negative. The default is 1, −5, 6.
  2. Read Δ. Positive: two distinct real roots. Zero: one repeated real root (the vertex is on the x-axis). Negative: two complex roots written as p ± qi.
  3. Check the plugged-in formula, the vertex, the axis, and the Vieta sum and product against a homework key.
  4. Copy the result block, or clear a, b, and c. Coefficients are saved locally for up to 30 days.

Note: this is IEEE-754 floating point, not a computer-algebra exact field. A discriminant that should be 0 but lands at 1e-18 will be treated as negative or positive according to its bit pattern. Very large |a|, |b|, |c| can overflow.

What Is the Quadratic Formula?

x = (−b ± √Δ) / (2a), Δ = b² − 4ac
a ≠ 0. Default x² − 5x + 6 = 0 → x = 2 and x = 3

Derive it by dividing through by a (legal because a ≠ 0), moving c/a, and completing the square: x² + (b/a)x = −c/a, add (b/2a)² to both sides, then take square roots. The ± is not optional decoration: a genuine quadratic has two roots in ℂ, counted with multiplicity. When Δ = 0 those two roots are equal.

For a = 1, b = −5, c = 6: Δ = 25 − 24 = 1, √Δ = 1, so x = (5 ± 1)/2, which is 3 and 2. The result panel writes the substitution with your current a, b, c so a grader can see the arithmetic, not only the final pair.

What Does the Discriminant Tell You?

Δ = b² − 4acRootsParabola vs x-axis
Δ > 0two distinct realcrosses twice
Δ = 0one real, multiplicity twotangent at the vertex
Δ < 0two complex conjugatesno real intercept

The discriminant does not tell you whether the parabola opens up or down - that is the sign of a. It does not tell you the vertex height except in the Δ = 0 case, when the vertex y is 0. Graphing y = ax²+bx+c and solving ax²+bx+c = 0 are the same curve; the formula only finds the zeros.

Complex Roots When the Discriminant Is Negative

If Δ < 0 then √Δ = i √(−Δ). The roots are

−b/(2a) ± [√(−Δ)/(2a)] i

For real a, b, c they are conjugates. Example: x² + 1 = 0 has a = 1, b = 0, c = 1, Δ = −4, roots ± i. Example: x² + 2x + 5 = 0 has Δ = 4 − 20 = −16, real part −1, imaginary part 2, roots −1 ± 2i. This calculator writes that rectangular form. It does not switch to polar r∠θ unless you convert with a different tool.

Complex zeros still satisfy Vieta: sum −b/a and product c/a. They do not appear as x-intercepts on a real graph. If a course forbids complex numbers, a negative discriminant means “no real solution,” which is the same computation with the last step omitted.

How to Find the Vertex of a Parabola

Completing the square, or differentiating f(x) = ax²+bx+c and setting f′ = 2ax+b = 0, both give the axis x = −b/(2a). Plug that x back into f to get the vertex y-coordinate. For x² − 5x + 6 the axis is x = 2.5 and f(2.5) = 6.25 − 12.5 + 6 = −0.25, so the vertex is (2.5, −0.25). If a > 0 this is a minimum; if a < 0 a maximum.

The vertex is not a root unless Δ = 0. The default parabola dips below the x-axis between 2 and 3; the roots are the crossings, the vertex is the bottom of the valley.

Why a Cannot Be Zero in a Quadratic

If a = 0 the x² term is gone. You are left with bx + c = 0. When b ≠ 0 that is a line with one root x = −c/b. When b = 0 as well, either every x works (c = 0) or none does (c ≠ 0). The quadratic formula’s denominator 2a would be zero. This calculator therefore rejects a = 0 with an explicit message instead of returning Infinity or NaN. A linear solver is a different page.

Worked Examples - Two Real, Repeated, and Complex

x² − 5x + 6 = 0. Δ = 1, x = 3 and x = 2, vertex (2.5, −0.25), sum 5, product 6.

x² − 2x + 1 = 0 (that is (x−1)²). Δ = 0, x = 1 repeated, vertex (1, 0), sum 2, product 1.

x² + 1 = 0. Δ = −4, x = i and x = −i, vertex (0, 1), sum 0, product 1. 2x² + 3x − 2 = 0 has Δ = 9 + 16 = 25, x = (−3 ± 5)/4, so x = 1/2 and x = −2.

Completing the Square vs the Quadratic Formula

Completing the square is the derivation, not a rival answer. Divide by a, isolate the x terms, add (b/2a)², take square roots. The formula is that sequence compressed into one line. For x² − 5x + 6 you can also factor (x−2)(x−3) because 2 and 3 add to 5 and multiply to 6. Factoring fails on x² + 1 without complex numbers; the formula does not fail - it reports ±i.

Graphing calculators that “intersect y = 0” only see real roots. If Δ < 0 they show no intersection; this page still lists the complex pair. That is a feature for algebra II courses that include ℂ, and a reminder for courses that do not: “no real solution” is Δ < 0, not a crashed formula.

How to Graph a Parabola from a, b, and c

Plot the vertex first: x = −b/(2a), y = f of that x. Draw the axis as a dashed vertical line through the vertex. If Δ ≥ 0, mark the real root or roots on the x-axis (the default marks 2 and 3). Sketch the U through those three points if a > 0, or the n-shape if a < 0. The y-intercept is always (0, c) because f(0) = c. For x² − 5x + 6 that intercept is (0, 6), well above the vertex at (2.5, −0.25).

This calculator does not draw the sketch. It gives the numbers a graphing assignment needs. A slope of the tangent at a point is the derivative 2ax+b, which is a different question from the slope of a chord; use the slope calculator only for two sample points on the parabola if a teacher asked for a secant.

Sum and Product of Roots - Vieta's Formulas

If the roots are r and s, then (x−r)(x−s) = x² − (r+s)x + rs. Matching ax²+bx+c after dividing by a gives r+s = −b/a and rs = c/a. For 2 and 3, sum 5 = −(−5)/1 and product 6 = 6/1. For ±i, sum 0 and product (−i)(i) wait: i · (−i) = −i² = 1, which equals c/a for x² + 1. The identities do not require the roots to be real. This page prints both as a check: if you copied x₁ and x₂ by hand, add and multiply them and compare.

Vieta is also how you build a quadratic from roots without the formula: x² − (sum)x + (product) = 0 when a = 1. Scaling by a puts the leading coefficient back.

Factoring vs Quadratic Formula

Integer factoring hunts a pair that multiplies to a·c and adds to b. It is fast when it works and silent when it does not. The quadratic formula always returns two roots in ℂ (counted with multiplicity). Use factoring on quizzes that forbid calculators and have tiny integers. Use the formula when coefficients are ugly, when Δ is not a perfect square, or when you need the vertex in the same breath.

Completing the square is better when the task is to write vertex form y = a(x−h)² + k. The formula hides h = −b/(2a) and k = f(h) inside the algebra; this page surfaces them explicitly so you can write vertex form without re-deriving.

Numerical Issues with the Quadratic Formula

Subtracting two close numbers in −b ± √Δ can cancel digits when Δ ≈ b² (one root near 0, one near −b/a). Professional libraries use a numerically stable rearrangement. This homework calculator uses the textbook ± and IEEE doubles. For classroom a, b, c that is enough. For a = 1, b = 1e8, c = 1 you may see the small root look noisier than a CAS fraction.

Powers such as (2x)² belong on an exponent calculator or the scientific calculator before you collect a, b, c. Expanding (x−2)(x−3) by hand is still the right way to check x² − 5x + 6; the formula should then return 2 and 3, which it does on the default load.

Another classroom check: 2x² + 7x − 4 = 0 has Δ = 49 + 32 = 81, √Δ = 9, so x = (−7 ± 9)/4. That is x = 1/2 and x = −4. Sum −b/a = −7/2 = −3.5, and 0.5 + (−4) = −3.5. Product c/a = −2, and (1/2)(−4) = −2. If those Vieta checks fail, you copied a root with the wrong sign, not a new kind of quadratic.

Equations that are not already equal to zero must be moved first. x² = 5x − 6 is the default after subtracting 5x and adding 6. (x+1)² = 2 expands to x² + 2x + 1 − 2 = 0, so a = 1, b = 2, c = −1, Δ = 8, roots −1 ± √2. Typing the original squared binomial into a single box is not supported; this tool only takes the three coefficients of the standard form. A cubic such as x³ − 1 = 0 is also out of scope even though x = 1 is an obvious real root: the formula here is strictly degree two. Equations like 1/x + x = 3 are not quadratic until you multiply through by x (getting x² − 3x + 1 = 0, provided x ≠ 0). Do that algebra off-page, then type the resulting a, b, and c. Word problems that hide the quadratic (“a rectangle is 3 m longer than it is wide and the area is 40 m²”) still reduce to ax²+bx+c=0 after you name the unknown; this solver does not parse the English.

Honest Limits of This Quadratic Solver

  • Degree 2 only. No cubics, no quartics, no systems.
  • Floating point, not fractions. 1/3 as a coefficient must be typed as a decimal or 0.333…. Roots that are exactly 2 and 3 will display as 2 and 3; messy irrationals are rounded to 12 significant figures.
  • No step-by-step factoring. It does not search for integer factor pairs. It always uses the formula.
  • Complex output is a+bi, not a polar pair, and not a plot.

Frequently Asked Questions (FAQ) - Quadratic Formula

What is the quadratic formula?

For ax² + bx + c = 0 with a ≠ 0, the solutions are x = (−b ± √(b² − 4ac)) / (2a). Default example: x² − 5x + 6 = 0 has a = 1, b = −5, c = 6, discriminant 1, and roots 2 and 3.

What does the discriminant tell you?

The discriminant is Δ = b² − 4ac. Δ > 0: two distinct real roots (the parabola crosses the x-axis twice). Δ = 0: one real root with multiplicity two (the vertex sits on the x-axis). Δ < 0: two complex roots, no real x-intercepts.

How do complex roots appear in this calculator?

When Δ < 0, √Δ is imaginary. The roots are written as p ± qi where p = −b/(2a) and q = √(−Δ)/(2a). They are conjugates when a, b, c are real, which they are on this page. Completing the square gives the same real and imaginary parts.

How do you find the vertex of a parabola?

The axis of symmetry is x = −b/(2a). The vertex is (−b/(2a), f(−b/(2a))) where f(x) = ax² + bx + c. For x² − 5x + 6 the vertex is (2.5, −0.25). If a > 0 the parabola opens up and the vertex is a minimum; if a < 0 it opens down and the vertex is a maximum.

Why can a not be zero in a quadratic?

If a = 0 the equation is bx + c = 0, a line, not a parabola. The quadratic formula divides by 2a, which would be division by zero. This calculator rejects a = 0. A linear equation is a different tool, not a special case of Δ.

Does this quadratic calculator upload my coefficients?

No. Solving runs in your browser with JavaScript. Nothing is sent to a server. After the page loads, the tool still works if the network drops. The last a, b, and c are stored only in localStorage on this device for up to 30 days.

Why Choose Our Quadratic Formula Calculator?

  • Free, no account. Unlimited a, b, c triples.
  • Private. Coefficients never leave the browser.
  • Shows the formula with numbers plugged in, not only the roots.
  • Complex roots when Δ < 0, instead of a blank or an error.
  • Vertex, axis, Vieta sum and product for a graphing check.
  • Rejects a = 0 instead of dividing by zero.
  • Works offline after the first page load.