Home › Calculators › Algebra Calculator

Algebra Calculator

Type an algebraic expression to simplify it, multiply out the brackets or factor it completely. Answers are exact (fractions and radicals, never rounded) and every result comes with the rules that produced it.

Last updated:

Reads as
Advertisement
Advertisement

How to use the Algebra Calculator

  1. Pick a mode: Simplify, Expand or Factor.
  2. Type your expression using ^ for powers, / for fractions and sqrt() for roots, or tap the symbol buttons. 2x and x(x+1) are read as multiplication.
  3. Check the preview to make sure the expression was read the way you meant it.
  4. Read the result and steps. The result updates as you type; press the green button or Enter to recalculate.
  5. Copy the answer as plain text or as LaTeX for documents.

Algebra rules the calculator applies

RulePatternExample
Combine like termsax + bx = (a + b)x3x + 2x − 4 = 5x − 4
Product of powersxᵃ · xᵇ = xᵃ⁺ᵇx² · x⁵ = x⁷
Power of a power(xᵃ)ᵇ = xᵃᵇ(2x³)² = 4x⁶
Distributive lawa(b + c) = ab + ac2(x − 4) = 2x − 8
Square of a binomial(a ± b)² = a² ± 2ab + b²(x + 3)² = x² + 6x + 9
Difference of squaresa² − b² = (a − b)(a + b)x² − 16 = (x − 4)(x + 4)
Sum / difference of cubesa³ ± b³ = (a ± b)(a² ∓ ab + b²)x³ − 8 = (x − 2)(x² + 2x + 4)
Simplify a radical√(a²b) = a√b√72 = 6√2
Cancel a common factor(ac)/(bc) = a/b, c ≠ 0(x² − 1)/(x − 1) = x + 1
Pythagorean identitysin²u + cos²u = 1sin²x + cos²x + x = x + 1

A reliable order for factoring

  1. Take out the greatest common factor first. 2x³ − 8x = 2x(x² − 4). Everything after this step is easier.
  2. Count the terms. Two terms: look for a difference of squares or a sum or difference of cubes. Three terms: try a perfect-square trinomial, then the ac method. Four terms: try grouping in pairs.
  3. For trinomials ax² + bx + c, find two integers that multiply to a·c and add to b. For 6x² + 11x − 10, a·c = −60 and the pair is 15 and −4, so 6x² + 15x − 4x − 10 = 3x(2x + 5) − 2(2x + 5) = (3x − 2)(2x + 5).
  4. For cubics and higher, test candidate roots ±p/q, where p divides the constant term and q divides the leading coefficient. Each root r gives a factor (x − r).
  5. Check every factor again – x⁴ − 16 becomes (x² − 4)(x² + 4) and then (x − 2)(x + 2)(x² + 4).

Typing tips

  • Brackets matter: 1/2x means (1/2)·x, while 1/(2x) puts 2x in the denominator. The "Reads as" preview shows the interpretation.
  • Write x^(1/3) or cbrt(x) for cube roots and |x| or abs(x) for absolute value.
  • Functions such as sin, cos, ln and log (base 10) are treated as single quantities, so sin(x)² − sin(x) factors as sin(x)(sin(x) − 1).

Frequently asked questions

What is the difference between simplify, expand and factor?

Expanding multiplies out every bracket and combines like terms, giving a sum of terms such as x² + 5x + 6. Factoring does the reverse and writes the expression as a product, such as (x + 2)(x + 3). Simplifying chooses whichever correct form is shortest: it combines like terms, applies exponent rules and cancels common factors in fractions.

How do I type exponents, roots and fractions?

Use ^ for powers (x^3, 2^(n+1)), sqrt() for square roots, cbrt() or ^(1/3) for cube roots and / for division with brackets around longer numerators and denominators, for example (x^2-1)/(x+1). Multiplication can be written with * or left out: 3x, 2(x+1) and (x+1)(x-1) all work.

How do you simplify a rational expression?

Write everything over one denominator, factor the numerator and the denominator, then cancel the factors they share. For (x² − 9)/(x² + 6x + 9) the numerator is (x − 3)(x + 3) and the denominator is (x + 3)², so the expression simplifies to (x − 3)/(x + 3), valid for x ≠ −3.

Why does my polynomial not factor?

Some polynomials are irreducible over the rational numbers, which means they cannot be written as a product of lower-degree polynomials with rational coefficients. x² + 1 and x² − 2 are examples. When a quadratic has real but irrational roots, the calculator also shows the factorization over the real numbers using square roots.

Which factoring methods does it use?

It factors out the greatest common factor, recognises differences of squares, perfect-square trinomials and sums or differences of cubes, uses the ac method for trinomials, factors by grouping, finds rational roots with the rational root theorem and searches for higher-degree factors with integer coefficients.

Can it handle more than one variable?

Yes. Any single letters can be variables, so expressions such as 4x² − 9y², a² + 2ab + b² or xy + 3x + 2y + 6 can be expanded, simplified and factored. The letter e means Euler's number and pi means π.

Is the answer always correct?

Results are calculated with exact rational arithmetic and then checked by evaluating both your expression and the result at several random values. A green check mark means they agreed. Very large expressions may be refused because the engine runs inside your browser.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Equation SolverSolve any equation for x: exact roots, complex roots, numeric answers, steps and a graph.Factoring Trinomials CalculatorFactor trinomials and polynomials: GCF, ac method, difference of squares, cubes, with steps.Derivative CalculatorSymbolic derivative of any f(x) up to 5th order, with steps, slope at a point and a graph.Limit CalculatorEvaluate limits at a point or at infinity, one-sided or two-sided, with steps, table and graph.Function Composition CalculatorFind f(g(x)), g(f(x)), f + g, f · g and f / g with values at a point and domains.Online Math KeyboardOn-screen math keyboard for fractions, exponents, roots, Greek and operators, as Unicode text or LaTeX.Polynomial Long Division CalculatorDivide polynomials with the full long division layout, quotient, remainder and steps.Rational Expressions CalculatorSimplify, add, subtract, multiply and divide rational expressions with excluded values.Graphing CalculatorPlot multiple functions with zoom, pan, intersections and a value table.Exponent CalculatorRaise any number to a power, including negative and fractional exponents.Logarithm CalculatorCalculate log in any base, ln, log10, log2 and antilog with change-of-base steps.Quadratic Equation SolverSolve ax² + bx + c = 0 with exact roots, steps, vertex and a parabola graph.Matrix CalculatorAdd, multiply, invert and row-reduce matrices up to 5×5 with exact fractions and steps.Prime Number CheckerCheck if a number is prime, factor it with a factor tree and list primes in a range.GCF and LCM CalculatorFind the GCF and LCM of two or more numbers with Euclid steps and prime factorization.Cubic Yard CalculatorConvert length, width and depth in any unit to cubic yards, cubic feet, m³ and material weight.Factorial CalculatorExact n! up to 5000! with digit count, trailing zeros and double factorial.Prime Factorization CalculatorFind prime factors in exponent form with a factor tree, divisor count and divisors list.Modulo CalculatorCalculate a mod n and the quotient, with floored, truncated and Euclidean rules.Exponential Growth CalculatorExponential growth and decay: final amount, rate or time, discrete or continuous.Linear Regression CalculatorLeast-squares line of best fit: slope, intercept, r, r², predictions and a scatter plot.System of Equations SolverSolve 2×2, 3×3 and 4×4 linear systems with exact fractions and step-by-step working.Cubic Equation SolverSolve ax³ + bx² + cx + d = 0 for real and complex roots with steps and a graph.Summation CalculatorEvaluate sigma notation: sum any expression in n from a to b with partial sums and a chart.Arithmetic Sequence CalculatorFind the n-th term, sum and full list of an arithmetic sequence, or d from two terms.Geometric Sequence CalculatorFind the n-th term, sum and infinite sum of a geometric sequence, or r from two terms.Fibonacci CalculatorExact n-th Fibonacci number (BigInt), sequence lists, Fibonacci check and golden ratio.Factors CalculatorAll factors and factor pairs of a number, prime factors, divisor count and perfect check.Depth of Field CalculatorNear and far focus limits, depth of field and hyperfocal distance for any camera or lens.Crop Factor CalculatorCrop factor, full-frame equivalent focal length and aperture, and field of view for any sensor.Completing the Square CalculatorRewrite ax² + bx + c in vertex form a(x − h)² + k step by step and solve it.Exposure Value CalculatorEV from aperture, shutter and ISO, or solve any missing setting with sunny 16 presets.Integral CalculatorDefinite integral of f(x) from a to b with adaptive Simpson, area graph and antiderivative.Least Common Denominator CalculatorFind the LCD of two or more fractions and rewrite them as equivalent fractions, with steps.Limiting Reactant CalculatorFind the limiting reactant, theoretical yield and leftover excess from an equation.Parabola CalculatorVertex, focus, directrix, axis, intercepts and graph of a parabola from its equation.Polynomial Root FinderFind all real and complex roots of a polynomial up to degree 10, with the factored form.Prime Number List GeneratorList all primes in a range or the first N primes with a fast sieve; copy or download the list.RREF CalculatorRow reduce any matrix to RREF with exact fractions, every row operation, pivots and rank.Stem and Leaf Plot MakerMake stem-and-leaf plots (standard, split stems or back-to-back) with a key; copy or save PNG.Taylor Series CalculatorTaylor and Maclaurin polynomials of any f(x) to order n, with exact coefficients and a graph.Antilog CalculatorInverse logarithm (antilog) in base 10, e, 2 or any base, with steps and scientific notation.Asymptote CalculatorFind vertical, horizontal and slant asymptotes and holes of a function, with graph and reasoning.Cramer's Rule CalculatorSolve 2x2 and 3x3 linear systems by Cramer's rule with every determinant shown step by step.Dot Plot MakerMake a dot plot or line plot from data or a frequency table; download PNG or SVG.Exponential Regression CalculatorFit y = a·bˣ or y = a·e^(kx) to data with r², predictions, residuals and a plot.Extended Euclidean Algorithm CalculatorFind gcd(a, b) and Bézout coefficients x, y with the full step-by-step division table.Factor Tree GeneratorDraw the prime factor tree of any number as a printable diagram, with exponent form and steps.X and Y Intercept CalculatorFind the x- and y-intercepts of lines, curves and functions with steps and a graph.Line Intersection CalculatorFind where two lines cross from equations, points or slopes, with parallel checks and a graph.Linear Programming SolverSolve max/min linear programs with the simplex method: tableau steps and a 2-variable graph.Modular Exponentiation CalculatorCompute a^b mod m for huge numbers with square-and-multiply steps (BigInt).Modular Inverse CalculatorFind a⁻¹ mod m with the extended Euclidean algorithm, step by step, for huge numbers too.Nth Term CalculatorFind the nth term formula of a sequence: arithmetic, geometric, quadratic or cubic.Partial Fraction Decomposition CalculatorSplit a rational function into partial fractions with the setup, equations and solution.Perpendicular Line CalculatorEquation of the perpendicular and parallel line through a point, with distance and a graph.Polar Graphing CalculatorGraph polar equations r = f(θ): roses, cardioids, spirals, with a θ range slider and PNG export.Polynomial CalculatorAdd, subtract, multiply, divide and evaluate polynomials; see roots, degree and a graph.Scale Factor CalculatorScale factor between similar figures, plus scaled lengths, areas (k²) and volumes (k³).Set CalculatorUnion, intersection, difference and complement of up to 4 sets, with a Venn diagram and counts.Table of Values CalculatorMake an x/y table for any function with a start, end and step, then plot it or copy CSV.Quadratic Regression CalculatorFit y = ax² + bx + c (or up to degree 6) to x, y data with R², predictions and a graph.Scatter Plot MakerPaste X,Y pairs for a scatter plot with trendline, equation, r and R². Download PNG.Synthetic Division CalculatorDivide polynomials by x − c (synthetic table) or any polynomial (long division) with steps.3D Graphing CalculatorPlot z = f(x, y) surfaces and 3D parametric curves; rotate, zoom, add contours, save PNG.Determinant CalculatorDeterminant of a 2×2 to 8×8 matrix with exact fractions and cofactor or row-reduction steps.Differential Equation SolverSolve first- and second-order ODEs step by step, with initial conditions, an RK4 check and a graph.Domain and Range CalculatorFind the domain and range of a function in interval notation, with steps and a graph.
See all 74 Algebra & Calculus Calculators →