Quick answer
The quadratic formula solves ax² + bx + c = 0: the roots are x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 3x + 2 = 0 the discriminant is 9 − 8 = 1, the roots are 2 and 1, and the vertex is (1.5, −0.25).
Enter a, b and c. The calculator returns the roots, the discriminant and the vertex of the parabola.
Related tools: Slope Calculator: Slope, angle, distance and line equation through two points. LCM Calculator: Least common multiple of two or more numbers. Factor Calculator: List every factor of a positive whole number.
How to use the Quadratic Formula Calculator
- Enter a.
- Enter b.
- Enter c.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| a | A number | — |
| b | A number | — |
| c | A number | — |
Formula and method
Formula
x = (−b ± √(b² − 4ac)) ÷ 2a
IEEE-754 double precision; shown to at most 6 decimal places.
The discriminant decides between two real roots, one repeated root or a complex-conjugate pair.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: a = 1; b = -3; c = 2.
| Result | Value |
|---|---|
| Roots | x = 2, x = 1 |
| Discriminant | 1 |
| Vertex | (1.5, -0.25) |
Example 2
Inputs: a = 1; b = 2; c = 1.
| Result | Value |
|---|---|
| Roots | x = -1 |
| Discriminant | 0 |
| Vertex | (-1, 0) |
Example 3
Inputs: a = 1; b = 0; c = 1.
| Result | Value |
|---|---|
| Roots | x = 0 + 1i, x = 0 − 1i |
| Discriminant | -4 |
| Vertex | (0, 1) |
The first line is the headline result (roots). Below it the quadratic Formula Calculator lists discriminant and vertex, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
What the discriminant tells you
b² − 4ac > 0 gives two distinct real roots, = 0 gives one repeated root, and < 0 gives two complex roots (a pair of conjugates). Here the discriminant is 1, so there are two real roots, 2 and 1.
Vertex and checking
The vertex is at x = −b ÷ 2a = 1.5, where y = c − b² ÷ 4a = 2 − 9/4 = −0.25. Check a root by substituting it back: 2² − 3(2) + 2 = 0. The coefficient a cannot be 0, because the equation would then be linear.
How the result changes with a
Holding every other input at the first worked example, this table changes only a. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| a | Roots | Discriminant | Vertex |
|---|---|---|---|
| 0.5 | x = 5.236068, x = 0.763932 | 5 | (3, -2.5) |
| 1 | x = 2, x = 1 | 1 | (1.5, -0.25) |
| 2 | x = 0.75 + 0.661438i, x = 0.75 − 0.661438i | -7 | (0.75, 0.875) |
| 4 | x = 0.375 + 0.599479i, x = 0.375 − 0.599479i | -23 | (0.375, 1.4375) |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- a: entering "0" shows "a must not be 0 for a quadratic." beside that field and no result.
Choosing between the Quadratic Formula Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Slope Calculator](/math/slope-calculator/) | x₁, y₁ and x₂ | Slope |
| [LCM Calculator](/math/lcm-calculator/) | numbers | Least common multiple |
| [Factor Calculator](/math/factor-calculator/) | number | Factors |
| [Log Calculator](/math/log-calculator/) | number x and base b | log base 2 of 8 |
| [GCF Calculator](/math/gcf-calculator/) | numbers | Greatest common factor |
Background: algebra
Many algebra calculators rest on the same ideas: write the problem in a standard form, identify the coefficients, apply the formula and check the answer by substituting it back. For a quadratic ax² + bx + c = 0 the roots are (−b ± √(b² − 4ac)) ÷ 2a, and the discriminant b² − 4ac decides the kind of roots: positive gives two real roots, zero gives one repeated root and negative gives two complex conjugate roots.
If a = 0 the equation is linear, not quadratic. A sign slip on the −b term shifts both roots by the same amount, so substitute your roots back to check.
Assumptions and limitations
- a ≠ 0
- Negative discriminant gives complex roots
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for a to confirm this.
Frequently asked questions
What if a is zero?
The equation is linear, not quadratic, and is rejected.
Can the roots be complex?
Yes, when the discriminant is negative.
Can I factor instead?
If the discriminant is a perfect square the roots are rational and the quadratic factors.
What does the Quadratic Formula Calculator calculate?
Solve ax² + bx + c = 0, including complex roots. It returns Roots, Discriminant and Vertex.
What formula does the Quadratic Formula Calculator use?
x = (−b ± √(b² − 4ac)) ÷ 2a. The discriminant decides between two real roots, one repeated root or a complex-conjugate pair.
What do I need to enter in the quadratic Formula Calculator?
You enter a, b and c.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. a ≠ 0.
What are the limits of this calculator?
a ≠ 0. Negative discriminant gives complex roots.
What is an example of a quadratic Formula result?
With a 1, b -3 and c 2, the roots is x = 2, x = 1.
Related calculators
- Slope Calculator — Slope, angle, distance and line equation through two points.
- LCM Calculator — Least common multiple of two or more numbers.
- Factor Calculator — List every factor of a positive whole number.
- Log Calculator — Logarithm of a number to any base.
- GCF Calculator — Greatest common factor (greatest common divisor) of two or more numbers.
- Matrix Calculator — Determinant, trace, transpose and 2×2 inverse of a matrix.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.