Home / Factoring Calculator

Factoring Calculator

Enter any positive integer to get its prime factorization and all factor pairs. Or enter a quadratic (ax^2 + bx + c) to factor it into two binomials. Every step is shown.

What do you want to factor?

Try 360 or 1001. Negative numbers use the absolute value.

Result

Factored form--
Prime factorization--
Number of factors--
Factor pairs--
Enter a value to see the steps.

How It's Calculated

To factor a number means to write it as a product of smaller integers. The prime factorization is the most reduced version: every factor is prime and no further division is possible. Factoring a quadratic runs the same idea in reverse, rebuilding a trinomial from two binomials that multiply back into it.

n = p₁ × p₂ × ... × pₖ (each p is prime)

Finding all factor pairs follows from the prime factorization. If n = 2^a x 3^b x 5^c, the total count of factors is (a+1)(b+1)(c+1). Each factor pair (d, n/d) is found by testing every divisor from 1 up to the square root of n, which is why the search stops early instead of checking all the way to n.

Worked Example: factoring 360

Step 1. Divide by 2 until you cannot: 360 / 2 = 180, 180 / 2 = 90, 90 / 2 = 45. Three factors of 2.
Step 2. Divide by 3: 45 / 3 = 15, 15 / 3 = 5. Two factors of 3.
Step 3. What remains is 5, which is prime. One factor of 5.
Step 4. Prime factorization: 360 = 2^3 x 3^2 x 5.
Step 5. Total factor count: (3+1)(2+1)(1+1) = 4 x 3 x 2 = 24 factors.
Step 6. Factor pairs: (1, 360), (2, 180), (3, 120), (4, 90), (5, 72), (6, 60), (8, 45), (9, 40), (10, 36), (12, 30), (15, 24), (18, 20).

Worked Example: factoring x^2 + 5x + 6

Step 1. Identify a = 1, b = 5, c = 6. Compute a x c = 6.
Step 2. Find two integers that multiply to 6 and add to 5. Those are 2 and 3.
Step 3. Split the middle term: x^2 + 2x + 3x + 6.
Step 4. Factor by grouping: x(x + 2) + 3(x + 2) = (x + 2)(x + 3).
Step 5. Check: (x + 2)(x + 3) = x^2 + 3x + 2x + 6 = x^2 + 5x + 6. Correct.

Common Mistakes to Avoid

With integer factoring, people often stop trial division too early and mislabel a composite number as prime, so always check up to the square root of what remains before calling it done. With quadratics, a frequent error is picking two numbers that add correctly but multiply to the wrong product, or the reverse; both conditions have to hold at once. If no integer pair satisfies both, the quadratic likely does not factor over the integers, and the quadratic formula calculator will find the exact roots instead.

To find the greatest common factor of two or more numbers using the same prime factorizations, see the GCF and LCM calculator.

For authoritative background on prime factorization, see Wolfram MathWorld's page on prime factorization.

Keep going with algebra

Round a messy result, or check whether a number simplifies under a radical.

Quick answers

Factoring Calculator FAQs

What is the prime factorization of a number?

Prime factorization breaks a number into a product of prime numbers. For example, 60 = 2 x 2 x 3 x 5, usually written as 2^2 x 3 x 5. Every integer above 1 has exactly one prime factorization (the Fundamental Theorem of Arithmetic).

What are all the factor pairs of a number?

Factor pairs are pairs of integers that multiply together to give the original number. For 36, the pairs are (1, 36), (2, 18), (3, 12), (4, 9), and (6, 6). To find them, test every integer from 1 up to the square root of the number.

How do you factor a quadratic expression?

For ax^2 + bx + c, find two numbers that multiply to (a x c) and add to b. Use those to split the middle term, then factor by grouping. For x^2 + 5x + 6, find numbers that multiply to 6 and add to 5: those are 2 and 3, so the factored form is (x + 2)(x + 3).

What does it mean if a quadratic does not factor?

A quadratic ax^2 + bx + c does not factor over the integers when its discriminant (b^2 - 4ac) is not a perfect square. In that case, use the quadratic formula calculator to find its roots.

What is the difference between factors and multiples?

Factors divide evenly into a number with no remainder. Multiples are what you get when you multiply a number by positive integers. The factors of 12 are 1, 2, 3, 4, 6, and 12. The multiples of 12 are 12, 24, 36, 48, and so on.

Marcus Vance
About the author
Marcus Vance
Contributing Writer, Technology & Data, Encore Editorial

Marcus Vance spent a decade building data pipelines and testing calculation logic before he started writing about the math behind the tools. On MathCalcTools he checks every formula against the source math, then writes out the steps so a reader can follow the same path a calculator takes.