Menu

Factoring Calculator

Any polynomial factored, with the name of the pattern behind each step.

By Nethanel Bar, Co-founder & CEO

Last updated

Want to solve these without the calculator?

The Coddy math course teaches the method itself - you work each step on an interactive board and get told exactly where a move went wrong.

Factoring is pattern recognition, and the patterns are countable

There are only about six things that ever happen when you factor a polynomial: a common factor comes out, a difference of two squares splits, a perfect square collapses into a bracket squared, a trinomial breaks into two brackets, four terms group in pairs, or a sum or difference of cubes opens up. Everything you will be asked to factor in school algebra is one of those, or one of those applied twice.

So the useful thing a calculator can tell you is not the answer - it is which pattern it used, and why that one. Every line here is named. When the same problem comes up in an exam you are not trying to remember what this page said; you are looking for the pattern it pointed at.

It works exactly, on whole-number and fractional coefficients alike, and it verifies itself: the last line multiplies the factors back out and shows you the polynomial you started with. That check is the answer to "how do I know this is right", and you can do it by hand on any answer, from any source, forever.

What to watch for in the steps

  • Always look for a common factor first. 3x² - 27 is not a difference of squares until the 3 comes out, and half of all "it does not factor" answers are really "I did not take the 3 out".
  • Two terms means look for squares or cubes. Three terms means look for a trinomial or a perfect square. Four terms means try grouping. The number of terms narrows it before you try anything.
  • A difference of squares splits; a sum of squares does not. x² - 9 factors and x² + 9 does not, and that asymmetry is worth memorising rather than rediscovering.
  • Check the answer by multiplying back out - the last line here does exactly that. It takes ten seconds and it catches every sign error you will ever make.
  • "It does not factor" is a real answer. x² + x + 1 has no rational factors, and knowing when to stop is part of the skill.

How to use the factoring calculator

  1. Type the polynomial

    Write it the way you would on paper: x^2 - 5x + 6, 4x^2 - 12x + 9, x^3 - 8. Use ^ for powers. One letter, or two (x^2 - y^2 works).

  2. Read the answer, then the pattern

    The factored form is at the top. The numbered steps below name the pattern each one used - that is the part that transfers to the next question.

  3. Look at the zeros

    Every bracket of the form (ax - b) gives you a zero at b/a. That is why factoring solves equations: a product is zero exactly when one of its factors is.

  4. Do the check yourself

    The last line multiplies the factors back out. Cover it up, do it in your head, and then compare - that habit is worth more than the answer.

The patterns, and how to spot them

Six patterns cover school factoring. Count the terms first: it eliminates most of the list before you try anything.

PatternLooks likeFactors to
Common factor6x² - 15x3x(2x - 5)
Difference of squares9x² - 4(3x - 2)(3x + 2)
Perfect square trinomial4x² - 12x + 9(2x - 3)²
Trinomial, leading 1x² - 5x + 6(x - 2)(x - 3)
Trinomial, leading not 12x² + 7x + 3(2x + 1)(x + 3)
Grouping (four terms)x³ + 2x² + 3x + 6(x + 2)(x² + 3)
Difference of cubesx³ - 8(x - 2)(x² + 2x + 4)
Sum of cubesx³ + 27(x + 3)(x² - 3x + 9)
Sum of squaresx² + 9does not factor

Worked examples

A monic trinomial: x² - 5x + 6

plain
x^2 - 5x + 6

Two numbers that multiply to 6 and add to -5: -2 and -3. So it is (x - 2)(x - 3). With a leading coefficient of 1 this is the whole method, and it is worth doing a dozen of them until the pair jumps out without a search.

A perfect square: 4x² - 12x + 9

plain
4x^2 - 12x + 9

4x² is (2x)², 9 is 3², and the middle term is exactly -2 × 2x × 3. That makes it (2x - 3)². You could also grind it out as a trinomial and get (2x-3)(2x-3); recognising the square saves the work, which is the only reason patterns are worth learning.

A difference of squares with coefficients: 9x² - 4

plain
9x^2 - 4

The trap here is not seeing it, because the squares are not obvious: 9x² is (3x)² and 4 is 2². Then the pattern applies as usual and it splits into (3x - 2)(3x + 2). Two terms with a minus between them is always worth checking for this.

Common factor first: 3x² - 27

plain
3x^2 - 27

As written it is not a difference of squares - 3x² is not a square. Take the 3 out and 3(x² - 9) is, giving 3(x - 3)(x + 3). Skipping the common factor is the single most common way to conclude wrongly that something does not factor.

A difference of cubes: x³ - 8

plain
x^3 - 8

x³ - 8 is x³ - 2³, so it is (x - 2)(x² + 2x + 4). The quadratic bracket never factors further over the rationals, which the page says rather than leaving you to wonder. Note the signs: the linear bracket takes the sign of the original, the quadratic one alternates.

Common mistakes

  • Not taking the common factor out first. Every other pattern is easier to see once it is gone, and some of them are invisible until then.
  • Trying to factor a sum of squares. x² + 4 has no rational factors; only the difference splits.
  • Losing a sign in the trinomial pair. The two numbers multiply to the constant and add to the middle coefficient - both conditions, every time, and a quick mental check costs nothing.
  • Stopping too early. x⁴ - 16 becomes (x² - 4)(x² + 4), and the first bracket still factors into (x - 2)(x + 2).
  • Forgetting that a perfect square is one bracket, squared. Writing (2x - 3)(2x - 3) is not wrong, but (2x - 3)² is the answer being asked for.
  • Cancelling instead of factoring. In (x² - 9)/(x + 3) you may not strike the x² and the x; factor the top first, then the common bracket cancels.

Factoring FAQ

How do I factor a polynomial?
Take out any common factor, then count the terms. Two terms: look for a difference of squares or a sum or difference of cubes. Three: a perfect square or a trinomial pair. Four: group them in pairs. Then check whether any bracket still factors. Every route this page prints is that procedure applied once or twice.
How do I factor a trinomial like x² - 5x + 6?
Find two numbers whose product is the constant term and whose sum is the middle coefficient - here 6 and -5, so -2 and -3. The factors are (x - 2)(x - 3). When the leading coefficient is not 1, use the same idea on a×c instead of c, which is what the steps here call the ac route.
What if the polynomial does not factor?
Then the page says so plainly, and for a quadratic or a cubic in one letter that is a proof rather than a shrug: if there is no rational root there is no rational factor. x² + x + 1 is an example. A quadratic that does not factor can still be solved with the quadratic formula, which is a different page.
Does it handle two letters?
Yes, for the shapes school asks about: a common factor (6x²y + 9xy² becomes 3xy(2x + 3y)), a difference of squares (x² - y²), and sums and differences of cubes (x³ + 8y³). If a piece comes down to one letter, the full one-letter route takes over from there.
Why does the answer come with a check line?
Because multiplying the factors back out is how you verify a factoring, and it costs nothing to show. It also demonstrates the habit worth keeping: any answer, from any calculator or any friend, can be checked in ten seconds this way.
Is factoring the same as solving?
No, but it is most of it. Factoring rewrites an expression as a product; solving uses that product to find the zeros, because a product is zero exactly when one of its factors is. The zeros row under the answer is that last step, done for you.
Can I factor with fractions or decimals in the coefficients?
Yes. x²/2 - 2 factors as ½(x - 2)(x + 2), and 0.25x² - 1 is read as the exact fraction ¼ rather than a rounded decimal. Nothing here is ever computed in floating point, so a fraction stays a fraction all the way to the answer.

More math tools

Coddy programming languages illustration

Learn math with Coddy

GET STARTED