Math & Algebra

Quadratic Equation Calculator

Solve ax² + bx + c = 0 instantly. Get real and complex roots, discriminant, vertex, axis of symmetry, parabola graph and full step-by-step working via Quadratic Formula, Factoring and Completing the Square.

Instant Roots
3 Solution Methods
Parabola Graph
100% Free

Quadratic Equation Solver — ax² + bx + c = 0

Enter coefficients a, b, c — get roots, discriminant, vertex, parabola graph and 3 solution methods

1x² + 0x + 0 = 0
x² − 5x + 6
Two real roots
x² − 9
Difference of squares
x² − 4x + 4
Perfect square
x² + 2x + 5
Complex roots
2x² − 3x − 2
a ≠ 1
x
c
Quick integer sets:
ROOTS OF THE EQUATION
x = ?, x = ?
Solution Summary
All 3 Methods — Comparison
Parabola Graph
Parabola of y = ax² + bx + c  |  Roots shown as red dots  |  Vertex shown as blue dot
Step-by-Step Working
    Share This Solution

    What Is a Quadratic Equation?

    Definition, standard form, roots, discriminant and why quadratics appear everywhere in science and engineering

    The Equation Behind Every Parabola

    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 word "quadratic" comes from the Latin quadratus meaning square, referring to the x² term. The solutions — the values of x that satisfy the equation — are called the roots or zeros.

    A quadratic equation always has exactly two roots (counting multiplicity) in the complex number system, guaranteed by the Fundamental Theorem of Algebra. These roots can be: two distinct real numbers (discriminant > 0), one repeated real number (discriminant = 0), or a pair of complex conjugates (discriminant < 0). The graph of y = ax² + bx + c is always a parabola — opening upward if a > 0, downward if a < 0.

    📌 The Discriminant (Δ = b² − 4ac) tells you the nature of roots before solving: Δ > 0 means two distinct real roots; Δ = 0 means one repeated real root (perfect square); Δ < 0 means two complex conjugate roots (no real x-intercepts on the parabola).

    Quadratic equations model countless real phenomena: the path of a projectile under gravity, the area of rectangles, the focus of parabolic mirrors and satellite dishes, profit maximisation in economics, and the resonant frequency of electrical circuits. Mastering the three solution methods — quadratic formula, factoring, and completing the square — is one of the most important skills in algebra.

    📐
    Quadratic Formula
    x = (−b ± √(b²−4ac)) / 2a. Works for ALL quadratics. Most reliable method — never fails as long as a ≠ 0. The ± gives both roots in one formula.
    Factoring
    Find two numbers that multiply to ac and add to b. Rewrite as (px + q)(rx + s) = 0. Fast when it works, but only possible for rational roots. If discriminant is irrational, factoring over integers is impossible.
    Completing the Square
    Rewrite ax²+bx+c as a(x+p)²+q = 0. Derives the vertex directly and is the basis from which the quadratic formula itself is derived. Essential for understanding the vertex form of a parabola.
    🔢
    Vertex & Axis of Symmetry
    Vertex = (−b/2a , c−b²/4a). Axis of symmetry = x = −b/2a. The vertex is the minimum (a>0) or maximum (a<0) of the parabola. Every parabola is symmetric about this vertical line.

    Three Solution Methods — When to Use Each

    Quadratic Formula, Factoring and Completing the Square compared with examples and use cases

    Pick the Right Tool for the Job
    MethodFormula / ApproachBest WhenLimitation
    Quadratic Formula Always worksx = (−b ± √D) / 2a where D = b²−4acAny quadratic, especially irrational rootsSlightly slower to compute by hand
    FactoringFind p,q: p×q = ac, p+q = b then split middle termInteger or simple rational rootsFails when roots are irrational or complex
    Completing the Squarea(x + b/2a)² = b²/4a − c; derives vertex directlyWhen vertex form is needed; deriving the formulaMore steps; easy arithmetic errors
    Square Root Methodx² = k ⇒ x = ±√k (only when b=0)Pure quadratic: ax² + c = 0Only works when b = 0
    🎯
    When to Factor First

    Try factoring when: coefficients are small integers, the discriminant is a perfect square, and a = 1. Example: x² − 5x + 6 = (x−2)(x−3). Roots: x=2, x=3. Product of roots = c/a = 6, sum = −b/a = 5. Verify with Vieta's formulas before writing the full solution.

    Fast path
    📐
    Quadratic Formula — Never Fails

    The formula x = (−b ± √(b²−4ac)) / 2a was known to Indian mathematician Brahmagupta in 628 AD. It handles all cases: real roots, repeated roots, and complex roots. If D < 0, write roots as x = −b/2a ± i√|D|/2a. This is the universal fallback method.

    Universal
    Completing the Square

    Step 1: divide by a. Step 2: move c/a to right. Step 3: add (b/2a)² to both sides. Step 4: left side becomes (x + b/2a)². Step 5: take square root. This method directly gives vertex form y = a(x−h)²+k where (h,k) is the vertex. The quadratic formula is literally derived from this method.

    Vertex form
    📊
    Vieta's Formulas

    If x₁ and x₂ are roots of ax²+bx+c=0, then: Sum of roots = x₁+x₂ = −b/a; Product of roots = x₁×x₂ = c/a. These relations let you verify answers instantly without substituting back. They also let you build a quadratic from two known roots: x² − (sum)x + (product) = 0.

    Verify fast
    💫
    Complex Roots Explained

    When D < 0, the square root of a negative number brings in i = √−1 (the imaginary unit). Roots appear as conjugate pairs: x = p ± qi. These roots are "complex" but still valid solutions. The parabola never crosses the x-axis. Complex roots are fundamental in electrical engineering (AC circuits use j = i for impedance calculations).

    Complex plane
    💡
    Nature of Roots (Discriminant)

    D = b² − 4ac determines everything about the roots before you solve. D > 0: two distinct real roots (parabola crosses x-axis at two points). D = 0: one repeated root (parabola just touches x-axis). D < 0: no real roots, two complex conjugates (parabola entirely above or below x-axis).

    Key insight

    How This Calculator Works

    Step-by-step: how coefficients are processed, all three methods computed, vertex found and graph drawn

    From Coefficients to Complete Solution
    • 1
      Enter a, b, c — Live Equation Previews

      As you type each coefficient, the equation display at the top updates in real time: "2x² − 3x + 1 = 0". Negative values and zero are handled automatically, so the display always shows a clean mathematical expression.

    • 2
      Compute Discriminant Δ = b² − 4ac

      This single value determines the nature of the roots before solving. Δ > 0: two real roots. Δ = 0: one repeated real root. Δ < 0: two complex conjugate roots. The calculator shows this value prominently and colours the result hero accordingly (green / blue / purple).

    • 3
      Solve Using All Three Methods

      The calculator applies all three solution methods simultaneously. The selected method (Quadratic Formula / Factoring / Completing the Square) generates the full step-by-step working shown in the steps list. All three results are shown in the Method Comparison section for cross-checking.

    • 4
      Compute Vertex, Axis & Key Properties

      Vertex h = −b/2a, k = c − b²/4a. Axis of symmetry x = h. Sum of roots = −b/a. Product of roots = c/a. Y-intercept = c. The 6 summary cards display all key properties at a glance.

    • 5
      Draw Parabola on Canvas

      The graph is drawn using HTML5 Canvas. The calculator auto-scales the axes to include the vertex, both roots (if real), and a margin of ~30%. Roots are marked as red filled circles, the vertex as a blue filled circle, and the axis of symmetry as a dashed vertical line.

    Key formulas used:
    Discriminant : D = b² − 4ac
    Quad. Formula : x = (−b ± √D) / 2a
    Vertex : h = −b/2a, k = c − b²/4a
    Sum of roots : x₁+x₂ = −b/a
    Product : x₁×x₂ = c/a
    Vertex form : y = a(x−h)² + k

    Quadratic Equation Facts & Real-World Uses

    Fascinating history, surprising applications and everything your textbook forgot to mention

    Quadratics Are Everywhere
    📜
    Babylonians Solved Quadratics in 2000 BC

    Babylonian clay tablets show geometric methods for solving quadratic-like problems 4,000 years ago, long before algebra notation existed. They used completing-the-square ideas expressed in terms of areas and lengths. The modern symbolic solution came from 9th-century Islamic mathematicians, especially Al-Khwarizmi's "Al-Kitab al-mukhtasar" (the origin of the word "algebra").

    🎯
    Projectile Motion is a Quadratic

    When you throw a ball, the height h = −½gt² + v₀t + h₀. This is a quadratic in time t. The roots (where h=0) give the time of landing. The vertex gives the maximum height. Every parabolic trajectory — a basketball shot, a football kick, a water fountain arc — is the graph of a quadratic equation with gravity as the coefficient of t².

    📶
    Parabolic Dishes Use the Reflective Property

    A parabola reflects all incoming parallel rays to a single focus point. This is why satellite dishes, radio telescopes, car headlights and solar concentrators are all parabolic. The equation of a parabola with focus at (0, 1/4a) is y = ax². The quadratic equation determines the shape of every dish and lens that needs to concentrate energy.

    💰
    Profit Maximisation in Economics

    If revenue R(x) = px and cost C(x) = ax²+bx+c (with increasing marginal cost), then Profit = R−C is a downward-opening quadratic. The vertex gives the production quantity that maximises profit. Setting Profit = 0 gives the break-even quantities. Every introductory economics course uses quadratic profit functions.

    Quadratics in Electrical Circuits

    In a series RLC circuit, the characteristic equation is Ls² + Rs + 1/C = 0 — a quadratic in the complex frequency s. The discriminant determines whether the circuit is overdamped (D>0), critically damped (D=0), or underdamped/oscillatory (D<0). Every capacitor-inductor circuit is governed by a quadratic equation.

    🛸
    Orbital Mechanics and Conic Sections

    Planetary orbits are conic sections — ellipses, parabolas, or hyperbolas — all described by second-degree equations. A spacecraft at exactly escape velocity follows a parabolic path. The quadratic formula solves for orbital insertion windows, closest-approach distances and re-entry trajectories. Every space mission relies on solving quadratic (and higher) equations.

    🔬
    The Quadratic Formula Has a Song

    Countless teachers worldwide have set the quadratic formula to the tune of "Pop Goes the Weasel" to help students memorise it: "x equals negative b / plus or minus square root / of b-squared minus 4ac / all over 2a." This mnemonic device has been used since at least the 1960s. The formula itself is elegant enough that it appears on some mathematicians' tombstones.

    🧮
    You Cannot Avoid It: It Appears in Calculus Too

    Setting the derivative of a cubic f(x) = ax³+bx²+cx+d to zero gives a quadratic f'(x) = 3ax²+2bx+c = 0. Every time you find the turning points of a cubic — in optimization problems, economics, or physics — you're solving a quadratic. The skills compound: mastering the quadratic is prerequisite for all of calculus-based mathematics.

    Frequently Asked Questions

    Common questions about solving quadratic equations, complex roots, vertex form and the discriminant

    What does the discriminant tell you before you solve?
    The discriminant D = b² − 4ac reveals the nature of the roots without full calculation. If D > 0: two distinct real roots — the parabola crosses the x-axis at two points. If D = 0: one repeated real root — the parabola just touches (is tangent to) the x-axis at one point, called a double root. If D < 0: no real roots — the parabola sits entirely above (a > 0) or below (a < 0) the x-axis; roots are complex conjugates. A perfect-square discriminant (D is a perfect square) means the roots are rational, so integer factoring will work.
    When should I use factoring vs the quadratic formula?
    Try factoring first when: (1) all coefficients are small integers, (2) the discriminant is a perfect square (check quickly: is b²−4ac a perfect square?), and (3) a = 1. If any of those fail, go straight to the quadratic formula — it always works. For irrational roots (D>0 but not a perfect square) or complex roots (D<0), only the quadratic formula gives you the exact answer efficiently. Completing the square is best when you need the vertex form or when you're deriving the formula itself.
    What are complex roots and what do they mean?
    Complex roots occur when D < 0. The square root of a negative number involves the imaginary unit i = √−1. Roots appear as conjugate pairs: x = (−b/2a) ± i(√|D|/2a). They are not "fake" — they are just as valid as real roots, but they have no real-number x-intercept on the Cartesian plane. In physics and engineering, complex roots in characteristic equations indicate oscillatory behaviour. In electrical engineering, j (= i) is used for AC impedance analysis. Every polynomial with real coefficients has complex roots that come in conjugate pairs.
    How do I verify my roots are correct?
    Two fast methods: (1) Substitution: put each root back into the original equation and check that it equals zero. (2) Vieta's formulas: sum of roots = −b/a and product of roots = c/a — if your two roots add to −b/a and multiply to c/a, they are correct. Method 2 is faster for mental checking. For example, if a=1, b=−5, c=6: sum should be 5, product should be 6. Roots x=2 and x=3: 2+3=5 ✓, 2×3=6 ✓.
    What is vertex form and how does it relate to standard form?
    Vertex form is y = a(x−h)² + k, where (h, k) is the vertex of the parabola. Expanding this gives standard form ax² − 2ahx + (ah²+k) = ax² + bx + c. So h = −b/2a and k = c − b²/4a. Vertex form makes it immediately obvious where the parabola's minimum or maximum is, and is the form used in completing the square. Converting between forms is a core skill: completing the square converts standard to vertex form; expanding converts vertex to standard form.
    What if a = 0 — is it still quadratic?
    No. If a = 0, the equation reduces to bx + c = 0 — a linear equation with at most one solution. The definition of a quadratic requires a ≠ 0. This is why the quadratic formula has 2a in the denominator — dividing by zero is undefined, correctly signaling that the equation is not quadratic. This calculator requires a ≠ 0 and will show an error if a = 0 is entered.