🇺🇸 USC
Math & Conversion
🧮

Factoring Calculator

Factor numbers, trinomials, differences of squares & polynomial GCFs with steps

Last updated September 5, 2026

Method: Whole numbers are factored by trial division up to the square root. Trinomials ax² + bx + c use the AC method (find two integers with product a × c and sum b, split the middle term, factor by grouping). Differences of squares use a² − b² = (a − b)(a + b), applied repeatedly. Polynomial GCFs combine the numeric GCF with the lowest power of x.

Included: All factors, factor pairs, prime factorization and divisor count; step-by-step AC factoring with a discriminant check; GCF extraction before every method; a clear "does not factor over the integers" verdict when no integer factorization exists.

Not included: Factoring over the rationals, reals or complex numbers, cubic and higher-degree trinomials, multivariable expressions, and symbolic input with fractions or decimals. This is a free educational tool; always check a result by expanding it.

Enter the integer coefficients of ax² + bx + c.

🧮 Factored form

(3x + 1)(2x + 3)
6x² + 11x + 3 factors over the integers
a × c
18
Pair that adds to b
2, 9
Discriminant b² − 4ac
49
Discriminant a perfect square?
Yes

📝 Step by step

  1. The coefficients 6, 11 and 3 share no common factor greater than 1, so nothing is pulled out first.
  2. Multiply a × c = 6 × 3 = 18. Look for two integers that multiply to 18 and add to b = 11.
  3. Found the pair 2 and 9: 2 × 9 = 18 and 2 + 9 = 11.
  4. Split the middle term: 6x² + 11x + 3 = 6x² + 2x + 9x + 3.
  5. Group and factor each pair: (6x² + 2x) + (9x + 3) = 2x(3x + 1) + 3(3x + 1).
  6. Both groups share (3x + 1). Factor it out: (3x + 1)(2x + 3).
  7. Check by expanding: (3x + 1)(2x + 3) = 6x² + 11x + 3. ✓

Exact integer arithmetic. Every result comes from a deterministic algorithm (trial division, the AC method, the difference-of-squares identity and the GCF rule) and is verified by expansion. Factoring is done over the integers only.

Factoring calculator: numbers, trinomials and polynomials explained

A factoring calculator rewrites a number or an algebraic expression as a product of smaller pieces. Example: 6x² + 11x + 3 has a × c = 18, and the pair 2 and 9 multiplies to 18 while adding to 11, so the trinomial factors as (3x + 1)(2x + 3). The same tool lists all 24 factors of 360 and pulls 6x² out of 12x⁵ + 18x³ − 30x².

Two sister tools cover the neighboring questions. The Prime Factorization Calculator goes deeper on whole numbers with a factor tree, so use it when you only need the prime decomposition of one integer. The Quadratic Formula Calculator solves ax² + bx + c = 0 for x, so use it when a trinomial does not factor over the integers and you still need the roots, including irrational or complex ones. Use this page when the question is "how do I write this as a product?" rather than "what is x?".

How the AC method factors a trinomial

For a trinomial ax² + bx + c with integer coefficients, the calculator looks for two integers m and n such that:

m × n = a × c   and   m + n = b

Once the pair exists, the middle term bx is rewritten as mx + nx, the four terms are grouped in pairs, the GCF is pulled out of each pair, and the shared binomial is factored out. If no such pair exists, the trinomial does not factor over the integers. The discriminant gives a quick pre-check:

D = b² − 4ac   (factors over the integers only if D is a perfect square)

Before any of this, the calculator divides out the greatest common factor of a, b and c, and factors out −1 when a is negative, so the trinomial inside the parentheses always has a positive leading coefficient and no leftover common factor.

Worked example: 6x² + 11x + 3 step by step

Here is exactly what the calculator does for its default input, with every number written out:

  1. Check for a GCF. The coefficients 6, 11 and 3 share no factor greater than 1, so nothing is pulled out.
  2. Multiply a × c. 6 × 3 = 18. We need two integers that multiply to 18 and add to 11.
  3. Search the factor pairs of 18. 1 and 18 add to 19; 2 and 9 add to 11. Found it: m = 2, n = 9.
  4. Split the middle term. 6x² + 11x + 3 = 6x² + 2x + 9x + 3.
  5. Group and factor each pair. (6x² + 2x) + (9x + 3) = 2x(3x + 1) + 3(3x + 1).
  6. Factor out the shared binomial. (3x + 1)(2x + 3).
  7. Check by expanding. 3x · 2x = 6x², 3x · 3 = 9x, 1 · 2x = 2x, 1 · 3 = 3, and 9x + 2x = 11x. The product is 6x² + 11x + 3, so the factorization is correct.

The discriminant confirms the result in advance: D = 11² − 4 × 6 × 3 = 121 − 72 = 49, a perfect square (7²), so an integer factorization was guaranteed to exist.

Trinomials factored with the AC method

Each row below follows the same routine. The last two rows show what happens when no pair works: the discriminant is not a perfect square, and the calculator reports that the trinomial does not factor over the integers.

Trinomial a × c Pair (m, n) D = b² − 4ac Factored form
6x² + 11x + 3182, 949(3x + 1)(2x + 3)
2x² − 7x + 36−1, −625(2x − 1)(x − 3)
x² − 7x + 1212−4, −31(x − 4)(x − 3)
3x² + 10x + 8244, 64(3x + 4)(x + 2)
8x² + 2x − 15−120−10, 12484(4x − 5)(2x + 3)
10x² − 19x + 660−15, −4121(2x − 3)(5x − 2)
9x² + 12x + 4366, 60(3x + 2)²
2x² + 3x + 48none−23does not factor over the integers
x² + 3x + 11none5does not factor over the integers

Notice the sign pattern: when a × c is positive, m and n share the sign of b (both positive for 6x² + 11x + 3, both negative for 2x² − 7x + 3). When a × c is negative, the two integers have opposite signs and the one with the larger absolute value carries the sign of b, as in 8x² + 2x − 15 with −10 and 12.

Worked example: all the factors of 360

Number mode uses trial division: it tests every integer d from 1 up to the square root of the number and, whenever d divides evenly, records the pair (d, n ÷ d). For 360, the square root is about 18.97, so only d = 1 through 18 need checking. Twelve of them divide 360, giving the factor pairs 1 × 360, 2 × 180, 3 × 120, 4 × 90, 5 × 72, 6 × 60, 8 × 45, 9 × 40, 10 × 36, 12 × 30, 15 × 24 and 18 × 20. Unpacking the pairs yields all 24 factors: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180 and 360, which add up to 1,170.

The prime factorization is 360 = 2³ × 3² × 5, and it predicts the divisor count without listing anything: add 1 to each exponent and multiply, (3 + 1)(2 + 1)(1 + 1) = 4 × 3 × 2 = 24. That shortcut is why the prime factorization is the most useful single fact about a number, and it is also what the GCF Calculator and LCM Calculator rely on behind the scenes.

Factor counts and prime factorizations of common numbers

Every value in this table was produced by the same trial-division routine the calculator runs. The factor count is always even unless the number is a perfect square, where the middle pair is a number times itself.

Number Prime factorization Factors Factor pairs Sum of factors
122² × 36328
362² × 3²9591
602² × 3 × 5126168
842² × 3 × 7126224
1002² × 5²95217
3602³ × 3² × 524121,170
1,0002³ × 5³1682,340
1,0017 × 11 × 13841,344
2,0253⁴ × 5²1583,751

Difference of squares: a² − b² = (a − b)(a + b)

Whenever an expression is one perfect square minus another, it factors instantly. The calculator first pulls out any numeric GCF, then checks whether both remaining parts are perfect squares. Example: 12x² − 27 has GCF 3, leaving 4x² − 9 = (2x)² − 3², so the full factorization is 3(2x − 3)(2x + 3). With a fourth power the identity applies twice: x⁴ − 81 = (x² − 9)(x² + 9) = (x − 3)(x + 3)(x² + 9). The sum of squares x² + 9 stays as it is, because a² + b² has no real factors.

Expression GCF Squares Factored form
9x² − 161(3x)² − 4²(3x − 4)(3x + 4)
4x² − 251(2x)² − 5²(2x − 5)(2x + 5)
x² − 1211x² − 11²(x − 11)(x + 11)
12x² − 273(2x)² − 3²3(2x − 3)(2x + 3)
50x² − 82(5x)² − 2²2(5x − 2)(5x + 2)
x⁴ − 811(x²)² − 9², then x² − 3²(x − 3)(x + 3)(x² + 9)
x² − 50150 is not a perfect squaredoes not factor over the integers

GCF of a polynomial

The greatest common factor of a polynomial has two parts: the GCF of the coefficients and the lowest power of x that appears in every term. For 12x⁵ + 18x³ − 30x², the coefficients 12, 18 and 30 share the factor 6, and the smallest exponent is 2, so the GCF is 6x². Dividing each term gives 12x⁵ ÷ 6x² = 2x³, 18x³ ÷ 6x² = 3x and −30x² ÷ 6x² = −5, so the factored form is 6x²(2x³ + 3x − 5). When the leading coefficient is negative, the calculator takes the GCF as negative too: −4x⁴ + 8x² + 12x = −4x(x³ − 2x − 3). If the constant term has exponent 0, as in 7x² + 14x + 21 = 7(x² + 2x + 3), no x can be pulled out at all.

How to use this factoring calculator

  1. Pick a mode. Choose Number for a whole number, ax² + bx + c for a quadratic trinomial, a² − b² for a difference of squares, or GCF for a polynomial with two to four terms.
  2. Enter integers only. Type the coefficients exactly as they appear in standard form, including negative signs. For 2x² − 7x + 3 enter a = 2, b = −7, c = 3. A missing term has coefficient 0.
  3. Read the headline. The blue card shows the factored form (or the prime factorization) and a verdict line saying whether the expression factors over the integers.
  4. Follow the steps. The numbered list beneath the result walks through the GCF, the a × c product, the pair search, the split middle term, the grouping and the final check. Copy that reasoning into your own work.
  5. Try the quick examples. The chips under each input load ready-made cases, including one that does not factor, so you can see how the calculator explains a negative result.

Who this calculator is for

  • Algebra 1 and Algebra 2 students learning to factor trinomials, factor by grouping and spot special products, who want each step spelled out rather than just an answer.
  • Middle-school students working with factor pairs, prime factorization and divisibility, where the Number mode lists every pair in order.
  • Parents and tutors checking homework quickly or generating fresh examples with known answers.
  • Test takers reviewing for the SAT, ACT, GED or a placement exam, where recognizing a difference of squares or a perfect square trinomial saves real time.
  • Anyone simplifying a rational expression, since cancelling common factors starts with factoring the numerator and denominator.

Key factoring terms

  • Factor: a number or expression that divides another evenly. 12 = 3 × 4, so 3 and 4 are factors of 12; (3x + 1) is a factor of 6x² + 11x + 3.
  • Prime factorization: the unique way to write a whole number as a product of primes, such as 84 = 2² × 3 × 7.
  • Trinomial: a polynomial with three terms. A quadratic trinomial has the form ax² + bx + c.
  • Leading coefficient: the number a in front of x². When a = 1 the pair search simplifies to "two numbers that multiply to c and add to b".
  • Discriminant: D = b² − 4ac. A perfect-square discriminant means the trinomial factors with whole numbers.
  • Factoring by grouping: splitting a four-term expression into two pairs, factoring each pair, then factoring out the common binomial.
  • Prime polynomial: a polynomial that cannot be factored over the integers, the algebraic cousin of a prime number.
  • Perfect square trinomial: a trinomial of the form (px + q)², recognizable because the discriminant is 0. Example: 9x² + 12x + 4 = (3x + 2)².

What changes the result

  • The sign of c: a positive c means the pair shares one sign (the sign of b); a negative c means opposite signs. That single observation halves the search.
  • A common factor: 12x² + 22x + 6 and 6x² + 11x + 3 have the same binomial factors, but only the first carries the extra factor 2.
  • The size of a × c: the larger the product, the more factor pairs to test. 8x² + 2x − 15 has a × c = −120 with 16 positive divisors, while x² − 7x + 12 has only 12 with 6.
  • The discriminant: D = 49 factors, D = 5 does not, and D = −23 has no real roots at all. Compute it first when the pair search is not going anywhere.
  • Rounding is never involved: because all arithmetic is exact integer math, the result is either correct or reported as non-factorable. There is no approximation to worry about.

Tips for factoring by hand

  • Memorize the perfect squares up to 15² = 225 and the perfect cubes up to 5³ = 125; special products jump out once you know them.
  • When a = 1, skip the AC step: just find two numbers that multiply to c and add to b. For x² − 7x + 12 that is −4 and −3.
  • If a × c is large, list its factor pairs systematically from 1 upward rather than guessing, and stop at the square root.
  • Use the sum-and-product check on your binomials: the product of the constants must equal c and the product of the x-coefficients must equal a.
  • Write the GCF in front and keep it there. Losing a factor of 2 or a negative sign is the most common lost point on a test.

Limitations

  • Factoring is done over the integers only. An expression such as x² − 2 factors over the reals as (x − √2)(x + √2), but the calculator reports it as non-factorable, which is the correct answer in an algebra class that works with whole numbers.
  • Trinomial mode handles degree 2 in one variable. It does not factor cubics, expressions in two variables such as 6x² + 11xy + 3y², or trinomials in x⁴ disguised as quadratics.
  • Coefficients must be integers between −10,000 and 10,000, and whole numbers in Number mode are limited to 1 trillion so that trial division finishes instantly.
  • Sum and difference of cubes, a³ ± b³, are not implemented; those identities have their own formulas.
  • The tool is a study aid. Show your own work where required and verify results by expanding.

Related calculators

To decompose one integer into primes with a factor tree, use the Prime Factorization Calculator; to solve a quadratic equation whether or not it factors, use the Quadratic Formula Calculator. The GCF Calculator and LCM Calculator handle greatest common factors and least common multiples of plain numbers, and the Polynomial Calculator multiplies polynomials, which is the fastest way to check a factorization of any degree. If you need to simplify powers before factoring, the Exponent Calculator covers the exponent rules.

Sources and method

Every result comes from standard algebraic identities and deterministic integer algorithms: trial division for factors and primes, the AC method with factoring by grouping for quadratic trinomials, the identity a² − b² = (a − b)(a + b) for differences of squares, and the coefficient-GCF plus lowest-power rule for polynomial GCFs. These are pure mathematics and need no external data; each factorization is verified by expansion before it is displayed.

⚠️ Common mistakes & edge cases

Forgetting the GCF

Writing 12x² + 22x + 6 = (6x + 2)(2x + 3) is not fully factored. Pull out the 2 first: 2(3x + 1)(2x + 3). The calculator always extracts the GCF before anything else, and so should you.

Adding when you should multiply

The pair must multiply to a × c and add to b, in that order of importance. For 6x² + 11x + 3, students often grab 6 and 5 because they add to 11, but 6 × 5 = 30, not 18. Only 2 and 9 satisfy both conditions.

Dropping a sign in the grouping step

In 2x² − x − 6x + 3, the second group is (−6x + 3), and its common factor is −3, giving −3(2x − 1). Factoring out +3 produces 3(−2x + 1), which does not match x(2x − 1) and the method appears to fail. Keep the sign with the factor.

Trying to factor a sum of squares

x² + 9 is not (x + 3)(x + 3); that expands to x² + 6x + 9. Only a difference of squares factors over the integers. The calculator leaves x² + 9 intact when it appears as a factor of x⁴ − 81.

Confusing "does not factor" with "has no solution"

x² + 3x + 1 does not factor over the integers because its discriminant, 5, is not a perfect square. But the equation x² + 3x + 1 = 0 has two real, irrational roots. Use the quadratic formula for them.

Stopping too early with higher powers

x⁴ − 81 = (x² − 9)(x² + 9) is only half done. The first factor is itself a difference of squares, so the complete answer is (x − 3)(x + 3)(x² + 9). Always ask whether each factor can be split again.

Note: This calculator factors over the integers. A result of "does not factor over the integers" is a mathematical statement about whole-number factors, not an error, and the expression may still have real or complex roots.

❓ Frequently asked questions

What does this factoring calculator do?

It has four modes. Number mode lists every factor, every factor pair and the prime factorization of a whole number. Trinomial mode factors ax² + bx + c over the integers with the AC method and shows each step, including the split middle term and the grouping. Difference-of-squares mode factors A·x^n − B, pulling out a GCF first and repeating the identity when the minus factor is again a difference of squares. GCF mode finds the greatest common factor of a polynomial with up to four terms and writes the factored form.

How does the AC method work?

For ax² + bx + c, multiply a × c, then find two integers that multiply to a × c and add to b. Rewrite bx as the sum of those two terms, group the four terms in pairs, factor the GCF out of each pair, and factor out the shared binomial. For 6x² + 11x + 3: a × c = 18, the pair is 2 and 9, so 6x² + 2x + 9x + 3 = 2x(3x + 1) + 3(3x + 1) = (3x + 1)(2x + 3).

What does 'does not factor over the integers' mean?

It means no pair of integers multiplies to a × c and adds to b, so the trinomial cannot be written as a product of binomials with whole-number coefficients. Equivalently, the discriminant b² − 4ac is not a perfect square. The expression may still have real or complex roots, which you can find with the quadratic formula, but it is 'prime' as far as integer factoring goes. Example: 2x² + 3x + 4 has a × c = 8 and no factor pair of 8 sums to 3.

How can I tell in advance whether a trinomial will factor?

Compute the discriminant D = b² − 4ac. If D is a perfect square (0, 1, 4, 9, 16, 25, ...), the trinomial factors over the rationals, and after pulling out any common factor it factors over the integers. If D is positive but not a perfect square, the roots are irrational and it will not factor with whole numbers. If D is negative there are no real roots at all. For 2x² − 7x + 3, D = 49 − 24 = 25, a perfect square, so it factors: (2x − 1)(x − 3).

Why should I factor out the GCF first?

Pulling out the greatest common factor makes the remaining numbers smaller and stops you from missing part of the answer. 12x² + 22x + 6 has GCF 2, leaving 6x² + 11x + 3, which factors as (3x + 1)(2x + 3). Writing 2(3x + 1)(2x + 3) is the complete factorization; (6x + 2)(2x + 3) is technically equal but not fully factored, and most teachers mark it as incomplete.

What is a difference of squares?

Any expression of the form a² − b² factors as (a − b)(a + b). To use it, both parts must be perfect squares: 9x² − 16 = (3x)² − 4² = (3x − 4)(3x + 4). If a common factor hides the pattern, pull it out first: 12x² − 27 = 3(4x² − 9) = 3(2x − 3)(2x + 3). A sum of squares such as x² + 9 does not factor over the real numbers.

How many factors does a number have?

Write the prime factorization, add 1 to each exponent, and multiply. 360 = 2³ × 3² × 5, so it has (3 + 1)(2 + 1)(1 + 1) = 24 factors, which pair up into 12 factor pairs from 1 × 360 to 18 × 20. A number is a perfect square exactly when its factor count is odd, because one pair is a number multiplied by itself: 2025 = 45 × 45 has 15 factors.

What is the difference between factors and prime factors?

A factor is any whole number that divides evenly into the number; 84 has 12 of them: 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42 and 84. Prime factors are the primes among the factors, and the prime factorization is the unique product of primes that equals the number: 84 = 2² × 3 × 7. Number mode highlights the prime factors in the full list so you can see both at a glance.

Can this calculator factor by grouping?

Yes. Factoring by grouping is the second half of the AC method: after splitting the middle term into four terms, the calculator groups them in pairs, pulls the GCF out of each pair, and factors out the common binomial. Every step is written out, so you can follow the grouping on a trinomial exactly as you would on a four-term homework problem.

What if the leading coefficient is negative?

The calculator factors out −1 together with the numeric GCF so that the trinomial in parentheses has a positive leading term. −2x² + 8x − 6 becomes −2(x² − 4x + 3), and then the AC method gives −2(x − 1)(x − 3). Leaving a negative leading coefficient inside is not wrong, but factoring it out is the standard convention and makes the pair search easier.

Does the calculator handle x⁴ or higher powers?

Partly. Difference-of-squares mode accepts x², x⁴ and x⁶ and keeps factoring while the minus factor is still a difference of squares: x⁴ − 81 = (x² − 9)(x² + 9) = (x − 3)(x + 3)(x² + 9). GCF mode accepts any exponents up to 50. Trinomial mode is limited to degree 2; for cubic and higher polynomials use the Polynomial Calculator to expand or check your own factoring by multiplication.

Is a factoring calculator the same as a quadratic solver?

No. A factoring calculator rewrites an expression as a product; a quadratic solver finds the values of x that make an equation equal zero. They are related: once 6x² + 11x + 3 = (3x + 1)(2x + 3), setting each factor to zero gives x = −1/3 and x = −3/2. When the expression does not factor, the Quadratic Formula Calculator still finds the roots, including irrational and complex ones.

Why does the GCF of a polynomial include a power of x?

The greatest common factor covers both the numbers and the variable. For 12x⁵ + 18x³ − 30x², the coefficients 12, 18 and 30 share the factor 6, and every term contains at least x², so the GCF is 6x². Dividing each term by 6x² leaves 2x³ + 3x − 5, giving 6x²(2x³ + 3x − 5). The lowest power of x present in every term is the variable part of the GCF.

Is this factoring calculator free?

Yes. There is no sign-up, no fee and no limit on the number of expressions you can factor. All the arithmetic runs in your browser with exact integer math, so results appear instantly as you type and nothing is sent to a server.

💡 Good to know

The discriminant is a free preview

Before hunting for a pair, compute b² − 4ac. If it is a perfect square the trinomial factors, and its square root even tells you how far apart the two integers are. If it is not, stop searching and switch to the quadratic formula.

Odd factor counts mean perfect squares

36 has 9 factors and 2,025 has 15, both odd, because one factor pair (6 × 6 and 45 × 45) uses the same number twice. Every other whole number has an even count. It is a quick way to spot a perfect square in a divisor list.

Factoring and solving are two sides of one coin

Once 6x² + 11x + 3 = (3x + 1)(2x + 3), the zero-product rule gives the roots x = −1/3 and x = −3/2 immediately. That is why factoring is taught first: for most textbook equations it is faster than the formula, and it reveals the structure of the answer.

Related Calculators