πAI Math Solver

Calculators

Factor Calculator

A factor calculator that factors a polynomial in one click: type the expression and the factored form appears instantly. The page also teaches the full method — the greatest common factor, difference of squares, trinomials, and factoring completely — beside the factor calculator form.

Type a polynomial with ^ for powers — x^2 + 5x + 6, x^2 - 9, x^4 - 16 — then press Calculate for the factored form.

Enter any polynomial — the AI factors it and explains every step

How to use this factor calculator

One box, one click. Type the polynomial you want to factor — the factor calculator form is pre-filled with x2+5x+6x^2 + 5x + 6. Press Calculate, and the factor calculator returns the complete factored form instantly. No menus, no setup — the factor calculator reads standard typing with ^ for powers, so x^2 + 5x + 6, x^2 - 9, and 2x^2 + 7x + 3 all work exactly as written. The example chips below the box swap in ready-made expressions, and every answer from the factor calculator comes as typeset math you can copy.

The factor calculator runs entirely in your browser — the factoring happens the moment you click, with no waiting and no request leaving the page. Type any of these into the factor calculator and watch the pattern land:

  • A trinomial — x2+5x+6x^2 + 5x + 6. The factor calculator finds the two binomials whose product rebuilds it.
  • A difference of squares — x2−9x^2 - 9. The factor calculator spots a2−b2a^2 - b^2 and splits it into (a−b)(a+b)(a-b)(a+b).
  • Something with a common factor — 12x3+18x212x^3 + 18x^2. The factor calculator pulls out the greatest common factor first.
  • A fourth-degree expression — x4−16x^4 - 16. The factor calculator keeps going until nothing left will factor, which is what factoring completely means.

This page is more than a static factor calculator — it is also an AI tutor you can ask questions:

  • Ask in plain words. "Factor 2x2+7x+32x^2 + 7x + 3 step by step." The AI shows every move — the same moves the factor calculator makes in one click.
  • Take a photo of your homework. The AI reads the expression and factors it, explaining the pattern it matches.
  • Ask about the ideas, not just the answer. "What is the greatest common factor?" or "How do I know when I'm done factoring?" — the AI answers beside the factor calculator form.
  • Check your hand work. Factor by hand, then run the same expression through the factor calculator and compare. The two answers must match exactly.

What is factoring?

Factoring reverses multiplying. To factor a number or an expression means to rewrite it as a product of simpler pieces — its factors — that multiply back to the original. Every factoring claim is checked by one move: multiply the factors together and confirm you rebuild what you started with. The factor calculator makes that check its whole job.

For numbers, a factor is a value that divides exactly, with no remainder. The factors of 12 are 1, 2, 3, 4, 6, and 12, because 12=1×12=2×6=3×412 = 1 \times 12 = 2 \times 6 = 3 \times 4. For expressions the idea is the same with letters: x2−9x^2 - 9 factors as (x−3)(x+3)(x-3)(x+3), because multiplying those two binomials rebuilds x2−9x^2 - 9 exactly. FOIL the check yourself — x2+3x−3x−9x^2 + 3x - 3x - 9 — the middle terms cancel and the original returns. A factor calculator is a machine for finding those pieces.

x2−9=(x−3)(x+3)x^2 - 9 = (x-3)(x+3)

Why factor at all? Because products expose solutions. The equation x2−9=0x^2 - 9 = 0 looks stuck until it factors; written as (x−3)(x+3)=0(x-3)(x+3) = 0 it reads off x=3x = 3 and x=−3x = -3 immediately — when a product equals zero, at least one factor must be zero. That zero-product property is the reason the quadratic formula works and the reason every algebra course drills factoring. Fractions simplify through factors too: x2−9x+3\frac{x^2-9}{x+3} collapses to x−3x-3 the moment you see the shared factor. The factor calculator is the fastest route to seeing those hidden pieces.

Prime numbers are the end of the factoring line for whole numbers. A prime — 2, 3, 5, 7, 11 — has exactly two factors: 1 and itself. Every composite number factors all the way down into primes, in exactly one way, which is why primes are called the building blocks of the integers. The next sections walk the full method the factor calculator runs: common factors first, then patterns, then trinomials — and the factor tree picture shows the number side of the same idea.

How to factor an expression, step by step

The factor calculator follows a fixed checklist on every expression, and the checklist is short enough to memorize. Run it in order — each step either makes progress or rules out a method:

  1. Pull out the greatest common factor (GCF) first. Every term must share it. For 12x3+18x212x^3 + 18x^2 the GCF is 6x26x^2, leaving 6x2(2x+3)6x^2(2x + 3). Nothing else works well until this is done.
  2. Count the terms. Two terms: look for a difference of squares (a2−b2a^2 - b^2) or a sum/difference of cubes. Three terms: factor the trinomial — the pattern section below shows both shapes. Four terms: try grouping — pair the terms and factor each pair.
  3. Match the pattern. Perfect squares of the form a2−b2a^2 - b^2 split as (a−b)(a+b)(a-b)(a+b); trinomials split into two binomials whose product and sum hit the two coefficients.
  4. Check each factor again. This is the step everyone skips — and the step that separates an answer from the complete answer. x4−16x^4 - 16 factors to (x2−4)(x2+4)(x^2-4)(x^2+4), but the x2−4x^2 - 4 factors again. Keep going until every piece is prime over the integers.
  5. Verify by multiplying back. Expand your answer. If it rebuilds the original expression, the factoring is correct — the factor calculator runs exactly this check before showing a result.

That checklist is the whole subject. Each step has its own section on this page with worked examples: the GCF step, the difference of squares, trinomials, and the meaning of factor completely. Run any step's example through the factor calculator form above — the factor calculator confirms each intermediate factoring, so you can check your work at every stage, not just at the end.

The greatest common factor comes first

The greatest common factor (GCF) of two terms is the largest factor they share — the biggest piece that divides every term exactly. Finding it is always step one of factoring, because expressions with a common factor hide their remaining structure until it is pulled out. The factor calculator runs this move before anything else on every input.

For plain numbers, list the prime factorizations and keep what overlaps. Take 48 and 180:

  • 48=24⋅348 = 2^4 \cdot 3
  • 180=22⋅32⋅5180 = 2^2 \cdot 3^2 \cdot 5
  • The overlap is 22⋅3=122^2 \cdot 3 = 12 — so GCF(48,180)=12(48, 180) = 12, and indeed 48=12⋅448 = 12 \cdot 4 and 180=12⋅15180 = 12 \cdot 15.

For expressions, the GCF takes the greatest common numerical factor times the lowest power of each shared variable. In 12x3+18x212x^3 + 18x^2: the numbers give GCF(12,18)=6(12, 18) = 6, the shared variable part is x2x^2 (the lower power), so:

12x3+18x2=6x2(2x+3)12x^3 + 18x^2 = 6x^2(2x + 3)

Divide each term by the GCF to fill the parentheses — 12x3÷6x2=2x12x^3 \div 6x^2 = 2x and 18x2÷6x2=318x^2 \div 6x^2 = 3 — then multiply back to check. The check is not optional: 6x2⋅2x=12x36x^2 \cdot 2x = 12x^3 and 6x2⋅3=18x26x^2 \cdot 3 = 18x^2, the original terms exactly.

The GCF answers a classic word problem too: split a 48-meter rope and a 180-meter rope into equal pieces of the greatest possible length — each piece is 12 meters, the GCF. The same question with 12x3+18x212x^3 + 18x^2 has the same answer: the GCF is the largest single thing you can hand out to every term. Type 12x3+18x212x^3 + 18x^2 into the factor calculator above and the GCF step is the first thing you'll see in the result.

Prime factorization and the factor tree

For a whole number, complete factoring means prime factorization: split the number until every piece is prime. The classic picture is the factor tree — split each composite into two factors, circle the primes, and read the leaves. The tree below factors 72:

  • 72=8⋅972 = 8 \cdot 9
  • 8=2⋅2⋅28 = 2 \cdot 2 \cdot 2 and 9=3⋅39 = 3 \cdot 3
  • Every leaf is prime, so 72=23⋅3272 = 2^3 \cdot 3^2 — the complete prime factorization.

The tree can branch differently — 72=6⋅1272 = 6 \cdot 12 works just as well — but the leaves always land on the same primes with the same counts. That uniqueness is the Fundamental Theorem of Arithmetic: one number, one prime factorization. The factor calculator's number-side answers rest on it.

The prime factorization generates everything: all factors of 72 come from choosing powers from each prime — 2a3b2^a 3^b with a∈{0,1,2,3}a \in \{0,1,2,3\} and b∈{0,1,2}b \in \{0,1,2\} — giving (3+1)(2+1)=12(3+1)(2+1) = 12 factors: 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72. The GCF of two numbers is the shared part of their prime factorizations, as the 48-and-180 example showed. And a number is a perfect square exactly when every prime exponent is even — 72=23⋅3272 = 2^3 \cdot 3^2 is not, but 144=24⋅32144 = 2^4 \cdot 3^2 is.

Ask the AI box for the prime factorization of any number — "factor 360 into primes" — and it draws the tree step by step. For polynomials, the same game plays with letters, and the next two sections cover the two patterns the factor calculator uses most: differences of squares and trinomials.

728924332272 = 2³ · 3²red leaves are primes — read them all: the factor tree

Prime factorization of 72 as a factor tree: 72 splits into 8 × 9, the 8 splits into 2 × 2 × 2 and the 9 into 3 × 3 — the red leaves read 72 = 2³ · 3², the complete prime factorization

Difference of squares and factoring completely

The fastest pattern in factoring: a difference of squares is a2−b2=(a−b)(a+b)a^2 - b^2 = (a-b)(a+b) — two perfect squares with a minus sign between them. It works because the middle terms of the product cancel: (a−b)(a+b)=a2+ab−ab−b2(a-b)(a+b) = a^2 + ab - ab - b^2. Spotting it is pure pattern recognition:

  • x2−9=(x−3)(x+3)x^2 - 9 = (x-3)(x+3) — here a=xa = x, b=3b = 3.
  • 4x2−25=(2x−5)(2x+5)4x^2 - 25 = (2x-5)(2x+5) — a=2xa = 2x, b=5b = 5; squares hide behind coefficients too.
  • x2+9x^2 + 9 — the same two squares with a plus sign — is not a difference of squares and does not factor over the real numbers. The minus sign is essential.

Now the step that separates a finished answer from a half-finished one. Factoring completely means factoring until no factor can be factored again. Watch x4−16x^4 - 16, which wears two disguises:

  1. First pass — it is a difference of squares with a=x2a = x^2, b=4b = 4: x4−16=(x2−4)(x2+4)x^4 - 16 = (x^2 - 4)(x^2 + 4).
  2. Check each factor — x2+4x^2 + 4 is done (a sum of squares does not factor), but x2−4x^2 - 4 is another difference of squares: x2−4=(x−2)(x+2)x^2 - 4 = (x-2)(x+2).
  3. Complete answer: x4−16=(x−2)(x+2)(x2+4)x^4 - 16 = (x-2)(x+2)(x^2+4) — three factors, none of which factors again.

Stopping after step 1 is the most common factoring error on tests, and the factor calculator never makes it — the re-check step in its checklist loops until every factor is prime. Type x4−16x^4 - 16 into the factor calculator above and compare: you get the complete three-factor form, not the intermediate one. A practical habit: after any factoring, scan each parenthesis and ask "does this factor again?" — when every answer is no, you have factored completely.

How to factor trinomials

A trinomial ax2+bx+cax^2 + bx + c factors into two binomials — when it factors at all. The simple case, a=1a = 1, is a product-and-sum hunt: find two numbers that multiply to cc and add to bb. For x2+5x+6x^2 + 5x + 6 — the expression sitting in the factor calculator form on this page — the hunt is for a pair with product 6 and sum 5:

  • 1 and 6: product 6, sum 7 — no.
  • 2 and 3: product 6, sum 5 — yes.

So x2+5x+6=(x+2)(x+3)x^2 + 5x + 6 = (x+2)(x+3). Multiply back to check: x2+3x+2x+6=x2+5x+6x^2 + 3x + 2x + 6 = x^2 + 5x + 6 — exact. Signs matter in the hunt: for x2−5x+6x^2 - 5x + 6 the pair is −2-2 and −3-3 (product +6+6, sum −5-5), giving (x−2)(x−3)(x-2)(x-3); for x2+5x−6x^2 + 5x - 6 it is −1-1 and 66, giving (x−1)(x+6)(x-1)(x+6).

When a≠1a \neq 1, use the AC method — it turns the hard case into the easy one. Factor 2x2+7x+32x^2 + 7x + 3:

  1. Compute ac=2⋅3=6ac = 2 \cdot 3 = 6. Hunt for a pair with product 6 and sum b=7b = 7: it is 1 and 6.
  2. Split the middle term along that pair: 2x2+x+6x+32x^2 + x + 6x + 3.
  3. Group and factor each pair: x(2x+1)+3(2x+1)x(2x+1) + 3(2x+1).
  4. Pull out the shared binomial: (2x+1)(x+3)(2x+1)(x+3).

Check by FOIL: 2x2+6x+x+3=2x2+7x+32x^2 + 6x + x + 3 = 2x^2 + 7x + 3 — exact. The trinomial is the workhorse pattern of Algebra 1, and the factor calculator runs the product-and-sum hunt (or the AC method) on every three-term input. Feed it x2+2x+1x^2 + 2x + 1 as well — a perfect-square trinomial that lands on (x+1)2(x+1)^2, the same answer written with an exponent, and one more form the factor calculator reports.

Three common factoring mistakes

Every algebra grader sees these three slips weekly. Each one leaves a wrong answer that looks finished, and the factor calculator catches all three instantly:

  1. Forgetting the GCF first. Factor 3x2−273x^2 - 27 by jumping straight to the difference of squares and you get 3(x−3)(x+3)3(x-3)(x+3) only if you remember the 3 — many answers drop it and report (x−3)(x+3)(x-3)(x+3), which multiplies back to x2−9x^2 - 9, not 3x2−273x^2 - 27. The GCF is always step one precisely because nothing may be dropped. Multiply back and the missing 3 surfaces immediately.
  2. Stopping before the factoring is complete. x4−16=(x2−4)(x2+4)x^4 - 16 = (x^2-4)(x^2+4) is a true statement — and an incomplete answer, because x2−4x^2 - 4 factors again. Test rubrics read "factor completely" as a instruction, not a suggestion; the full answer is (x−2)(x+2)(x2+4)(x-2)(x+2)(x^2+4). The re-check-every-factor habit from the pattern section is the cure.
  3. Sign slips in the product-and-sum hunt. For x2+5x−6x^2 + 5x - 6, the pair needs product −6-6 and sum 55 — that's −1-1 and 66, yet answers with (x+1)(x−6)(x+1)(x-6) appear constantly (product −6-6, sum −5-5 — wrong sum). Signs carry half the information in a trinomial; always verify the sum and the product separately, then multiply back.

The defense against all three is the same thirty-second move: multiply your answer out and compare with the original. The factor calculator automates the comparison — factor by hand, type the expression in, and any mismatch tells you exactly which slip you made. The practice problems below each end with that check.

Problem 1

A community garden is planned as a rectangle with area x2+9x+20x^2 + 9x + 20 square meters, where the length and width are whole-number expressions in xx. Factor the area expression to find the length and width. Then check your dimensions with the factor calculator above.

⏱ 00:00
Page 1
Problem 2

A square mural of side xx is enlarged by 3 meters on each side, and then a second mural is built with side xx shrunk by 3 meters. The difference between the two mural areas simplifies to 12x12x square meters. To verify this, a student factors x2+6x+9−(x2−6x+9)x^2 + 6x + 9 - (x^2 - 6x + 9) one mural at a time. Factor each square completely, then confirm the difference is 12x12x. Use the factor calculator above to check each factoring.

⏱ 00:00
Page 1
Problem 3

A workshop has a 48-meter roll of ribbon and a 180-meter roll of the same ribbon, and wants to cut both rolls into identical pieces of the greatest possible length with nothing left over. What is that length? Solve by factoring both numbers into primes, then explain how the same greatest-common-factor move appears when the factor calculator factors 12x3+18x212x^3 + 18x^2.

⏱ 00:00
Page 1

Frequently asked questions

1

What is a factor in math?

A factor is a value that divides another exactly, with no remainder. The factors of 12 are 1, 2, 3, 4, 6, and 12. For expressions, factoring rewrites a sum as a product: $x^2 - 9 = (x-3)(x+3)$. The factor calculator on this page finds those factors automatically, and every answer can be checked by multiplying the factors back.

2

How do I factor a polynomial step by step?

Run the checklist in order: pull out the greatest common factor first, count the terms, match the pattern (difference of squares for two terms, trinomial for three, grouping for four), then re-check every factor to see if it factors again — that is factoring completely. Finally, multiply back to verify. Each step has a worked example on this page, and the factor calculator confirms every intermediate answer.

3

What is the greatest common factor?

The greatest common factor (GCF) is the largest factor two or more terms share. Find it from prime factorizations: $48 = 2^4 \cdot 3$ and $180 = 2^2 \cdot 3^2 \cdot 5$ share $2^2 \cdot 3 = 12$. In expressions the GCF also takes the lowest power of each shared variable — $12x^3 + 18x^2 = 6x^2(2x+3)$. The GCF always comes out first when factoring.

4

What does it mean to factor completely?

Factoring completely means factoring until no factor can be factored again. $x^4 - 16 = (x^2-4)(x^2+4)$ is true but incomplete — the $x^2 - 4$ factors again, so the complete answer is $(x-2)(x+2)(x^2+4)$. After every factoring, scan each parenthesis and ask whether it factors again; when no factor does, you are done. The factor calculator always returns the complete form.

5

How do I find the prime factorization of a number?

Split the number into any two factors, then keep splitting until every piece is prime — that is a factor tree. For 72: $72 = 8 \cdot 9$, then $8 = 2^3$ and $9 = 3^2$, so $72 = 2^3 \cdot 3^2$. Different branch orders reach the same primes, which is the Fundamental Theorem of Arithmetic. The factor tree diagram on this page draws the full split for 72.

6

What can this factor calculator handle?

Type any polynomial in one variable with integer coefficients: trinomials like $x^2 + 5x + 6$, differences of squares like $x^2 - 9$ or $x^4 - 16$, expressions with a common factor like $12x^3 + 18x^2$, and perfect squares like $x^2 + 2x + 1$. The factor calculator runs in your browser and returns the complete factored form instantly. For numbers, prime factorizations, or anything unusual, the AI box beside the form factors it step by step with you.

Related practice