How it works
What the quadratic formula does
A quadratic equation has the general shape ax² + bx + c = 0 with a ≠ 0. The quadratic formula (known as Bhaskara in Brazilian and Portuguese textbooks, after the 12th-century Indian mathematician Bhāskara II) gives every possible value of x that satisfies the equation, in one step.
It works whether the coefficients are integers, decimals or letters — which is why it beats factoring as a general-purpose tool. Our widget accepts a, b and c and returns the discriminant, both roots and the factored form.
The formula, step by step
- Step 1 — write the equation as ax² + bx + c = 0 with 0 on the right.
- Step 2 — read off the coefficients a, b, c.
- Step 3 — compute the discriminant Δ = b² − 4ac.
- Step 4 — if Δ < 0 the roots are complex: x = (−b ± i√|Δ|) / 2a.
- Step 5 — else apply x = (−b ± √Δ) / 2a to get the two real roots.
Three worked examples
1. Two distinct real roots — x² − 5x + 6 = 0
a = 1, b = −5, c = 6.
Δ = (−5)² − 4 × 1 × 6 = 25 − 24 = 1.
x = (5 ± √1) / 2 → x₁ = 3, x₂ = 2.
Cross-check by factoring: (x − 2)(x − 3) = 0. ✓
2. Repeated root — x² − 6x + 9 = 0
a = 1, b = −6, c = 9.
Δ = 36 − 36 = 0 → single real root.
x = 6 / 2 = 3 (multiplicity 2). The parabola touches the x-axis once.
3. Complex roots — x² + 2x + 5 = 0
a = 1, b = 2, c = 5.
Δ = 4 − 20 = −16 → no real roots.
x = (−2 ± √−16) / 2 = −1 ± 2i. The parabola sits entirely above the x-axis.
What the discriminant tells you
- Δ > 0 — two distinct real roots; the parabola crosses the x-axis twice.
- Δ = 0 — one real root (double); the parabola is tangent to the x-axis.
- Δ < 0 — two complex conjugate roots; the parabola doesn't touch the x-axis.
- Vertex — the x-coordinate of the minimum/maximum is x = −b/2a, regardless of Δ.
- Sum and product of roots (Vieta's formulas): x₁ + x₂ = −b/a and x₁ × x₂ = c/a. Handy for cross-checks.
When to factor vs when to use the formula
Factoring is faster when a, b and c are small integers and the roots are obvious (like x² − 7x + 12). The formula wins when coefficients are ugly, the roots involve radicals, or you need a programmatic answer.
Completing the square sits between the two and is how Bhaskara's formula is actually derived — useful to know for A-level exam proofs.
Real-world uses
- Projectile motion — the height h(t) = h₀ + v₀t − ½gt² is quadratic in t; solving h = 0 tells you when the projectile lands.
- Profit maximisation — revenue − cost is often a downward-opening parabola; the vertex gives the profit-maximising price.
- Area problems — "a rectangle has perimeter 40 m and area 96 m²" becomes x(20 − x) = 96, a quadratic in x.
- Physics / engineering — resonant frequency, LC circuits, RLC damping — all quadratic in nature.
Works well with
- **Pythagoras calculadora** — sides of right triangles often lead to quadratic equations.
- **Exponentiation calculadora** — powers appear throughout quadratic derivations.
- **GCD calculadora** — useful when simplifying roots in surd form.
- **Rule of three** — quick proportional sanity check on answers.
How we verify the algebra
Every run of the widget recomputes both roots, substitutes them back into the original equation and reports the residual — if |ax² + bx + c| > 10⁻⁹ we flag a warning. We reference AQA GCSE, Edexcel A-level textbooks and the CRC Standard Mathematical Tables. See our editorial policy and corrections policy — all calculations run in your browser.
