Skip to content
Quasar Tools Logo

Quadratic Equation Solver: Step-by-Step Guide

How to solve quadratic equations: the quadratic formula, factoring, completing the square, and a free online solver — with worked examples for real and complex roots.

DH
Tutorials & How-Tos12 min read2,650 words

Every quadratic equation ax²+bx+c=0 has exactly two solutions — and one formula finds both of them every time. Whether the roots are whole numbers, irrational surds, or complex numbers, the quadratic formula handles all three cases with the same three inputs. This guide walks through the formula, the discriminant, factoring, and completing the square — with worked examples at every step.

2Roots per equationReal or complex
3Coefficients neededa, b, and c
< 1sSolver result timeWith step-by-step output

What is a quadratic equation?

A quadratic equation is a polynomial equation of degree two. The standard form is ax²+bx+c=0, where a, b, and c are real constants and a ≠ 0. The condition a ≠ 0 is essential — if a equals zero the x² term disappears and the equation becomes linear, not quadratic. Every quadratic has exactly two roots by the Fundamental Theorem of Algebra, though both roots may be equal or complex.

The word "quadratic" comes from the Latin *quadratus*, meaning square — a reference to the x² term. Geometrically, every quadratic equation corresponds to a parabola in the xy-plane. The roots are the x-intercepts of that parabola: the x values where y equals zero. A parabola can cross the x-axis twice (two distinct real roots), touch it once (one repeated root), or miss it entirely (two complex roots).

Standard form and identifying coefficients

  • a — the coefficient of x² (cannot be zero; determines whether the parabola opens upward or downward)
  • b — the coefficient of x (determines the position of the axis of symmetry)
  • c — the constant term (the y-intercept of the parabola)

To identify coefficients, write the equation in descending order of degree and equate it to zero. For 3x² = 7x − 2, rearrange to 3x²−7x+2=0, giving a=3, b=−7, c=2. Sign errors when reading off coefficients are the most common source of wrong answers — always write the equation in standard form first.

Note

If your equation has a fractional or decimal coefficient, multiply through by the common denominator to get integer values before applying the formula. For example, 0.5x²+1.5x−2=0 becomes x²+3x−4=0 after multiplying by 2 — identical roots, cleaner arithmetic.

The quadratic formula explained

The quadratic formula is the universal method for solving any quadratic equation. Given ax²+bx+c=0, the two roots are: x = (−b ± √(b²−4ac)) / (2a). The ± symbol means you evaluate the expression twice — once with addition and once with subtraction — to get both roots.

The quadratic formula is not a separate rule to memorise — it is the result of completing the square on the general form ax²+bx+c=0 and solving for x directly.

Algebraic derivation via completing the square

The discriminant: b²−4ac

The expression inside the square root — b²−4ac — is called the discriminant. It determines the nature of the roots before you finish the calculation. A positive discriminant gives two distinct real roots. A discriminant of exactly zero gives one repeated real root (sometimes called a double root). A negative discriminant gives two complex conjugate roots. Checking the discriminant first tells you exactly what to expect from the full calculation.

Discriminant (D = b²−4ac)Number of rootsRoot typeParabola
D > 0Two distinctRealCrosses x-axis twice
D = 0One (repeated)RealTouches x-axis once
D < 0Two (conjugate pair)ComplexDoes not cross x-axis

Why 2a is in the denominator

The denominator 2a comes directly from the completing-the-square derivation. When a equals 1 (a monic quadratic), the formula simplifies to x = (−b ± √(b²−4c)) / 2. For equations where a is large, omitting the 2a denominator is a frequent error — always divide the entire numerator (both −b and the square root term) by 2a, not just the square root part.

Tip

For quick mental checks: the **sum of the roots** equals −b/a and the **product of the roots** equals c/a. These are Vieta's formulas. After solving, verify x₁ + x₂ = −b/a and x₁ × x₂ = c/a before writing your final answer.

How to solve quadratic equations step by step

The step-by-step process below works for every quadratic equation. Use the Quadratic Equation Solver on Quasar Tools to check your working or to solve equations where the arithmetic becomes unwieldy.

1

Write the equation in standard form

Rearrange all terms to one side so the equation equals zero: ax²+bx+c=0. Then identify a, b, and c. For the equation 2x² = 5x−3, rearrange to 2x²−5x+3=0, giving a=2, b=−5, c=3. Write the coefficients clearly before proceeding — sign errors here propagate through the entire calculation.

2

Calculate the discriminant

Compute D = b²−4ac. For a=2, b=−5, c=3: D = (−5)²−4(2)(3) = 25−24 = 1. Since D = 1 > 0, the equation has two distinct real roots. Knowing this before evaluating the square root means you know the answer will be a clean real number — no complex arithmetic needed.

3

Apply the quadratic formula

Substitute into x = (−b ± √D) / (2a). With b=−5, D=1, a=2: x = (−(−5) ± √1) / (2×2) = (5 ± 1) / 4. This gives x₁ = (5+1)/4 = 6/4 = 1.5 and x₂ = (5−1)/4 = 4/4 = 1. The two roots are x = 1.5 and x = 1.

4

Verify your roots

Substitute each root back into the original equation. For x=1: 2(1)²−5(1)+3 = 2−5+3 = 0 ✓. For x=1.5: 2(2.25)−5(1.5)+3 = 4.5−7.5+3 = 0 ✓. Verification takes thirty seconds and catches the arithmetic mistakes that cost marks in exams and errors in real calculations.

5

Use the solver for instant results

For more complex coefficients — large integers, fractions, or when you need vertex coordinates and the full algebraic working shown — enter a, b, and c into the Quadratic Equation Solver and get both roots, the discriminant, vertex, and step-by-step solution in under a second.

Quadratic Equation Solver

Enter coefficients a, b, and c and get both roots, the discriminant, vertex coordinates, and full step-by-step algebraic working — free in your browser.

Open tool

Factoring and completing the square

The quadratic formula always works, but two other methods — factoring and completing the square — are faster in specific situations and deepen your understanding of why the formula works. Knowing when to use each method saves time on exams and in practice.

Factoring: when to use it

Factoring works when the roots are rational integers. To factor ax²+bx+c, find two numbers p and q such that p + q = b and p × q = ac. Rewrite the middle term and factor by grouping. For x²+5x+6: p+q=5, p×q=6, so p=2 and q=3. Rewrite as x²+2x+3x+6 = x(x+2)+3(x+2) = (x+2)(x+3) = 0, giving roots x=−2 and x=−3. If you cannot find integer values of p and q within thirty seconds, use the formula.

  • When to factor — roots are small integers, leading coefficient is 1, discriminant is a perfect square
  • When to use the formula — roots are irrational, a ≠ 1, discriminant is not a perfect square
  • When to complete the square — you need vertex form, or you are deriving the formula itself

Completing the square

Completing the square rewrites ax²+bx+c into the form a(x−h)²+k, revealing the vertex (h, k) directly. For x²+6x+5: halve the coefficient of x to get 3, square it to get 9. Write (x²+6x+9)−9+5 = (x+3)²−4. So the vertex is (−3, −4). Setting (x+3)²−4 = 0 gives (x+3)² = 4, so x+3 = ±2, yielding x=−1 and x=−5. The method is algebraically equivalent to the formula — it is just the derivation done explicitly on the specific equation.

Note

Completing the square is the method used to derive the quadratic formula. Starting from ax²+bx+c=0, divide by a, complete the square on the left side, and solve for x — the result is x = (−b ± √(b²−4ac)) / (2a). Doing this derivation once by hand makes the formula far more memorable than rote repetition.

Choosing the right method

MethodSpeedWorks for all quadraticsBest use case
FactoringFastest✗ Only rational rootsIntegers, monic quadratics
Completing the squareModerate✓ YesVertex form needed
Quadratic formulaConsistent✓ YesAny quadratic, all root types
Online solverInstant✓ YesChecking work, step-by-step output

Real roots vs complex roots

Not every quadratic equation has real number solutions. When the discriminant is negative, the square root in the formula operates on a negative number, producing what mathematicians call complex roots. Understanding the difference between real and complex roots is essential for correctly interpreting solutions in engineering, physics, and signal processing contexts.

When complex roots appear

Take x²+4=0. Rearranging gives x² = −4, which has no real solution since no real number squared gives a negative result. The discriminant is 0²−4(1)(4) = −16, which is less than 0. Using the formula: x = (0 ± √(−16)) / 2 = ±√(−16) / 2 = ±4i / 2 = ±2i. The roots are x = 2i and x = −2i — complex conjugates, always appearing in pairs when coefficients are real.

Complex roots are written in the form p ± qi, where p = −b/(2a) is the real part and q = √(|D|)/(2a) is the imaginary part. For x²+2x+5=0, D = 4−20 = −16. The roots are x = (−2 ± √(−16)) / 2 = −1 ± 2i. Both roots share the same real part (−1) and differ only in the sign of the imaginary component.

Where complex roots matter in practice

  • Electrical engineering — impedance in AC circuits produces quadratics with complex roots representing oscillation frequency and damping
  • Control systems — the characteristic equation of a control system has complex roots that determine stability and response speed
  • Signal processing — complex roots of z-transform polynomials define filter poles and zeros
  • Computer graphics — ray-sphere intersection tests solve quadratics; a negative discriminant means no intersection (ray misses the sphere)

Warning

In applied contexts, always check whether a complex root is physically meaningful. For a projectile problem asking when an object hits the ground, a negative discriminant means the object never hits — perhaps the initial velocity was directed upward with insufficient height. Complex roots are a valid mathematical result, but they sometimes signal that you have set up the problem incorrectly or that the scenario has no physical solution.

Quadratic equations in real-world problems

Quadratic equations are not purely academic. They appear in physics, engineering, finance, and computer science wherever a quantity depends on the square of another. Recognising the quadratic structure in a word problem is the first step — the formula handles the rest.

Projectile motion

The height of a projectile under gravity follows h(t) = h₀ + v₀t − ½gt², where h₀ is the initial height, v₀ is the initial velocity, g is gravitational acceleration, and t is time. To find when the projectile lands (h=0), rearrange and solve the resulting quadratic in t. For h₀=20, v₀=15, g=9.8 (SI units): 0 = 20 + 15t − 4.9t², giving 4.9t²−15t−20=0. The quadratic formula yields the two times — take the positive root as the physical answer. You can use the Graphing Calculator to visualise the trajectory before solving for the exact landing time.

Area and geometry problems

A rectangle with perimeter 30 m where one side is x has the other side equal to 15−x. Setting the area equal to 50 m²: x(15−x) = 50, which gives x²−15x+50=0. The roots are x=5 and x=10, representing the two dimensions. Quadratic equations also appear in the Pythagorean Theorem Calculator — solving a²+b²=c² for an unknown side means solving a quadratic when the other two sides are known.

Finance and break-even analysis

Revenue models often take quadratic form when price and demand are linearly related. If revenue R = p × q and demand q = 100−2p, then R = p(100−2p) = 100p−2p². Setting R equal to a target value and solving for p produces a quadratic. The Profit and Loss Calculator handles straightforward profitability arithmetic, while the quadratic equation solver is the right tool when the relationship between variables is non-linear.

Tip

When you encounter a word problem, write down what you know (initial conditions) and what you need (the unknown x). Build the equation from the problem's constraints, rearrange to standard form, and then apply the quadratic formula. The solver handles the arithmetic — your job is modelling the problem correctly.

Graphing Calculator

Plot any quadratic equation as a parabola — see the vertex, roots, and axis of symmetry visually before solving algebraically.

Open tool

Key takeaways

  • A quadratic equation ax²+bx+c=0 always has exactly two roots — real, repeated, or complex — depending on the sign of the discriminant b²−4ac.
  • The quadratic formula x = (−b ± √(b²−4ac)) / (2a) works for every quadratic equation and all root types without exception.
  • Check the discriminant before solving: D > 0 means two real roots, D = 0 means one repeated root, D < 0 means two complex conjugate roots.
  • Factoring is fastest for monic quadratics with integer roots; completing the square gives vertex form; the formula handles everything else.
  • Verify roots by substituting them back into the original equation — if the result is not zero, there is an arithmetic error.
  • The Quadratic Equation Solver on Quasar Tools gives both roots, the discriminant, vertex, and step-by-step working instantly.
  • For higher-degree polynomials, the Polynomial Root Finder extends the same approach to degree up to 10.

Frequently Asked Questions

A quadratic equation is a polynomial equation of degree two, written in the standard form ax²+bx+c=0, where a, b, and c are constants and a ≠ 0. The term "quadratic" comes from the Latin "quadratus" meaning square, referring to the x² term. Every quadratic equation has exactly two roots (real or complex) according to the Fundamental Theorem of Algebra. Quadratic equations describe parabolic curves and appear in physics, engineering, finance, and computer graphics wherever quantities have a squared relationship.

The quadratic formula is x = (−b ± √(b²−4ac)) / (2a). It gives the two solutions to any quadratic equation ax²+bx+c=0 directly from the coefficients a, b, and c. The ± symbol means you calculate two values: one with addition and one with subtraction, giving roots x₁ and x₂. The formula works for all quadratic equations regardless of whether the roots are rational, irrational, or complex numbers.

The discriminant is the expression b²−4ac from inside the quadratic formula's square root. It tells you the nature of the roots before you calculate them. A positive discriminant means two distinct real roots. A discriminant of zero means exactly one real root (the vertex touches the x-axis). A negative discriminant means two complex conjugate roots (the parabola does not cross the x-axis). Checking the discriminant first saves time — if you only need to know whether real solutions exist, you do not need to evaluate the full formula.

To factor ax²+bx+c, find two numbers whose product equals ac and whose sum equals b. Rewrite the middle term using these numbers, then factor by grouping. For x²−5x+6, find numbers with product 6 and sum −5: they are −2 and −3. So x²−5x+6 = (x−2)(x−3) = 0, giving roots x=2 and x=3. Factoring works cleanly when the roots are rational integers, but not all quadratics factor neatly — the quadratic formula always works regardless of root type.

Completing the square is a method that rewrites ax²+bx+c as a(x−h)²+k, where h and k are the vertex coordinates. To complete the square, halve the coefficient of x, square it, and add and subtract it inside the expression to create a perfect square trinomial. The method reveals the vertex form of the parabola and is the algebraic derivation of the quadratic formula itself. It is particularly useful when you need vertex coordinates alongside the roots.

Complex roots appear when the discriminant b²−4ac is negative. Since the square root of a negative number is not a real number, the roots involve the imaginary unit i = √(−1). Complex roots always come in conjugate pairs: if one root is p+qi, the other is p−qi. Geometrically, a negative discriminant means the parabola does not intersect the x-axis. Complex roots arise in electrical engineering (AC circuits), signal processing, and control systems — they are mathematically valid solutions, just not on the real number line.

The vertex of the parabola y = ax²+bx+c is located at x = −b/(2a). Substitute this x value back into the equation to find the y coordinate: y = c − b²/(4a). The vertex is the maximum point if a < 0 (parabola opens downward) and the minimum point if a > 0 (parabola opens upward). The two roots are always symmetric about the vertex x coordinate. The Quadratic Equation Solver on Quasar Tools shows vertex coordinates alongside the roots automatically.

Yes. The Quadratic Equation Solver on Quasar Tools solves any quadratic equation ax²+bx+c=0 for free in your browser with no signup required. Enter coefficients a, b, and c, and the tool returns both roots, the discriminant, vertex coordinates, and a step-by-step algebraic solution. It handles real roots, repeated roots, and complex conjugate roots. For higher-degree polynomials, the Polynomial Root Finder extends the same approach to polynomials up to degree 10.

ShareXLinkedIn

Related articles