Algebra Calculator
This algebra calculator solves linear, quadratic and cubic equations and gives exact answers where it can, including square-root forms such as (5 ± √13)/2. Switch to Simplify to combine like terms or expand brackets.
Result
x = 2 or x = 3
| Rearranged | x² - 5x + 6 = 0 |
|---|---|
| Degree | 2 |
Results update as you type.
How to Use the Algebra Calculator
- Choose Solve or Simplify.
- Type the equation or expression. Use ^ for powers and * (or nothing) for multiplication:
3x^2 - 2x = 5. - Read the answer. Solve shows the solutions, the equation rearranged to = 0 and decimal values. Simplify shows the simplified and expanded forms.
Tap an example to load it and see how the input should look.
Solving Equations by Hand
Linear equations (degree 1)
Undo each operation in reverse order, doing the same thing to both sides.
Example: 5x − 7 = 2x + 8
- Subtract 2x from both sides: 3x − 7 = 8
- Add 7 to both sides: 3x = 15
- Divide by 3: x = 5
Quadratic equations (degree 2)
Rearrange to ax² + bx + c = 0. If it factors easily, set each factor to zero. Otherwise use the quadratic formula:
x = (−b ± √(b² − 4ac)) / 2a
The part under the square root, b² − 4ac, is the discriminant. It tells you what kind of answers to expect:
| Discriminant | Solutions |
|---|---|
| Positive perfect square | Two rational solutions |
| Positive, not a perfect square | Two irrational solutions (square-root form) |
| Zero | One repeated solution |
| Negative | No real solutions; two complex solutions |
Example: x² − 5x + 3 = 0
- a = 1, b = −5, c = 3
- Discriminant: 25 − 12 = 13, which is not a perfect square
- x = (5 ± √13) / 2, so x ≈ 0.6972 or x ≈ 4.3028
Cubic equations (degree 3)
Look for a whole-number root first. Any rational root of a polynomial with integer coefficients is a factor of the constant term divided by a factor of the leading coefficient. For x³ − 6x² + 11x − 6 = 0, try 1: 1 − 6 + 11 − 6 = 0, so x = 1 is a root. Dividing by (x − 1) leaves x² − 5x + 6 = (x − 2)(x − 3). The solutions are x = 1, 2 and 3.
Simplifying Expressions
Simplifying combines like terms and tidies the expression without changing its value:
- 2x + 3x − 4 → 5x − 4
- (x + 1)² → x² + 2x + 1 (expanded)
- 3/4 + 1/8 → 0.875
Common Mistakes
- Dropping the ±. A quadratic usually has two solutions. Taking only the positive square root loses one.
- Dividing by x. In x² = 3x, dividing both sides by x loses the solution x = 0. Move everything to one side and factor instead: x(x − 3) = 0.
- Sign errors when moving terms. When a term crosses the = sign, its sign flips.
- Forgetting excluded values. In (x² − 1)/(x − 1) = 0, x = 1 makes the denominator zero, so the only solution is x = −1.
To see your equation as a graph, plot each side in the graphing calculator. The solutions are where the graphs cross. For fraction arithmetic, use the fraction calculator.
Frequently Asked Questions
How do I solve a linear equation?
Get all the x terms on one side and the numbers on the other, then divide by the coefficient of x. For 2x + 3 = 7, subtract 3 from both sides to get 2x = 4, then divide by 2 to get x = 2.
How do I solve a quadratic equation?
Rearrange it to ax² + bx + c = 0, then try factoring. For x² − 5x + 6 = 0, (x − 2)(x − 3) = 0, so x = 2 or x = 3. If it doesn't factor, use the quadratic formula x = (−b ± √(b² − 4ac)) / 2a.
What does it mean if there is no real solution?
The equation has no real number that makes it true. For quadratics this happens when b² − 4ac is negative. x² + 1 = 0 has no real solution, but it has the complex solutions x = ±i. The calculator lists complex solutions when there are no real ones.
What kinds of equations can it solve?
Polynomial equations in one variable up to degree 3, such as 2x + 3 = 7, x² − 5x + 6 = 0 or x³ − 6x² + 11x − 6 = 0. It also handles fractions of polynomials, and it drops any answer that would make a denominator zero. It doesn't solve trigonometric or exponential equations; graph those instead.
How do I type exponents and multiplication?
Use ^ for powers, so x squared is x^2. Multiplication can be written with * or left out between a number and a variable, so 3x and 3*x are the same. Use brackets for grouping, such as (x + 1)^2.
What is the difference between simplify and solve?
Solve finds the values of x that make an equation true, so it needs an = sign or assumes the expression equals zero. Simplify rewrites an expression in a neater form without solving it, for example 2x + 3x − 4 becomes 5x − 4 and (x + 1)² expands to x² + 2x + 1.
Related Calculators
Sources & Assumptions
- OpenStax, College Algebra 2e — linear and quadratic equations, the quadratic formula, polynomial functions and complex numbers
- Equations are rearranged and solved with the open-source math.js library (polynomial roots up to degree 3). Rational answers are shown as exact fractions; other answers are shown in square-root form or to 6 decimal places.
Last reviewed: