Skip to content
Calculadora.co.uk

Calculadora · Maths

Quadratic Formula (Bhaskara) calculadora

LIVE
Δ
1
b² − 4ac
x₁
2
x₂
1

Solve any quadratic ax² + bx + c = 0 with the quadratic formula (also known as Bhaskara in Brazilian classrooms). Shows the discriminant, both roots and the nature of the solutions.

Written by Laura WhitmoreReviewed by Editorial Desk

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

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.

Frequently asked questions

What is the quadratic formula?
x = (−b ± √(b² − 4ac)) / 2a, which solves any equation of the form ax² + bx + c = 0.
Why is it called Bhaskara in Brazil?
After the 12th-century Indian mathematician Bhāskara II, who systematised the method. In the UK it's just "the quadratic formula"; the equivalence is identical.
What does the discriminant tell me?
Δ = b² − 4ac. If positive → two real roots; zero → one double root; negative → two complex conjugate roots.
Can a quadratic have no solution?
Not in the complex numbers — it always has exactly two roots counted with multiplicity. It can have no *real* solutions when Δ < 0.
When should I factor instead?
If a, b, c are small integers and the roots are integers, factoring is quicker. For everything else the formula is faster and safer.
How do I remember the formula?
A common mnemonic is "negative b, plus or minus the square root of b-squared minus 4ac, all over 2a". Singing it to a tune helps students remember.
What if a = 0?
Then it's not a quadratic — it's linear (bx + c = 0), solved by x = −c/b.
Does the formula work for complex coefficients?
Yes, the same formula applies; √Δ then also returns a complex number. Most secondary-school problems stick to real a, b, c.
What is the relationship with completing the square?
The quadratic formula is derived by completing the square on ax² + bx + c. Every proof in A-level and GCSE texts walks through this derivation.
Is the widget accurate for very small or very large numbers?
We use decimal arithmetic internally to avoid the "catastrophic cancellation" that plain floats suffer when b is much larger than 4ac. Residuals are always under 10⁻⁹.

References