Home › Math › Quadratic Equation Solver
Quadratic Equation Solver
Solves ax² + bx + c = 0 with the quadratic formula, reporting the discriminant, both roots (real, or complex conjugates written as strings), the vertex of the parabola and the sum and product of the roots.
When to use
You need the solutions of a second-degree polynomial equation, or the vertex and discriminant of a parabola y = ax² + bx + c.
Do not use when: The coefficient a is 0 (the equation is linear: x = −c / b), or you need roots of x^n = c for other powers (use nth-root).
Formula
Δ = b² − 4ac; x = (−b ± √Δ) / (2a); for Δ < 0: x = −b/(2a) ± i·√(−Δ)/(2|a|); vertex = (−b/(2a), c − b²/(4a))
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
a | number | yes | Coefficient of x². Must not be 0. | |
b | number | yes | Coefficient of x. | |
c | number | yes | Constant term. |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
discriminant | number | Δ = b² − 4ac; positive → two real roots, zero → one repeated root, negative → complex roots. | |
nature | string | Plain-language classification of the roots from the sign of the discriminant. | |
root1 | number | (−b + √Δ) / (2a). Only when the roots are real. | |
root2 | number | (−b − √Δ) / (2a). Only when the roots are real. | |
roots | string | Both roots as text; complex roots are written like '-1+2i, -1-2i'. | |
vertex_x | number | x-coordinate of the parabola's vertex, −b / (2a) (also the axis of symmetry). | |
vertex_y | number | y-coordinate of the vertex, c − b² / (4a) (the minimum for a > 0, maximum for a < 0). | |
sum_of_roots | number | −b / a (Vieta's formula). | |
product_of_roots | number | c / a (Vieta's formula). |
Example
x² − 5x + 6 = 0: {"a":1,"b":-5,"c":6} → {"discriminant":1,"nature":"Two distinct real roots","root1":3,"root2":2,"roots":"3, 2","vertex_x":2.5,"vertex_y":-0.25,"sum_of_roots":5,"product_of_roots":6}
x² + 2x + 5 = 0: {"a":1,"b":2,"c":5} → {"discriminant":-16,"nature":"Two complex conjugate roots (no real roots)","roots":"-1+2i, -1-2i","vertex_x":-1,"vertex_y":4}
GET https://tttkmbb.com/api/v1/calculate/quadratic-equation?a=1&b=-5&c=6
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/quadratic-equation(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/quadratic-equation · Markdown: https://tttkmbb.com/math/quadratic-equation.md · JSON definition: https://tttkmbb.com/math/quadratic-equation.json
- MCP: server
https://tttkmbb.com/mcp, toolsolve_quadratic_equation - OpenAPI operationId:
solve_quadratic_equation - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Quadratic formula (reference)
- Wolfram MathWorld – Quadratic Equation (reference)
FAQ
What does a negative discriminant mean?
The parabola never crosses the x-axis, so there are no real solutions. The two complex conjugate roots are still reported as strings such as '-1+2i, -1-2i'.
Which root is root1?
root1 uses the + sign in the quadratic formula and root2 the − sign, so for a > 0 root1 is the larger root.
Related calculators
- Nth Root Calculator — Solve x^n = c for a single power.
- Exponent Calculator — Evaluate powers appearing in polynomial terms.
- Slope Calculator — Linear equations from two points.