Home โ€บ Math โ€บ Factoring Calculator
FreeNumber factorsPrime factorizationQuadratic factoring

Factoring Calculator

Factor a whole number into all of its factors and primes, or factor a quadratic equation and see its roots, discriminant and factored form.

๐Ÿ”ขYour result will appear here
โšก InstantUpdates as you type
๐Ÿ”’ PrivateRuns in your browser
๐Ÿ†“ FreeNo sign-up needed
๐Ÿ“ฑ Mobile readyWorks on any screen

How to use the Factoring Calculator

Pick what to factor
Choose a whole number to get its factors and prime factorization, or choose a quadratic to factor a xยฒ + b x + c.
Enter your values
Type the whole number, or the coefficients a, b and c. Use 0 for a term that is missing, such as b in xยฒ โˆ’ 9.
Read the factored form
See the factors, primes and count for a number, or the discriminant, roots and factored form for a quadratic.

The formula

Quadratic formula: x = (−b ± √(b² − 4ac)) ÷ 2a
Discriminant: D = b² − 4ac
Factored form: a(x − r1)(x − r2)
Number of factors: multiply (exponent + 1) for each prime in the factorization

What does factoring mean?

Factoring means breaking something into smaller pieces that multiply back to the original. For a whole number, the factors are all the whole numbers that divide it evenly, so the factors of 12 are 1, 2, 3, 4, 6 and 12. For an algebra expression such as x² + 5x + 6, factoring means rewriting it as a product, here (x + 2)(x + 3).

This calculator handles both: it lists every factor of a whole number and gives its prime factorization, and it factors quadratics using the discriminant.

How to find all the factors of a number

  1. Start with 1 and the number itself. Both are always factors.
  2. Test each whole number from 2 upward to see whether it divides evenly.
  3. Stop when you pass the square root of the number. Each divisor you found has a partner (the number divided by it).
  4. Write the divisors and their partners in order.
Example: 36. The pairs are 1 × 36, 2 × 18, 3 × 12, 4 × 9 and 6 × 6. The factors are 1, 2, 3, 4, 6, 9, 12, 18, 36, which is 9 factors.

Prime factorization

A prime number has exactly two factors: 1 and itself. Every whole number above 1 can be written as a product of primes in only one way (apart from order). This is the prime factorization, and it is written in exponent form, for example 360 = 23 × 32 × 5.

The prime factorization also tells you how many factors a number has. Add 1 to each exponent and multiply: for 360 that is (3+1)(2+1)(1+1) = 24 factors. Perfect squares always have an odd number of factors; every other number has an even number.

How to factor a quadratic with the discriminant

For a x² + b x + c, first pull out any common factor of a, b and c. Then work out the discriminant D = b² − 4ac.

  • D is a perfect square (0, 1, 4, 9, 16...): the quadratic factors over the integers. The roots are rational numbers.
  • D is positive but not a perfect square: there are two real roots, but they are irrational, so the quadratic does not factor with whole numbers.
  • D is negative: there are no real roots, only complex ones, and it does not factor over the real numbers.

When it does factor, each root r = p/q gives a factor (qx − p).

Worked examples

x² + 5x + 6: D = 25 − 24 = 1, a perfect square. Roots are (−5 ± 1) ÷ 2 = −2 and −3. Factored form: (x + 2)(x + 3).
2x² − 3x − 2: D = 9 + 16 = 25. Roots are (3 ± 5) ÷ 4 = 2 and −1/2. Factored form: (x − 2)(2x + 1).
x² + 1: D = −4, which is negative. It does not factor over the integers, and the roots are the complex numbers 0 ± 1i.

A quadratic like x² − 2x + 1 has D = 0, so it has one repeated root and factors as (x − 1)².

Common mistakes

  • Sign errors. A root of −2 gives the factor (x + 2), not (x − 2).
  • Forgetting the common factor. 2x² + 4x + 2 is 2(x + 1)², not just (x + 1)².
  • Skipping a missing term. For x² − 9, enter b = 0.
  • Thinking 1 is prime. It is not. It has only one factor.

Where factoring is used

Factoring numbers helps with simplifying fractions, finding the greatest common factor and least common multiple, and splitting items into equal groups. Factoring quadratics is used to solve equations, find where a parabola crosses the x-axis, and simplify algebraic fractions.

Frequently asked questions

What is the difference between a factor and a multiple?

A factor divides a number evenly (3 is a factor of 12). A multiple is what you get when you multiply a number by a whole number (24 is a multiple of 12).

Is 1 a prime number?

No. A prime has exactly two different factors, 1 and itself. The number 1 has only one factor, so it is neither prime nor composite.

What does it mean if a quadratic does not factor?

It means it cannot be written as a product of simple factors with integer numbers. It still has roots, which the quadratic formula gives, but they are irrational or complex.

What is the discriminant?

It is bยฒ โˆ’ 4ac. Its value tells you whether the quadratic has two real roots, one repeated root or two complex roots, and whether the roots are rational.

How many factors does a number have?

Write its prime factorization, add 1 to each exponent and multiply. For example, 72 = 2ยณ ร— 3ยฒ has (3+1)(2+1) = 12 factors.

Can I factor a quadratic that has decimals?

Yes. The calculator temporarily scales the coefficients to whole numbers, factors them, then shows the result for your original numbers. For example, 0.5xยฒ + 1.5x + 1 becomes 0.5(x + 1)(x + 2).

More calculators