# Free online quadratic equation solver

> A quadratic equation has the form ax² + bx + c = 0. This solver finds all roots using the quadratic formula and tells you whether they are real, repeated, or complex.

Solve any quadratic equation ax² + bx + c = 0. Shows the discriminant, solution type, and both real or complex roots instantly.

**Interactive version:** https://onlinecalculator.me/math/quadratic/
**Category:** Math

## How to use

1. Enter **a**, **b**, and **c** — the coefficients of your equation in the form ax² + bx + c = 0.
2. The solver updates the equation preview and computes roots immediately.
3. Read the discriminant and roots below the form.

## The quadratic formula

```
x = (-b ± sqrt(b² - 4ac)) / (2a)
```

**Variables:**
- **a** — coefficient of x² (must be non-zero)
- **b** — coefficient of x
- **c** — constant term
- **Δ** (discriminant) = b² − 4ac

## Solution types

| Discriminant | Roots |
|---|---|
| Δ > 0 | Two distinct real roots |
| Δ = 0 | One repeated real root |
| Δ < 0 | Two complex conjugate roots |

## Worked examples

**Two real roots:** x² − 5x + 6 = 0 (a=1, b=−5, c=6)
Δ = 25 − 24 = 1 → x₁ = 3, x₂ = 2

**One real root:** x² − 4x + 4 = 0 (a=1, b=−4, c=4)
Δ = 16 − 16 = 0 → x = 2

**Complex roots:** x² + x + 1 = 0 (a=1, b=1, c=1)
Δ = 1 − 4 = −3 → x = −0.5 ± 0.866025i

## Notes

- Results are rounded to six decimal places to avoid floating-point noise.
- Complex roots always come in conjugate pairs (a + bi and a − bi).
- If a = 0, the equation degenerates to a linear equation; use the constant and b values to solve it directly: x = −c / b.

## Frequently asked questions

### What is the quadratic formula?

x = (−b ± √(b² − 4ac)) / (2a). The ± gives two solutions. When the discriminant b² − 4ac is negative, the roots are complex numbers.

### What does the discriminant tell you?

If b² − 4ac > 0 there are two distinct real roots; = 0 gives one repeated real root; < 0 gives two complex conjugate roots.

### What happens when a = 0?

The equation becomes linear (bx + c = 0), not quadratic. The solver flags this and prompts you to enter a ≠ 0.

### How are complex roots displayed?

Complex roots are written as x = realPart ± imagPart·i. Both roots share the same real part and imaginary parts of opposite sign.

### Can I solve equations with negative coefficients?

Yes. Enter negative values for a, b, or c directly. The formula handles all sign combinations.

## Sources

- [Quadratic formula](https://en.wikipedia.org/wiki/Quadratic_formula) — Wikipedia
- [Quadratic Equation](https://mathworld.wolfram.com/QuadraticEquation.html) — Wolfram MathWorld

## Related calculators

- [Fraction calculator](https://onlinecalculator.me/math/fraction/) — Add, subtract, multiply, and divide fractions with automatic simplification.
- [Percentage change calculator](https://onlinecalculator.me/math/percentage-change/) — Find how much a value changed, or calculate a new value from a percent.
- [Average calculator](https://onlinecalculator.me/math/average/) — Mean, median, mode, range, and more for any list of numbers.
- [Scientific calculator](https://onlinecalculator.me/math/scientific/) — Full scientific calculator with trig, logs, memory, and keyboard support.

---

Part of [onlinecalculator.me](https://onlinecalculator.me/) — free calculators that run entirely in your browser.
Machine-readable index: https://onlinecalculator.me/llms.txt
