Quadratic Formula Calculator: Solve ax²+bx+c=0 ✅

Struggling to solve a quadratic equation? Enter your values of a, b, and c into the calculator below and get the roots instantly — with every step shown.
The quadratic formula x = (-b ± √(b²-4ac)) / 2a solves any equation of the form ax²+bx+c=0 where a ≠ 0. This calculator computes the discriminant, identifies whether the roots are real or complex, and shows numbered step-by-step working so you can follow along and learn.
I built this tool because I’ve watched hundreds of students lose marks not from misunderstanding the concept, but from arithmetic slips — a sign error in the discriminant, a forgotten factor of 2 in the denominator. Use the calculator to check your work, then read the sections below to make sure you truly understand what each number means.
- 🎯 Instantly compute both roots of any quadratic equation
- 📊 See the discriminant and understand what it means
- 🔢 Get full numbered step-by-step working
- 🌐 Handle real and complex roots
- 📐 Understand the formula, not just the answer
🔑 Key Takeaway
The quadratic formula always works. Factoring sometimes fails, completing the square takes time — but the formula handles every case, including complex roots, in one clean process.
⚡ TL;DR – Quick Summary
- ✅ Enter a, b, c and click Calculate Roots for instant answers
- 📐 Formula: x = (-b ± √(b²-4ac)) / 2a — works for all quadratics
- 🔍 Discriminant D = b²-4ac: D>0 → 2 real roots; D=0 → 1 repeated root; D<0 → 2 complex roots
- ⚠️ If a = 0, the equation is linear, not quadratic — the formula breaks
- 🧮 The calculator shows step-by-step working so you can learn, not just copy
- 📊 Vertex x-coordinate = -b/2a (axis of symmetry of the parabola)
| Quick Fact | Detail |
|---|---|
| Formula | x = (-b ± √(b²-4ac)) / 2a |
| Applies to | Any equation ax²+bx+c=0, a ≠ 0 |
| Number of roots | Always exactly 2 (may be equal or complex) |
| Discriminant | D = b²-4ac |
| Vertex x-coord | -b / 2a |
| Axis of symmetry | x = -b / 2a |
| Origin | Known since ancient Babylonian mathematics (~2000 BCE) |
Quadratic Formula Calculator
Solve ax² + bx + c = 0 — step-by-step
Enter the three coefficients of your quadratic equation ax² + bx + c = 0:
📋 Step-by-Step Solution
| Symbol | Meaning | Notes |
|---|---|---|
| a | Coefficient of x² | Must be ≠ 0 |
| b | Coefficient of x | Can be any real number |
| c | Constant term | Can be any real number |
| D | Discriminant = b²−4ac | Determines root type |
| x₁, x₂ | The two roots | Real or complex |
| ± | Plus-or-minus | Gives both roots |
| i | Imaginary unit (√−1) | Used when D < 0 |
📏 Dimensions: The formula is dimensionless — it works with any units as long as a, b, c are consistent. The roots x have the same units as the variable x in your original equation.
A quadratic equation is any polynomial equation of degree 2, written in standard form as ax² + bx + c = 0 where a, b, c are real numbers and a ≠ 0.
The quadratic formula is a universal solution derived by completing the square on the general form. It gives the exact values of x that satisfy the equation — called the roots or zeros of the equation.
Geometrically, the roots are the x-coordinates where the parabola y = ax² + bx + c crosses the x-axis. If the parabola does not cross the x-axis (D < 0), the roots are complex numbers.
🛠️ How to Use This Calculator
Using this tool takes about 10 seconds. Here are the exact steps:
- Rearrange your equation into standard form ax² + bx + c = 0 first. Every term must be on the left side.
- Identify a, b, and c. The coefficient of x² is a, the coefficient of x is b, and the standalone number is c. Include the sign (negative values are fine).
- Type a, b, and c into the three input boxes. Use decimals or negatives freely.
- Click “Calculate Roots” (or press Enter). The result card appears with both roots, the discriminant, and full step-by-step working.
- Read the steps to understand how the answer was reached — don’t just copy the number.
- Click “Reset” to clear the fields and solve a new equation.
📖 What Is the Quadratic Formula?
The quadratic formula is a single algebraic expression that gives the exact roots of any quadratic equation. It works by completing the square on the general form ax² + bx + c = 0, solving for x in one universal step.
The formula reads:
The ± symbol means you compute two separate values: one using addition and one using subtraction. Those two values are your two roots, x₁ and x₂.
Historically, Babylonian mathematicians solved quadratic problems as far back as 2000 BCE, though they used geometric methods. The symbolic formula as we write it today was formalized during the Islamic Golden Age by scholars like Al-Khwarizmi, whose work directly gave us the word “algebra.” You can read more about this history on Britannica’s quadratic equation article.
🔢 The Formula Explained: Variables, Symbols, and Derivation
Every symbol in the quadratic formula has a specific role. Understanding each one prevents the most common errors.
| Symbol | Meaning | SI Unit / Type | Constraint |
|---|---|---|---|
| a | Coefficient of x² | Real number | a ≠ 0 |
| b | Coefficient of x | Real number | Any value |
| c | Constant term | Real number | Any value |
| D | Discriminant = b²−4ac | Real number | Determines root type |
| x | Unknown variable (root) | Real or complex number | What we solve for |
| ± | Plus-or-minus | Operator | Produces both roots |
| i | Imaginary unit | √(−1) | Used when D < 0 |
Where Does the Formula Come From?
The formula is derived by completing the square. Starting from ax² + bx + c = 0:
- Divide every term by a: x² + (b/a)x + (c/a) = 0
- Move the constant: x² + (b/a)x = −c/a
- Add (b/2a)² to both sides to complete the square: (x + b/2a)² = (b² − 4ac) / 4a²
- Take the square root of both sides: x + b/2a = ± √(b²−4ac) / 2a
- Solve for x: x = (−b ± √(b²−4ac)) / 2a
y
| y = ax² + bx + c (a > 0)
| ___
| / \
| / \
------+-------x₁-----x₂--------> x
| (root 1) (root 2)
|
| Vertex at x = -b/2a (axis of symmetry)
| D > 0: parabola crosses x-axis at TWO points
| D = 0: parabola TOUCHES x-axis at ONE point
| D < 0: parabola MISSES x-axis (complex roots)
✏️ Worked Examples (Matching the Calculator's Steps)
These three examples mirror exactly what the calculator produces. Work through them by hand, then verify with the tool above.
📘 Example 1: Two Distinct Real Roots — x² − 5x + 6 = 0
Given: a = 1, b = −5, c = 6
- Standard form: x² − 5x + 6 = 0 ✓
- Discriminant: D = (−5)² − 4(1)(6) = 25 − 24 = 1
- Since D = 1 > 0: two distinct real roots
- √D = √1 = 1
- x₁ = (5 + 1) / 2 = 6/2 = 3
- x₂ = (5 − 1) / 2 = 4/2 = 2
Roots: x = 3 and x = 2. Check: (x−3)(x−2) = x²−5x+6 ✓
📗 Example 2: One Repeated Root — x² − 6x + 9 = 0
Given: a = 1, b = −6, c = 9
- Discriminant: D = (−6)² − 4(1)(9) = 36 − 36 = 0
- Since D = 0: one repeated root
- x = −b / 2a = 6 / 2 = 3
Root: x = 3 (double root). Check: (x−3)² = x²−6x+9 ✓
📕 Example 3: Complex Roots — x² + 2x + 5 = 0
Given: a = 1, b = 2, c = 5
- Discriminant: D = (2)² − 4(1)(5) = 4 − 20 = −16
- Since D = −16 < 0: two complex roots
- √|D| = √16 = 4
- Real part = −2 / 2 = −1
- Imaginary part = 4 / 2 = 2
- x₁ = −1 + 2i, x₂ = −1 − 2i
Roots: x = −1 ± 2i. These are complex conjugates — the parabola does not cross the x-axis.
Try all three in the calculator above to confirm the step-by-step output matches exactly.
🔍 Understanding the Discriminant (D = b²−4ac)
The discriminant is the expression under the square root sign. It tells you everything about the nature of the roots before you finish the calculation.
| Discriminant Value | Root Type | Parabola Behaviour | Example |
|---|---|---|---|
| D > 0 | Two distinct real roots | Crosses x-axis at 2 points | x²−5x+6=0 → x=
|
