Skip to content
School

Factoring Calculator

This factoring calculator lists every factor pair and the prime factorization of a whole number, or factors a quadratic trinomial with the GCF, difference of squares, or the ac method.

What do you want to factor?

A positive integer. 36 lists every factor pair and 2^2 × 3^2.

Factoring result

Prime factorization
2^2 × 3^2

36 = 2^2 × 3^2.

All factors

1, 2, 3, 4, 6, 9, 12, 18, 36

Factor pairs

  • 1 × 36
  • 2 × 18
  • 3 × 12
  • 4 × 9
  • 6 × 6

Divisors are tested from 1 up to the square root. The math stays in your browser.

How to use

  1. Choose whole number or quadratic trinomial.
  2. For a number, enter a positive integer. The tool lists factor pairs from 1 up to the square root and writes the prime factorization.
  3. For a quadratic, enter integers a, b, and c in ax^2 + bx + c. a cannot be 0.
  4. Read the steps. A shared GCF is pulled out first, then a difference of squares or the ac method. If no integer pair works, the trinomial is prime over the integers.

How it works

In number mode the page tests every integer from 1 up to the square root. Each one that divides the number evenly is the low end of a pair, and the high end is the number divided by that divisor. The full factor list is those pairs flattened and sorted. Prime factorization then writes the same number as primes raised to powers, so a prime has exactly one prime factor: itself. In quadratic mode the coefficients have to be integers. A shared greatest common factor is pulled out first, sign included when the leading coefficient is negative. If the middle term is 0 and the other two terms are squares of opposite sign, the rest is a difference of squares. Otherwise the page looks for two integers that multiply to a × c and add to b, splits the middle term, and factors by grouping. If no integer pair exists, the trinomial is marked prime over the integers and the discriminant is shown.

Example. 84 has factor pairs 1×84, 2×42, 3×28, 4×21, 6×14, and 7×12. The factor list is 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84, and the prime factorization is 2^2 × 3 × 7. 97 has only the pair 1×97, so it is prime.

Example. 6x^2 + 15x + 6 has a GCF of 3, so it becomes 3(2x^2 + 5x + 2). Inside, 1 and 4 multiply to 4 and add to 5. Splitting the middle term and grouping gives (2x + 1)(x + 2), and putting the 3 back yields 3(2x + 1)(x + 2). x^2 - 9 is a difference of squares and factors as (x - 3)(x + 3). x^2 + x + 1 has no integer pair that multiplies to 1 and adds to 1, the discriminant is -3, and the page calls it prime over the integers.

A product that expands to something else is not factored

Multiply the binomials back out before you trust them. (x + 2)(x + 3) is x^2 + 5x + 6, not x^2 + 6x + 6. The constant is the product of the constants, and the middle term is their sum only when the leading coefficient is 1. With a leading 2, as in (2x + 1)(x + 3) = 2x^2 + 7x + 3, the middle term is not 1 + 3.

1 is not treated as prime. Its only factor is 1, and the prime-factor line prints 1. Decimals, zero, and negative numbers are rejected in number mode. A coefficient of 0 on x^2 is rejected in quadratic mode, because that polynomial is not quadratic.

Frequently asked questions

How do I find all the factors of a number?

Test divisors from 1 up to the square root; each one that divides evenly gives a factor pair. The factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, 36.

What is prime factorization?

Writing a number as a product of primes. 360 = 2^3 x 3^2 x 5.

How do you factor x^2 + bx + c?

Find two numbers that multiply to c and add to b. x^2 + 5x + 6 = (x + 2)(x + 3).

What is the ac method?

For ax^2 + bx + c, find two numbers that multiply to a x c and add to b, split the middle term, then factor by grouping.

What if a trinomial will not factor?

If no integer pair works, it is prime over the integers. Use the quadratic formula to find its roots.

What are the factors of 84?

The pairs are 1×84, 2×42, 3×28, 4×21, 6×14, and 7×12. Listed out, the factors are 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, and 84. The prime factorization is 2^2 × 3 × 7.

How does the page factor 6x^2 + 15x + 6?

The GCF of the coefficients is 3, so the expression becomes 3(2x^2 + 5x + 2). Then 1 and 4 multiply to 4 and add to 5. Grouping produces 3(2x + 1)(x + 2).