Linear and quadratic equation solver

Solve a linear or quadratic equation from exact numeric coefficients, distinguishing real and complex roots, identities and equations with no solution.

Coefficients and operation

Enter coefficients only. A zero leading coefficient reduces the effective degree. Irrational and complex roots use exact symbolic expressions without decimal approximation; sqrt means square root and i² = −1.

Enter integers or finite decimals. Digits 0–9, ٠–٩ and ۰–۹, a +, - or − sign, and decimal separator . or ٫ are accepted. No whitespace, grouping separators, fractions such as 1/2, scientific notation or expressions. Line breaks are not allowed and are not removed to join digits into a number.

Each coefficient allows at most 48 text units and 30 total digits, including up to 18 after the decimal separator; leading zeroes count. Up to 6 rows, 6 columns, 72 input cells and 8,192 text units per operation.

Cells outside the visible dimensions, c in linear mode and B in unary operations are excluded from calculation. Their values remain on this page while hidden. A rejected cell stays rejected until that same cell is corrected or cleared.

Exact rational arithmetic inside your browser, with one worker and a 5-second deadline. Reports are limited to 64 KiB. No automatic storage or requests carrying coefficients. Work or intermediate-number limits can reject a calculation.

How to use

Choose the degree, then enter a, b and c where shown. Calculate and read the effective degree, solution status and mathematical report. sqrt denotes a square root and i is the imaginary unit with i²=−1. Use preview pages when needed, or copy the complete report or download TXT.

Try an example

For x²−5x+6=0, enter a=1, b=−5 and c=6; the roots are 2 and 3. The equation x²+1=0 gives −i and i, while x²−2=0 gives exact symbolic roots. In linear mode, 2x−6=0 gives x=3.

Support & limits

The engine converts decimal coefficients to exact fractions and displays an equivalent equation with normalized integer coefficients. Its reported discriminant belongs to that equivalent equation and may differ numerically from the original coefficients’ discriminant. Irrational roots use radical expressions that may remain unsimplified, without decimal approximation. A zero leading coefficient reduces the effective degree rather than causing an error. Hidden c is excluded in linear mode; its value and rejection state remain on this page when quadratic mode is restored. The tool does not evaluate code or free-form equation text.

Common questions

What happens when a is zero or every coefficient is zero?

For a quadratic equation, a=0 reduces it to bx+c=0. For a linear equation, a=0 with nonzero b means no solution; with b=0 it is an identity. A quadratic with all coefficients zero is also an identity. These cases are explicit, without inventing roots by dividing by zero.

Related tools