Equation Solver
Solve linear, quadratic, cubic, and simultaneous equations with step-by-step working.
About this tool
Enter coefficients and the solver handles four equation types: single-variable linear (ax + b = c), quadratic (ax² + bx + c = 0) with real and complex roots, a 2×2 system of linear equations via Cramer's rule, and cubic (ax³ + bx² + cx + d = 0) using Newton-Raphson iteration. Every solution includes step-by-step working, and rational roots are displayed as fractions.
How to use
- 1 Select the equation type using the tab buttons at the top.
- 2 Enter the required coefficients in the input fields shown.
- 3 Click 'Solve' to calculate the solution.
- 4 Read the step-by-step working shown below the result to understand the method used.
What this solver covers
This tool solves four of the equation types you meet most often in algebra and early calculus, each with full step-by-step working rather than just an answer:
- Linear —
ax + b = c, one unknown, one solution. - Quadratic —
ax² + bx + c = 0, solved by the quadratic formula, including complex roots. - 2×2 system — two linear equations in
xandy, solved by Cramer's rule. - Cubic —
ax³ + bx² + cx + d = 0, solved numerically.
A useful detail: the solver tries to express answers as exact fractions when it can. Internally it searches for a small denominator that reproduces the decimal result, so a root of 0.5 is shown as 1/2 and 1.333… as 4/3, falling back to a rounded decimal only when no clean fraction fits. Everything runs in your browser, so it works offline and nothing you type is sent anywhere.
How the quadratic case works — a worked example
Take the default x² − 3x + 2 = 0 (so a=1, b=−3, c=2). The solver computes the discriminant first: Δ = b² − 4ac = 9 − 8 = 1. The sign of Δ decides everything:
| Discriminant | Meaning | Roots |
|---|---|---|
| Δ > 0 | Two distinct real roots | x = (−b ± √Δ) / 2a |
| Δ = 0 | One repeated real root | x = −b / 2a |
| Δ < 0 | Two complex conjugate roots | x = (−b ± i√−Δ) / 2a |
Here Δ = 1 > 0, so x = (3 ± 1) / 2, giving x₁ = 2 and x₂ = 1. Change c to 5 and the discriminant becomes 9 − 20 = −11; the solver switches to complex output and reports the conjugate pair built from the real part −b/2a and the imaginary part √11 / 2. This is the value of seeing the working: the discriminant tells you the character of the solutions before you ever reach the final line.
Systems and the determinant
For a 2×2 system ax + by = c and dx + ey = f, the solver uses Cramer's rule. It computes the determinant D = ae − bd. If D is non-zero there is exactly one solution: x = (ce − bf)/D and y = (af − cd)/D. If D = 0 the two lines are either parallel (no solution) or the same line (infinitely many), and the tool tells you there is no unique solution rather than dividing by zero. Geometrically, the determinant measures whether the two lines actually cross at a single point.
How the cubic is solved (and what that means for you)
The cubic solver does not use the closed-form Cardano formula. Instead it applies Newton–Raphson iteration from several starting guesses (spread from −10,000 to +10,000), keeping each distinct value of x where the equation evaluates to essentially zero. This is robust and finds all the real roots, and the tool reports a residual like f(x) ≈ 2e-9 so you can see how close each root is. Two practical consequences follow: a cubic with one real root and two complex roots will show only the single real root here, and roots are found numerically, so they are extremely accurate but expressed as the nearest clean fraction or a rounded decimal rather than a symbolic surd like ∛2.
Common mistakes the tool helps you avoid
- Putting the quadratic in the linear box. The linear solver expects
ax + b = c. If you enter a quadratic by settinga = 0, it correctly refuses and points you to the right tab. The quadratic tab likewise rejectsa = 0and sends you to the linear solver. - Sign errors in the formula. The most common hand-calculation bug is mishandling the
−bterm whenbis already negative. Because the tool prints each substitution explicitly, you can compare your scratch work line by line and find exactly where a sign flipped. - Forgetting the "= c" side. A linear equation here is
ax + b = c, notax + b = 0. To solve2x + 3 = 0, enterc = 0. - Expecting complex roots from the cubic tab. If a cubic returns fewer than three roots, the missing ones are complex; the numerical method here reports real roots only.
- Reading the fraction as the only truth. When a root is irrational, the fraction shown is a close rational approximation (note the
≈). For exact irrational answers, treat the decimal as the precise value and the fraction as a readable hint.
Used well, the step-by-step output makes this more than an answer key: it is a way to check your own algebra and to see why an equation has the number and type of solutions it does.
Frequently Asked Questions
Full scientific calculator with trig, logarithms, powers, and history — runs entirely in your browser.
Add, subtract, multiply, and divide fractions with step-by-step working and visual fraction bars.
Calculate mean, median, mode, standard deviation, variance, and more from any dataset.