Quadratic Formula Calculator
The quadratic formula calculator solves any quadratic equation of the form ax²+bx+c=0 — finding both roots, analyzing the discriminant, and showing every step of the working. Enter the values of a, b, and c below to get a complete step-by-step solution instantly.
This free quadratic equation solver handles all three cases: two distinct real roots (positive discriminant), one repeated root (zero discriminant), and complex roots (negative discriminant) — with the parabola graph shown for every calculation. No signup required.
Enter the coefficients a, b, and c:
Step-by-Step Solution
What Is the Quadratic Formula?
The quadratic formula is a mathematical equation used to solve any quadratic equation of the standard form ax²+bx+c=0. It expresses the two roots (solutions) of the equation directly in terms of the three coefficients a, b, and c — without requiring factoring or completing the square. Paul's Online Math Notes covers the full derivation and extra practice problems if you want more worked examples beyond this page.
The formula works for every quadratic equation, regardless of whether it can be factored. It is one of the most important formulas in algebra and is taught in Class 10 in most school curricula worldwide.
Sridharacharya Formula — The Indian Name for the Quadratic Formula
In India, the quadratic formula is commonly known as the Sridharacharya formula (also spelled Shri Dharacharya formula, Shree Dhara Acharya formula, or Dronacharya formula). It is named after the 9th-century Indian mathematician Sridharacharya, who is credited with formulating this method for solving quadratic equations. The formula is identical — x = [−b ± √(b²−4ac)] / 2a — and is a core part of the Class 10 CBSE mathematics curriculum.
How the Quadratic Formula Is Derived (Completing the Square)
The quadratic formula isn't an arbitrary rule — it comes directly from completing the square on the general equation ax²+bx+c=0. Seeing the derivation makes the formula easier to remember and shows why it always works.
- Start with the standard form and divide every term by a: x² + (b/a)x + (c/a) = 0
- Move the constant term to the right side: x² + (b/a)x = −c/a
- Complete the square: add (b/2a)² to both sides: x² + (b/a)x + (b/2a)² = (b/2a)² − c/a
- The left side is now a perfect square: (x + b/2a)² = (b/2a)² − c/a
- Simplify the right side to a single fraction: (x + b/2a)² = (b² − 4ac) / 4a²
- Take the square root of both sides: x + b/2a = ± √(b² − 4ac) / 2a
- Subtract b/2a from both sides: x = −b/2a ± √(b² − 4ac) / 2a
- Combine into a single fraction: x = [−b ± √(b² − 4ac)] / 2a — the quadratic formula
This derivation is also why the discriminant (b²−4ac) determines the type of roots — it's the exact expression that ends up under the square root once the square has been completed.
Quadratic Formula Explained — Every Part
The Three Coefficients: a, b, and c
To use the quadratic formula, first write your equation in standard form: ax²+bx+c=0. Then identify the three coefficients:
| Coefficient | What it represents |
|---|---|
| a | The number multiplied by x². Must not be zero — if a=0, the equation is linear, not quadratic. |
| b | The number multiplied by x. Can be zero, positive, or negative. |
| c | The constant term — the number with no variable attached. Can be zero, positive, or negative. |
If any of a, b, or c is itself a fraction, simplify it first using the Fraction Calculator, then substitute the simplified values into the formula above — this avoids compounding errors when the formula's own fraction is combined with a fractional coefficient.
The Discriminant: b²−4ac
The discriminant is the expression inside the square root: b²−4ac. Its value tells you everything about the nature of the roots before you finish the calculation. If the discriminant isn't a perfect square, the Square Root Calculator can simplify it to exact radical form instead of a rounded decimal.
| Discriminant value | Type of roots | What it means |
|---|---|---|
| b²−4ac > 0 (positive) | Two distinct real roots | The parabola crosses the x-axis at two points. Most common case. |
| b²−4ac = 0 (zero) | One repeated real root | The parabola touches the x-axis at exactly one point (the vertex). |
| b²−4ac < 0 (negative) | Two complex (imaginary) roots | The parabola does not cross the x-axis. Roots contain the imaginary unit i. |
Sum and Product of Roots
For any quadratic equation ax²+bx+c=0, if the two roots are α (alpha) and β (beta), two important relationships always hold:
How to Use This Quadratic Formula Calculator
- Enter the value of a (the coefficient of x²) in the first field. a must not be zero.
- Enter the value of b (the coefficient of x). Enter 0 if there is no x term.
- Enter the value of c (the constant). Enter 0 if there is no constant term.
- Click Solve. The calculator shows the discriminant value, root type, and both solutions with full step-by-step working.
- The parabola graph updates automatically — showing x-intercepts (the roots), the vertex, and the axis of symmetry.
- Use the Vertex Form tab to see the equation rewritten as a(x−h)²+k, and the Factored Form tab to see (x−r₁)(x−r₂) when real roots exist.
The calculator accepts integers, decimals, and negative numbers. For equations not in standard form — for example, 2x²=5x−3 — rearrange to ax²+bx+c=0 first (move all terms to one side), then enter the coefficients.
Worked Examples — Step by Step
Example 1: Two Real Roots — x²−5x+6=0
Coefficients: a=1, b=−5, c=6. The equation factors as (x−2)(x−3)=0, but the quadratic formula finds the roots without factoring.
- Write the equation in standard form: x²−5x+6=0. Identify: a=1, b=−5, c=6
- Write the quadratic formula: x = [−b ± √(b²−4ac)] / 2a
- Calculate the discriminant: b²−4ac = (−5)² − 4(1)(6) = 25 − 24 = 1
- Discriminant = 1 > 0 → two distinct real roots
- Substitute into formula: x = [−(−5) ± √1] / 2(1) = (5 ± 1) / 2
- Calculate root 1: x₁ = (5 + 1) / 2 = 6 / 2 = 3
- Calculate root 2: x₂ = (5 − 1) / 2 = 4 / 2 = 2
- Verify: sum of roots = 3+2 = 5 = −b/a = 5/1 ✓ │ product = 3×2 = 6 = c/a = 6/1 ✓
Example 2: Two Real Irrational Roots — 2x²+3x−2=0
Coefficients: a=2, b=3, c=−2. This equation does not factor neatly — the quadratic formula is the most direct method.
- Write in standard form: 2x²+3x−2=0. Identify: a=2, b=3, c=−2
- Calculate the discriminant: b²−4ac = 3² − 4(2)(−2) = 9 + 16 = 25
- Discriminant = 25 > 0 → two distinct real roots
- Substitute: x = [−3 ± √25] / 2(2) = (−3 ± 5) / 4
- Root 1: x₁ = (−3 + 5) / 4 = 2 / 4 = 0.5
- Root 2: x₂ = (−3 − 5) / 4 = −8 / 4 = −2
- Verify: 2(0.5)²+3(0.5)−2 = 0.5+1.5−2 = 0 ✓ │ 2(−2)²+3(−2)−2 = 8−6−2 = 0 ✓
Example 3: One Repeated Root — x²−6x+9=0
When the discriminant equals zero, the parabola touches the x-axis at exactly one point — the vertex.
- Identify: a=1, b=−6, c=9
- Calculate discriminant: b²−4ac = 36 − 4(1)(9) = 36 − 36 = 0
- Discriminant = 0 → one repeated real root
- Substitute: x = [−(−6) ± √0] / 2(1) = (6 ± 0) / 2 = 6 / 2 = 3
- Both roots are the same: x₁ = x₂ = 3
- Factored form: (x−3)² = 0 ✓ │ Vertex of parabola: (3, 0)
Example 4: Complex Roots — x²+x+1=0
When the discriminant is negative, the square root produces an imaginary number. The roots are complex conjugates containing the imaginary unit i (where i=√−1).
- Identify: a=1, b=1, c=1
- Calculate discriminant: b²−4ac = 1 − 4(1)(1) = 1 − 4 = −3
- Discriminant = −3 < 0 → two complex (imaginary) roots
- Substitute: x = [−1 ± √(−3)] / 2(1)
- Rewrite √(−3) using imaginary unit i: √(−3) = i√3
- Root 1: x₁ = (−1 + i√3) / 2
- Root 2: x₂ = (−1 − i√3) / 2
- The roots are complex conjugates — they have no real value on the x-axis
Note on complex roots: When the discriminant is negative, the parabola does not cross the x-axis. There are no real number solutions — only complex (imaginary) ones. Complex roots always come in conjugate pairs: (p + qi) and (p − qi).
Common Mistakes When Using the Quadratic Formula
- Dropping the sign on b: the formula uses −b, so if b is already negative (like b=−5), −b becomes positive (+5). Forgetting this sign flip is the single most common quadratic formula error.
- Only calculating one root: the ± symbol means every quadratic with a positive discriminant has two solutions. Stopping after the + case (or the − case) misses half the answer.
- Miscalculating the discriminant's order of operations: b²−4ac means square b first, then subtract 4ac — not (b−4ac)², and not b²−4·a·c calculated in the wrong order. Always compute b² and 4ac separately before subtracting.
- Forgetting that 2a applies to the entire numerator: both −b and the ± √(b²−4ac) term must be divided by 2a — not just the square root part. Writing −b ± [√(b²−4ac) / 2a] instead of [−b ± √(b²−4ac)] / 2a is a common structural error.
When to Use the Quadratic Formula
The quadratic formula solves any quadratic equation — but other methods are sometimes faster. Use this guide to choose the right approach:
| Method | When to use it |
|---|---|
| Factoring | Use when the equation factors neatly into integers. Fastest method when it works. Example: x²−5x+6 = (x−2)(x−3). |
| Square root method | Use when the equation has the form ax²=c (no x term). Example: x²=25 → x=±5. |
| Completing the square | Use when you need vertex form or when deriving the quadratic formula itself. Works on all quadratics. |
| Quadratic formula | Use when factoring does not work or is not obvious. Always works — no matter what a, b, and c are. The safest universal method. |
The quadratic formula is the recommended method for any equation where the discriminant is not a perfect square — those equations have irrational roots that factoring cannot find.
Vertex Form and the Axis of Symmetry
Every quadratic equation can be rewritten in vertex form: a(x−h)²+k, where (h, k) is the vertex of the parabola. The vertex is the minimum point (if a>0, parabola opens up) or maximum point (if a<0, parabola opens down).
Frequently Asked Questions
- What is the quadratic formula?
- The quadratic formula is x = [−b ± √(b²−4ac)] / 2a. It solves any quadratic equation of the form ax²+bx+c=0 by substituting the three coefficients a, b, and c directly into the formula. It always works, unlike factoring which only applies when the equation has rational roots.
- What is the Sridharacharya formula?
- The Sridharacharya formula is the Indian name for the quadratic formula: x = [−b ± √(b²−4ac)] / 2a. It is named after the 9th-century Indian mathematician Sridharacharya and is the standard method taught for solving quadratic equations in Class 10 CBSE and other Indian curricula. It is mathematically identical to what is called the quadratic formula in Western mathematics.
- How do you use the quadratic formula step by step?
- Step 1: Write the equation in standard form ax²+bx+c=0. Step 2: Identify the values of a, b, and c. Step 3: Calculate the discriminant b²−4ac. Step 4: Substitute a, b, c into x=[−b ± √(b²−4ac)]/2a. Step 5: Evaluate once with + and once with − to get both roots. Step 6: Verify by substituting each root back into the original equation.
- What is the discriminant in the quadratic formula?
- The discriminant is the expression b²−4ac — the part under the square root in the quadratic formula. Its value determines the nature of the roots: positive discriminant gives two distinct real roots, zero discriminant gives one repeated real root, and negative discriminant gives two complex roots with no real solutions.
- What does a negative discriminant mean?
- A negative discriminant (b²−4ac < 0) means the quadratic equation has no real number solutions. The square root of a negative number produces an imaginary number, so the two roots are complex conjugates of the form p ± qi, where i is the imaginary unit (√−1). On a graph, a negative discriminant means the parabola does not cross the x-axis at all.
- Can the quadratic formula be used for all quadratic equations?
- Yes. The quadratic formula works for every quadratic equation of the form ax²+bx+c=0, as long as a≠0. It produces real roots when the discriminant is non-negative and complex roots when the discriminant is negative. Unlike factoring, it does not require the equation to have rational roots — it handles irrational and complex roots equally well.
- How do you find the vertex from the quadratic formula?
- The x-coordinate of the vertex is h = −b/(2a). This is also the axis of symmetry of the parabola. The y-coordinate is found by substituting h back into the equation: k = a(h)²+b(h)+c. Alternatively, k = c − b²/(4a). For example, for 2x²+3x−2=0: h = −3/4 = −0.75 and k = −3.125, giving vertex (−0.75, −3.125).
- What is the sum and product of roots formula?
- For a quadratic equation ax²+bx+c=0 with roots α and β: the sum of roots α+β = −b/a, and the product of roots α×β = c/a. These relationships let you verify your answers quickly. For x²−5x+6=0 with roots 2 and 3: sum = 2+3 = 5 = −(−5)/1 and product = 2×3 = 6 = 6/1. Both check out without substituting back into the full equation.
Related Calculators
Fraction CalculatorSimplify, add, subtract, multiply, and divide fractions — useful when quadratic coefficients or roots are fractions. Includes mixed number support and step-by-step working. Square Root Calculator
Simplify square roots to radical form (e.g. √72=6√2) and evaluate the discriminant — with prime factorisation shown step by step. Average Calculator
Find the mean, median, mode, and weighted average of any dataset — with step-by-step working and support for decimal and fractional values.