ALGEBRA / POLYNOMIALS

Polynomial Factoring Calculator with Steps, Long Division, GCD and Derivatives

Factor any one-variable polynomial and see which method works at each step: common factor, special products, the AC method, grouping, substitution or rational roots. You can also expand, add, multiply, long-divide, find a GCD and LCM, test the remainder theorem or differentiate.

Enter your polynomial

Type a polynomial as you would write it, such as 10x^2 + 11x − 6 or (2x − 1)^3. You can also type coefficients only, highest power first: 1, 0, −4, 3. Fractions and decimals are fine. Any single letter can be the variable.

How to use the calculator

Choose an operation, then type the polynomial the way you would write it, such as 10x^2 + 11x − 6 or (2x − 1)^3. Brackets are multiplied out and like terms collected automatically. A list of coefficients, highest power first, also works. In that case, put a 0 for each missing power, so x³ − 4x + 3 is 1, 0, −4, 3.

For factoring, choose how far to go. “Rational numbers” is the usual school answer, with whole-number or fraction coefficients. “Real numbers” also splits quadratics whose roots are surds, so x² − 2 becomes (x − √2)(x + √2). “Complex numbers” goes further and splits x² + 1 into (x − i)(x + i).

A factoring strategy that works

Most factoring problems give way if you try the methods in a fixed order. The calculator follows the same order and names each method in the working.

  1. Greatest common factor first. Take out the largest number and power of x that divide every term. 2x³ + 6x² − 20x becomes 2x(x² + 3x − 10). Skipping this step makes everything after it harder.
  2. Two terms: look for special patterns. A difference of squares, a² − b² = (a − b)(a + b), turns 9x² − 49 into (3x − 7)(3x + 7). Sums and differences of cubes use a³ ± b³ = (a ± b)(a² ∓ ab + b²), so 27x³ + 64 = (3x + 4)(9x² − 12x + 16). A sum of squares such as x² + 9 does not factor with real numbers.
  3. Three terms: trinomials. For x² + bx + c, find two numbers that multiply to c and add to b. When the x² term has a coefficient a, use the AC method: find two numbers that multiply to a × c and add to b, split the middle term with them, then group. For 10x² + 11x − 6, a × c = −60 and the pair is 15 and −4. That gives 5x(2x + 3) − 2(2x + 3) = (5x − 2)(2x + 3). Check for a perfect square first: 9x² − 30x + 25 = (3x − 5)².
  4. Four terms: grouping. Pair the terms and take a common factor from each pair. 3x³ + 5x² − 12x − 20 = x²(3x + 5) − 4(3x + 5) = (x² − 4)(3x + 5). The x² − 4 then splits again as a difference of squares.
  5. Even powers only: substitute. x⁴ − 10x² + 9 is a quadratic in u = x², so it factors as (x² − 9)(x² − 1) and then fully as (x − 3)(x + 3)(x − 1)(x + 1).
  6. Anything else: rational roots. If a fraction p/q makes the polynomial zero, then (qx − p) is a factor. p must divide the constant term and q the leading coefficient, which gives a short list to test. For 3x³ − 7x² + 4, x = 1 works, and synthetic division leaves 3x² − 4x − 4 = (3x + 2)(x − 2).
  7. Keep going. After each split, check every factor again. A factor is finished only when none of the methods applies.

Some polynomials have no rational roots and still factor. x⁴ + 4 has no real roots at all, yet it equals (x² + 2x + 2)(x² − 2x + 2). For quartics, the calculator also searches for a split into two quadratics with whole-number coefficients.

When a polynomial will not factor

A polynomial that cannot be split into lower-degree factors with rational coefficients is called irreducible over the rationals. x² − 2 is irreducible over the rationals but factors over the reals. x² + 1 is irreducible over the reals but factors over the complex numbers. Every polynomial factors completely into linear pieces over the complex numbers, which is the fundamental theorem of algebra. The question is only which numbers you are allowed to use.

Adding, multiplying and dividing

To add or subtract, combine coefficients of the same power. When subtracting, change the sign of every term in the second polynomial, not just the first. To multiply, multiply every term of one polynomial by every term of the other and collect like terms. The degrees add, so a quadratic times a cubic gives degree 5.

Long division works like long division with numbers. Divide the leading term of what is left by the leading term of the divisor, multiply back, subtract, and repeat until the remainder’s degree is smaller than the divisor’s. Dividing 2x³ − 3x² + 4x − 7 by x − 2 gives quotient 2x² + x + 6 and remainder 5. The result can be written as P = Q × quotient + remainder.

The remainder and factor theorems

When P(x) is divided by (x − a), the remainder equals P(a). That gives a fast check: in the division above, P(2) = 16 − 12 + 8 − 7 = 5, matching the remainder. If P(a) = 0, the remainder is zero and (x − a) is a factor. That is the factor theorem, and it is how the rational root step decides which candidates are real factors.

GCD and LCM of polynomials

The greatest common divisor is the largest polynomial that divides both P and Q. The calculator finds it with Euclid’s algorithm, the same repeated-remainder method used for whole numbers, and scales it so its leading coefficient is 1. For x³ − 7x − 6 and x² − 2x − 3, the GCD is x² − 2x − 3, because x³ − 7x − 6 = (x + 2)(x² − 2x − 3). The GCD is what you cancel to reduce a fraction P/Q to lowest terms. The LCM is the lowest common denominator when adding such fractions.

Where polynomial algebra is used

Solving equations. Once P(x) is factored, P(x) = 0 is solved by setting each factor to zero. For anything harder, use the polynomial equation calculator.

Simplifying fractions. Rational expressions are simplified by factoring the top and bottom and cancelling common factors. The rational expression calculator does this directly.

Error detection in computing. CRC checksums in network packets and storage are computed by dividing a message, treated as a polynomial with coefficients 0 and 1, by a fixed generator polynomial and keeping the remainder. Error-correcting codes such as Reed–Solomon, used in QR codes, rely on polynomial arithmetic too.

Fast evaluation. Synthetic division is the same calculation as Horner’s method, the standard way computers evaluate polynomials with as few multiplications as possible.

Modelling and calculus. Polynomial models of cost, area or motion are factored to find break-even points and intercepts, and differentiated to find rates of change and turning points.

Common mistakes

  • Forgetting the greatest common factor, or leaving part of it inside a bracket.
  • Treating a² + b² like a² − b². A sum of squares does not factor over the real numbers.
  • Getting the middle sign of a cube formula wrong. For a³ + b³ the quadratic factor is a² − ab + b².
  • Stopping too early. 16x⁴ − 81 = (4x² − 9)(4x² + 9) is not finished, because 4x² − 9 still factors.
  • Losing a sign when subtracting polynomials or in a long-division subtraction step.

Frequently asked questions

Can every polynomial be factored into integer factors?

No. Some polynomials are irreducible over the integers, such as x² + x + 1 or x⁵ − x − 1. Others only split using surds or complex numbers. Choose real or complex factoring to see those splits for quadratic factors.

What does the remainder mean?

If P(x) is divided by Q(x), then P(x) = Q(x) × quotient + remainder, and the remainder has lower degree than Q(x). A remainder of zero means Q(x) is a factor of P(x).

Do I need to enter coefficients?

No. Type the polynomial as you would write it, with brackets if you like, such as 3(x − 1)^2 + 4x. A coefficient list such as 1, 0, 0, 2 (for x³ + 2) still works if you prefer.

Why is part of my answer left in brackets?

That factor cannot be split further with rational numbers. It may still factor with surds or complex numbers. For example, x² − 2 = (x − √2)(x + √2) over the reals.

How do I factor a trinomial with a leading coefficient?

Use the AC method. Multiply a and c, find two numbers with that product that add to b, use them to split the middle term, then factor by grouping. The calculator shows each stage, including the pair of numbers it found.

Does the calculator handle more than one variable?

No. It works with one variable, which can be any letter. Expressions such as x² − y² need a multivariable algebra system.

← All algebra calculators