Quadratic Formula Calculator
Find the roots of any equation ax² + bx + c = 0 and explore the parabola behind it — discriminant analysis, vertex, axis of symmetry, y-intercept, factorisation, an interactive graph, and a full step-by-step derivation for every solution.
Solve ax² + bx + c = 0
ax² + bx + c = 0
Fractions like 5/2, decimals, and negatives are all accepted. a cannot equal zero.
2x² − 7x + 3 = 0
Reading the discriminant
The discriminant Δ = b² − 4ac decides the kind of solutions a quadratic has before you finish solving it. Memorise the three cases — they reappear on every test.
Δ > 0
Two distinct real roots. The parabola crosses the x-axis at two different points.
2x² − 7x + 3 → Δ = 25
Δ = 0
One repeated real root. The parabola only touches the x-axis at the vertex.
x² − 4x + 4 → Δ = 0
Δ < 0
Two complex conjugate roots. The parabola never crosses the x-axis.
x² + 4x + 8 → Δ = −16
Formula reference
Quadratic formula
x = (−b ± √(b² − 4ac)) / (2a)
Solves any ax² + bx + c = 0 with a ≠ 0.
Discriminant
Δ = b² − 4ac
Classifies the roots before you solve.
Vertex (x-coord)
h = −b / (2a)
Lies halfway between the two real roots.
Vertex (y-coord)
k = c − b² / (4a)
Plug h into the original equation, or use this shortcut.
Axis of symmetry
x = −b / (2a)
The same x as the vertex — parabola is mirror-symmetric about it.
Y-intercept
y = c
Set x = 0 in ax² + bx + c.
Sum of roots
x₁ + x₂ = −b / a
Vieta's first formula.
Product of roots
x₁ · x₂ = c / a
Vieta's second formula — useful sanity check after solving.
Derivation of the quadratic formula
The quadratic formula is not magic — it is what you get when you complete the square on the general equation ax² + bx + c = 0. Reading through the derivation once makes the formula far easier to remember and to apply correctly under exam pressure.
- 1
Start with the general quadratic
Any second-degree polynomial equation can be written in standard form with three real coefficients. We assume a is non-zero — otherwise the equation collapses to a linear one.
ax² + bx + c = 0
- 2
Divide every term by a
Dividing by a leaves a monic quadratic (leading coefficient 1). This is legal because a ≠ 0 and it sets up the completing-the-square move that follows.
x² + (b/a) · x + (c/a) = 0
- 3
Move the constant to the other side
Subtract c/a from both sides so the variable terms are isolated on the left. This pure-quadratic-plus-linear form is ready to be completed into a perfect square.
x² + (b/a) · x = − c/a
- 4
Add (b/2a)² to both sides
Half of the linear coefficient is b/(2a). Squaring it gives b²/(4a²). Adding this constant to both sides preserves the equation and makes the left a perfect square trinomial.
x² + (b/a) · x + (b/2a)² = (b/2a)² − c/a
- 5
Factor the left as a perfect square
The left-hand trinomial now equals (x + b/(2a))² exactly. The right side is a single fraction — combine the terms over the common denominator 4a².
(x + b/(2a))² = (b² − 4ac) / (4a²)
- 6
Take square roots of both sides
Square-rooting kills the square on the left and introduces a ± on the right — because both the positive and negative root satisfy the original equation. The denominator 4a² has root 2a (we take the positive root; the sign is absorbed by the ±).
x + b/(2a) = ± √(b² − 4ac) / (2a)
- 7
Isolate x — the quadratic formula appears
Subtract b/(2a) from both sides. Combine the two fractions over the common denominator 2a and you are left with the formula every algebra textbook prints inside a box.
x = (−b ± √(b² − 4ac)) / (2a)
Four ways to solve a quadratic
| Method | When it works best | Limitation |
|---|---|---|
| Quadratic formula | Always works — first choice when coefficients are messy decimals, fractions, or large integers. | Slightly slower to write out; easy to forget the ± or misread b². |
| Factoring | Integer roots and small integer coefficients — fastest when (px + q)(rx + s) jumps out at a glance. | Fails whenever the roots are irrational, complex, or have ugly fractions. |
| Completing the square | Builds the derivation of the formula and is invaluable for converting to vertex form. | More algebra steps than the formula; arithmetic mistakes compound quickly. |
| Graphing | Gives a quick visual estimate and confirms the kind of roots — great as a sanity check. | Only approximate without algebra; misreads roots that are close together or off-screen. |
What Is A Quadratic Formula Calculator?
A quadratic formula calculator solves any equation of the form ax² + bx + c = 0 for the unknown x. You enter the three coefficients a, b, and c; the calculator computes the discriminant, classifies the roots, returns both solutions (real or complex), graphs the underlying parabola, and walks through every line of the derivation — substitution, square root, denominator, positive branch, negative branch. It is a study tool, a homework checker, and a fast scratchpad all in one.
This tool accepts integers, decimals, simple fractions like 5/2, negative values, and the constant π. It detects integer factorisations automatically, draws the parabola with the vertex and axis of symmetry marked, and reports every property a textbook question can ask — vertex coordinates, y-intercept, opening direction, minimum or maximum value, domain and range. It pairs naturally with the scientific calculator, the root calculator, and the exponent calculator.
Understanding The Quadratic Equation
Three coefficients fix the curve
Every quadratic is determined by exactly three numbers: a (the curvature, must be non-zero), b (the slant), and c (the height at x = 0). Pick any three real numbers with a ≠ 0 and you have specified a unique parabola — there is no other curve that fits.
Roots are x-intercepts
Setting ax² + bx + c = 0 is the same as asking where the parabola meets the horizontal axis. Two crossings → two real roots, one touch → a repeated root, no contact → complex conjugate roots. The discriminant tells you which case you are in before you even open your calculator.
Symmetry is everywhere
A parabola is perfectly mirror-symmetric about its vertical axis of symmetry x = −b/(2a). The two real roots sit equidistant from that line, which is why their sum equals −b/a (Vieta's first formula) and the midpoint is the vertex's x-coordinate.
The vertex is the optimum
Because parabolas open straight up or straight down, the vertex is either the minimum (when a > 0) or the maximum (when a < 0). Optimisation problems in physics, economics, and engineering reduce to finding this single point — and the quadratic formula does it implicitly through the axis of symmetry.
6 Ways To Use This Quadratic Calculator
Check homework instantly
Type the coefficients, hit Calculate, and compare against your own work. The step-by-step panel makes it obvious where an arithmetic slip happened — usually in the discriminant or the final fraction.
Classify roots before solving
The discriminant badge tells you whether the roots are real, repeated, or complex before you commit to a method. Saves time on multiple-choice questions where the type of root is the answer.
Visualise the parabola
The interactive graph plots y = ax² + bx + c with the vertex, axis of symmetry, and intercepts marked. Useful for sketching answers on graph paper or recognising the curve from a word problem.
Find vertex and optimum
Looking for the maximum height of a projectile or the minimum cost of a function? The vertex card returns h, k, the axis of symmetry, and labels k as the minimum or maximum based on the sign of a.
Spot integer factorisations
If the equation factors cleanly, the calculator finds and prints the factored form like (2x − 1)(x − 3). When no integer factorisation exists, it says so directly — no guessing.
Practice complex roots
Try the x² + 4x + 8 preset to see the calculator produce −2 ± 2i with a full conjugate-root derivation. Great for an Algebra II or Pre-Calc unit on the imaginary unit.
Best Practices For Solving Quadratics
Always rewrite the equation in standard form ax² + bx + c = 0 before reading off the coefficients. Equations are often presented as 3x² = 7x − 2 or x(x − 5) = 4; until you collect all terms on the same side, the values of b and c you plug in will be wrong. Watch the signs carefully — a stray minus sign on b² is the single most common error students make on the discriminant.
Compute the discriminant first, then take its square root only once. Re-evaluating b² − 4ac twice (once for each branch of the ±) doubles the chance of making an arithmetic slip. The disciplined sequence is: discriminant → √Δ → denominator → x₁ → x₂. The calculator follows exactly this order, and you should too on paper.
Verify your answers with Vieta's formulas. If your two roots sum to −b/a and multiply to c/a, you almost certainly have the right answer. This 10-second sanity check has saved more exam marks than any other trick. The summary table on this calculator surfaces the values needed for the check.
Why Quadratic Equations Matter
Projectile motion
The trajectory of any object launched under gravity is a parabola in the height-vs-time graph: h(t) = −½ g t² + v₀ t + h₀. Solving for when h(t) = 0 (impact time) or the vertex (peak height) is a quadratic problem in disguise — every kinematics chapter relies on it.
Economics and optimisation
Revenue, cost, and profit curves are routinely modelled as quadratics. Maximum revenue at the vertex, break-even points at the roots, and marginal cost from the derivative all come from the same equation. Even simple supply-and-demand models bottom out as quadratic intersections.
Computer graphics and games
Bezier curves, parabolic arcs, and lens equations in rendering pipelines reduce to quadratics. Ray–sphere intersection — the workhorse of ray tracing — is solved by the quadratic formula on every frame. The same calculation drives collision detection between circles and lines in 2D engines.
Engineering and architecture
Hanging cables under uniform load (suspension bridges, parabolic arches), the cross-section of a satellite dish, and the reflector behind a car headlight are all parabolas. Their structural and optical properties are derived from the same ax² + bx + c that this calculator solves.
Where Quadratic Problems Get Tricky
Hidden quadratics
Equations like (x − 3)(x + 7) = 5 or 1/x + 1/(x + 2) = 3 are quadratics in disguise. Expand, clear denominators, and collect — only then can you read off a, b, and c. This calculator only accepts the standard form, so do that algebra first.
Quadratic in something else
x⁴ − 5x² + 6 = 0 is a quadratic in the substitution u = x². Solve for u with this calculator, then take square roots to recover x. The same trick works for x⁶ − 7x³ + 12, eˣ-based equations, and many trig identities.
Coefficients with units
If your coefficients carry physical units, the discriminant and roots inherit them. Always solve symbolically first, then plug in numbers at the end — that catches dimensional mistakes (m vs cm, s vs ms) before they propagate.
Repeated roots in disguise
When Δ is a small floating-point number like 1e-14, the equation has a repeated root in exact arithmetic but the formula returns two roots that differ by 1e-7. The calculator snaps such near-zero discriminants to zero and reports the repeated case correctly.
Core Quadratic Formulas
Standard form
ax² + bx + c = 0
Every quadratic problem starts here.
Quadratic formula
x = (−b ± √(b² − 4ac)) / (2a)
Universal solution method.
Discriminant
Δ = b² − 4ac
Classifies the roots.
Vertex x-coordinate
h = −b / (2a)
Axis of symmetry of the parabola.
Vertex y-coordinate
k = c − b² / (4a)
Minimum (a > 0) or maximum (a < 0) value.
Vertex form
y = a (x − h)² + k
Useful for transformations and graphing.
Sum of roots
x₁ + x₂ = −b / a
Vieta's first formula.
Product of roots
x₁ · x₂ = c / a
Vieta's second formula.
Factored form
a (x − x₁)(x − x₂)
Equivalent representation when roots are known.
Y-intercept
y(0) = c
Where the parabola meets the y-axis.
Average of roots
(x₁ + x₂) / 2 = h
Midpoint of the roots is the vertex's x.
Distance between roots
|x₁ − x₂| = √Δ / |a|
Width of the gap between the two zeros.
Derivation Of The Quadratic Formula
The quadratic formula is not a magic incantation. Reading through the derivation once makes the formula impossible to forget — it is the result of dividing through by a, completing the square, and taking the square root of both sides. The line-by-line working below is the same proof that appears in every algebra textbook, rewritten with consistent spacing.
ax² + bx + c = 0
Multiply by 1/a
x² + (b/a)x + c/a = 0
x² + (b/a)x = − c/a
From this point, it is possible to complete the square using the identity:
x² + bx + c = (x − h)² + k
Continuing the derivation using this relationship:
x² + (b/a)x + (b/2a)² = − c/a + (b/2a)²
Simplify
(x + b/2a)² = − 4ac/4a² + b²/4a² = (b² − 4ac) / 4a²
Square root both sides
x + b/2a = ± √(b² − 4ac) / 2a
Solve for x
x = (−b ± √(b² − 4ac)) / 2a
Two observations from the derivation: the ± exists because the square root of any positive number has two values, and the discriminant b² − 4ac sits naturally inside the radical — so its sign decides everything about the kind of roots before you take the square root at all. The same line of reasoning produces the vertex form y = a(x − h)² + k if you stop at step 5 and rearrange instead of square-rooting.
Common Quadratic Mistakes
- 1
Skipping the standard-form rewrite
Students plug coefficients in from an unsimplified equation like 3x² + 5 = 7x and end up with the wrong b. Always move every term to the left side first so the right side is exactly 0.
- 2
Sign mistake on b
When b is negative, the formula uses −b — which becomes positive. −(−7) is +7, not −7. The single most common sign error on quadratic exams comes from forgetting this double negative.
- 3
Computing b² with the sign
(−7)² = 49, not −49. b is squared, so the sign of b never reaches the discriminant. Wrap negatives in parentheses before squaring on a calculator.
- 4
Forgetting the ±
Returning only one root is the second most common slip. The ± is the whole point of the formula — write both branches down explicitly even if one looks ugly.
- 5
Dividing instead of multiplying 2a
The denominator is 2a, not 2/a or a/2. For a = 3 the denominator is 6, not 1.5 or 0.667. A wrong denominator throws both roots off.
- 6
Confusing factored form with roots
(2x − 1)(x − 3) = 0 has roots x = 1/2 and x = 3, not x = 1 and x = 3. Set each factor to zero and solve — don't just read the constants.
Three Worked Examples
Example 1 · Two real roots
Solve 2x² − 7x + 3 = 0
a = 2, b = −7, c = 3. Discriminant Δ = (−7)² − 4 · 2 · 3 = 49 − 24 = 25, so √Δ = 5. The denominator 2a = 4. The roots come out as x = (7 + 5) / 4 = 3 and x = (7 − 5) / 4 = 1/2 = 0.5. Verify with Vieta: 3 + 0.5 = 3.5 = 7/2 = −b/a and 3 · 0.5 = 1.5 = 3/2 = c/a. ✓
Example 2 · Repeated root
Solve x² − 4x + 4 = 0
a = 1, b = −4, c = 4. Discriminant Δ = 16 − 16 = 0 → repeated root. x = −b/(2a) = 4/2 = 2. Equivalent factored form: (x − 2)². The parabola y = x² − 4x + 4 just touches the x-axis at x = 2 and never crosses it. Vertex (2, 0).
Example 3 · Complex roots
Solve x² + 4x + 8 = 0
a = 1, b = 4, c = 8. Discriminant Δ = 16 − 32 = −16, so √Δ = 4i. The roots are x = (−4 ± 4i) / 2 = −2 ± 2i. Complex conjugates as expected from real coefficients. The parabola y = x² + 4x + 8 lies entirely above the x-axis (vertex (−2, 4)), so it never intersects y = 0.
Real-Life Applications
Ballistics and sports
Basketball arcs, football punts, golf-ball flight paths, and artillery trajectories are all parabolas through still air. The roots are the launch and landing points; the vertex is the apex; the discriminant decides whether a shot can clear a given height.
Profit maximisation
If revenue is linear and cost is linear, profit is a quadratic in production volume. The vertex gives the optimal quantity to make, and the roots give the break-even points where profit returns to zero. Every Econ 101 textbook leans on this.
Chemistry equilibria
Acid-base equilibria, Ksp calculations, and ICE-table problems frequently produce a quadratic in the unknown concentration. Solving for the positive root of that quadratic gives the equilibrium concentration; the negative root is discarded as unphysical.
Computer graphics
Ray–sphere intersection — used in every ray tracer and most rasterised lighting models — boils down to solving (D · D)t² + 2(O · D)t + (O · O − r²) = 0. The discriminant says whether the ray hits the sphere; the smaller positive root is the first contact.
Tips For Solving Quadratics Faster
- Look for the trivial factorisation first. If a, b, and c are small integers and the equation is monic, try (x − p)(x − q) where pq = c and p + q = −b. Many exam quadratics fall to this in seconds.
- Spot perfect squares. If b² = 4ac, the equation is a perfect square trinomial and the root is just −b/(2a). No formula needed.
- Use Vieta as a check, not a solve. Vieta gives two equations in two unknowns; pairing them with the quadratic formula doesn't speed up solving but does verify it in seconds.
- Clear fractions before plugging in. An equation like ½ x² − x − 3 = 0 is easier to work with after multiplying through by 2 → x² − 2x − 6 = 0. Same roots, smaller numbers.
- Sketch the parabola when stuck. A rough graph reveals quickly whether the discriminant is positive (two crossings), zero (a touch), or negative (no contact). The visual sanity check kills half of all sign mistakes.
Methodology you can verify
Every result is computed from the canonical quadratic formula in double-precision floating point. The discriminant is calculated as b² − 4ac, the square root is taken from Math.sqrt, and the denominator is 2a. Values within 1e-9 of a clean integer, half, or quarter are snapped back to the exact rational — so an answer of 0.49999999 is reported as 0.5. Integer factorisations are found by exhaustive search over the divisors of a · c, and complex roots are returned as a real part ± an imaginary part. Read more on the methodology and editorial policy pages.
Frequently Asked Questions
Related Calculators
More algebra and graphing tools to pair with the quadratic formula.
- Exponent CalculatorSolve y = bˣ for any unknown with expanded multiplication, logarithm derivation, and property breakdown.
- Scientific CalculatorAdvanced trig, log, exponent, root, factorial, and memory functions.
- Root CalculatorSquare root, cube root, and any nth root with step-by-step simplification.
- Slope CalculatorSlope, angle, distance, midpoint, intercepts, and the line equation with an interactive coordinate-plane graph.
- Pythagorean Theorem CalculatorSolve any side of a right triangle, plus area, perimeter, and angles.
- Fraction CalculatorAdd, subtract, multiply, divide, simplify, and convert fractions with step-by-step solutions.
- Common Factor CalculatorGreatest common factor (GCF, HCF, GCD) with step-by-step prime factorization.