Factoring Online
What prime numbers multiply together to make your number?
Find the prime factors of any whole number to solve math problems, simplify fractions, or understand number structure. Enter any positive integer — get its complete prime factorization, factor count, and whether it's prime or composite. Assumes standard integer factorization using trial division.
—
Send feedback
💡 Share your idea or report a problem
✓ Thanks! We'll take a look.
Learn more
How It Works
The formula, explained simply
Breaking a number into prime factors is like finding the DNA of that number. Every whole number above 1 is either prime (indivisible) or composite (built from smaller primes). The calculator uses trial division — it tests each prime starting with 2, then 3, then 5, dividing out each factor completely before moving to the next.
The process stops when the remaining number becomes smaller than the square of the current divisor. At that point, any leftover number must be prime itself. This method guarantees you find every prime factor exactly once.
The result shows factors with exponents when they repeat. Instead of 2 × 2 × 3 × 3, you see 2² × 3². This exponential notation makes patterns visible — perfect squares have all even exponents, while numbers that are hard to factor usually have large prime factors.
When To Use This
Right tool, right situation
Use prime factorization when you need to simplify fractions, find least common multiples, or solve problems involving divisibility. It's essential for fraction arithmetic — you can't add 1/12 + 1/18 efficiently without knowing that 12 = 2² × 3 and 18 = 2 × 3².
This tool works for numbers up to 1,000,000 using trial division. For larger numbers or when you suspect very large prime factors, you need more sophisticated algorithms like Pollard's rho method. The basic approach here becomes impractical when the smallest prime factor exceeds about 1,000.
Avoid using this for negative numbers or fractions — prime factorization applies only to positive integers. For rational numbers, factor the numerator and denominator separately, then simplify by canceling common prime factors.
Common Mistakes
Why results sometimes look wrong
Students often confuse factoring with finding all divisors. Prime factorization gives you only the prime building blocks — to find all divisors, you need to combine these primes in every possible way. For 12 = 2² × 3, the divisors are 1, 2, 3, 4, 6, and 12, not just 2 and 3.
Another common error is stopping too early when hand-calculating. After finding 84 = 4 × 21, students might write '4 × 21' as the final answer. But 4 isn't prime — it factors further to 2². The complete factorization requires breaking down every composite factor until only primes remain.
Missing the connection to fraction simplification causes problems later. The prime factorization of numerator and denominator reveals common factors instantly. Without this foundation, students resort to guessing when simplifying fractions instead of systematically canceling shared prime factors.
The Math
Worked examples and deeper derivation
Prime factorization follows the Fundamental Theorem of Arithmetic: every integer greater than 1 has exactly one prime factorization. The algorithm starts with the smallest prime (2) and divides repeatedly until the number is no longer divisible, then moves to the next prime.
For example, factoring 84: 84 ÷ 2 = 42, then 42 ÷ 2 = 21, then 21 ÷ 3 = 7, then 7 is prime. Result: 2² × 3 × 7. The process guarantees completeness because it tests every possible prime factor up to √n.
Time complexity grows with the size of the smallest prime factor. Numbers with only small prime factors (like 2⁶ = 64) factor quickly. Numbers that are products of two large primes (like 91 = 7 × 13) take longer because the algorithm must test many candidates before finding the first factor.
Expert Unlock
The thing most explanations skip
The trial division method used here is adequate for most educational purposes, but mathematicians use probabilistic tests like Miller-Rabin for large numbers. RSA encryption relies on the computational difficulty of factoring products of two large primes — what takes seconds for 6-digit numbers becomes centuries for 200-digit semiprimes.
How do I use prime factorization in math homework?
Need something this doesn't cover?
Suggest a tool — we'll build it →