Equation Solver and Algebra Calculator
Solve any linear or quadratic equation in one variable with the rearrangement shown line by line — discriminant, exact roots, vertex, factored form and a check.
Equation Solver and Algebra Calculator: with the default inputs, solution is x = 4.
Use ^ for powers. 2x means 2 × x. Leave out the = and it is solved against zero.
- Type of equation
- Linear equation — exactly one solution
- Everything on one side
- 2x − 8 = 0
- First root
- 4
- Second root
- —
- Discriminant (b² − 4ac)
- —Quadratics only. Positive → two real roots, zero → one, negative → a complex pair.
- Factored form
- 2(x − 4) = 0
- Vertex of the parabola
- —
- Check
- x = 4 → left 13, right 13Each root substituted back into the equation you typed.
Assumptions
- The equation is parsed into an exact polynomial, so both sides may contain brackets, fractions with numeric denominators, and terms in any order.
- Only one unknown, and only degree 1 or 2 after collecting like terms.
- Coefficients are scaled by a power of two before the discriminant is formed. That shift is exact in binary floating point, so the roots are unchanged to the last bit while b² can no longer overflow.
- Roots use the cancellation-free form of the quadratic formula (q = −½(b + sign(b)√D), then x = q/a and x = c/q).
- Factored form is shown only when the roots are rational after clearing at most six decimal places.
How this is worked out
The formula
Collect everything on one side: a·x² + b·x + c = 0 Linear (a = 0): x = −c ÷ b Quadratic: x = (−b ± √(b² − 4ac)) ÷ 2a Discriminant: D = b² − 4ac ( D > 0 two real roots · D = 0 one · D < 0 a complex pair ) Vertex: x = −b ÷ 2a, y = c − b² ÷ 4a Sum of roots = −b ÷ a, product of roots = c ÷ a
Open How it’s calculated above to see this worked through with your own numbers.
What you enter
- Equation
- Use ^ for powers. 2x means 2 × x. Leave out the = and it is solved against zero.up to 120 characters · defaults to "2x + 5 = 13"
- Solve for(under More options)
- One letter. If your equation uses a different letter, the solver picks it up.up to 1 characters · defaults to "x"
What you get back
- Solutionmain answer
- Type of equation
- Everything on one side
- First root
- Second root
- Discriminant (b² − 4ac)
- Quadratics only. Positive → two real roots, zero → one, negative → a complex pair.
- Factored form
- Vertex of the parabola
- Check
- Each root substituted back into the equation you typed.
What this assumes
- The equation is parsed into an exact polynomial, so both sides may contain brackets, fractions with numeric denominators, and terms in any order.
- Only one unknown, and only degree 1 or 2 after collecting like terms.
- Coefficients are scaled by a power of two before the discriminant is formed. That shift is exact in binary floating point, so the roots are unchanged to the last bit while b² can no longer overflow.
- Roots use the cancellation-free form of the quadratic formula (q = −½(b + sign(b)√D), then x = q/a and x = c/q).
- Factored form is shown only when the roots are rational after clearing at most six decimal places.
About this calculator
Type the equation the way it appears on the page — brackets, fractions, terms on both sides — and this solves it and shows the rearrangement. It handles anything that collects down to a linear or quadratic equation in one unknown, which covers most of a first algebra course.
How to use it
Write the equation with an = in it: 3(x - 2) = 4x + 1. Use ^ for powers (x^2), and 2x is understood as 2 × x. If you leave the = out, the expression is solved against zero, so pasting x^2 - 3x + 2 works. Solving for a letter other than x needs no setting — if your equation uses t or y, the solver notices.
What the results mean
Everything on one side is the standard form after the rearrangement, which is the step most mistakes hide in. Compare it against your own working first.
The discriminant, b² − 4ac, decides the shape of the answer before you finish the formula:
- Positive — two different real solutions; the parabola crosses the x-axis twice.
- Zero — one repeated solution; the vertex sits exactly on the axis.
- Negative — no real solutions. The roots are a complex conjugate pair like 1 ± 2i, which is reported rather than dismissed as "no solution".
Factored form is rebuilt exactly when the roots are rational, so 2x² + 5x + 3 = 0 comes back as (2x + 3)(x + 1) = 0 with whole-number coefficients. Irrational roots like √2 genuinely have no rational factorization, and the calculator says so rather than printing decimals dressed up as factors.
Check substitutes each answer back into the equation you typed. On a clean problem both sides match exactly; a residual of 1 × 10⁻¹⁶ is floating-point dust, not an error.
Two kinds of non-answer, both real
Some equations have no solution and some have every solution, and they are different things. 2x + 3 = 2x + 4 collects to −1 = 0, a contradiction: no value of x works. 2(x + 1) = 2x + 2 collects to 0 = 0, an identity: every value works. Both are reported as results, not errors.
Accuracy, and why this one does not overflow
Two things quietly break naive quadratic solvers. The first is overflow: b² exceeds what a double-precision number can hold once |b| passes about 1.3 × 10¹⁵⁴, and an overflowed discriminant turns into ±∞ or NaN, which usually gets reported as "no real roots" for an equation that has two. This solver divides a, b and c by a power of two large enough to bring them all under 1 before touching b² − 4ac. A power of two is chosen deliberately: shifting a binary exponent is exact, so the answer is bit-for-bit what you would get without the scaling, and the discriminant can no longer overflow.
The second is cancellation: when b² is much larger than 4ac, the textbook formula subtracts two almost identical numbers for one of the roots and can lose every significant digit. For x² + 10⁹x + 1 = 0 the naive formula returns 0 for the smaller root; the true value is about −10⁻⁹. This solver uses the algebraically identical form that never subtracts nearly-equal quantities.
Common mistakes
- Sign errors on b: in x² − 3x + 2, b is −3, so −b is +3.
- Dividing only part of −b ± √D by 2a. The whole numerator is divided.
- Forgetting the ± and reporting one root when there are two.
- Multiplying out brackets incorrectly — compare your standard form against the one shown above.
Frequently asked questions
▸How do I solve 2x + 5 = 13?
Subtract 5 from both sides to get 2x = 8, then divide both sides by 2 to get x = 4. The calculator shows exactly those two steps.
▸What does the discriminant tell me?
b² − 4ac decides how many real solutions a quadratic has: positive means two, zero means one repeated root, negative means none over the real numbers (two complex conjugate roots instead).
▸Can it solve cubic or higher equations?
No. Anything that collects to degree 3 or more is reported as such rather than approximated. Linear and quadratic equations in one unknown are what it does exactly.
▸Why does it say 'no solution' for 2x + 3 = 2x + 4?
Because the x terms cancel and what is left, 3 = 4, is false. No value of x can make it true. The opposite case, where everything cancels to 0 = 0, is reported as an identity — every value works.
▸Can I type an equation without an equals sign?
Yes. An expression on its own is solved against zero, so x^2 - 3x + 2 is treated as x^2 - 3x + 2 = 0.
Put this calculator on your own site
A working equation solver, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.
Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.
Equation Solver and Algebra Calculator by CalculateItNow
The page's own title. The clearest description of what the link leads to.
The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.
Browse every calculator widget·How to add it to WordPress, Squarespace or Wix
Related calculators
The questions people ask next to a equation solver.
Solve ax² + bx + c = 0 with the quadratic formula — real or complex roots, discriminant, vertex, axis of symmetry, factored form and a graph of the parabola.
Mean, median, mode, range, quartiles, IQR, outliers and skewness from any list of numbers — with sample and population standard deviation shown side by side.
Differentiate a function and see which rule does the work at every term — power, product, quotient and chain — plus the value, tangent line and second derivative.
Slope, y-intercept and the equation of the line through two points, plus distance, midpoint, angle and the perpendicular slope — with rise-over-run shown.
Every factor of a number, its prime factorisation, factor pairs, the divisor count and sum, and whether it is prime, perfect, abundant or deficient.
Type a whole expression and get an exact answer: brackets, powers, roots, logs, trigonometry in degrees or radians, and the order of operations applied properly.