Ad
Prime Factorization-
All Factors-
Is Prime?-

About the Factoring Calculator

This factoring calculator breaks an integer into its prime factors — the list of prime numbers that multiply together to produce it. Enter a number and the tool returns both the prime factorization and the full set of divisors, which is the foundation for simplifying fractions, finding GCDs and LCMs, and many algebra techniques.

By the fundamental theorem of arithmetic, every integer greater than 1 has exactly one prime factorization (up to ordering). The number 60, for example, is always 2 × 2 × 3 × 5, no matter how you group the multiplication. That uniqueness is what makes factorization a reliable tool rather than a party trick.

Prime and composite numbers

A prime number has exactly two divisors: 1 and itself. The primes begin 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and they continue without end — a fact proved by Euclid around 300 BC. Every other integer greater than 1 is composite and can be decomposed into primes.

To factor by hand, divide by the smallest primes in order: try 2, then 3, then 5, and so on, keeping each divisor that divides evenly. Stop when the remaining factor is itself prime. For example, 84 ÷ 2 = 42, 42 ÷ 2 = 21, 21 ÷ 3 = 7, so 84 = 2² × 3 × 7. You only need to test prime divisors up to the square root of n.

What factorization is used for

Prime factorization powers the GCD and LCM: the greatest common divisor takes the smallest power of each shared prime, and the least common multiple takes the largest power of each prime present. Reducing fractions, finding common denominators, and simplifying radicals all reduce to comparing factor lists.

The table below shows factorizations for several representative numbers. Notice how perfect squares carry even exponents on every prime — 36 = 2² × 3² — and how a prime like 97 factors only into itself.

NumberPrime factorizationAll divisors
122² × 31, 2, 3, 4, 6, 12
282² × 71, 2, 4, 7, 14, 28
362² × 3²1, 2, 3, 4, 6, 9, 12, 18, 36
602² × 3 × 51, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
9797 (prime)1, 97

Factorization beyond integers

The same idea extends to algebra. Factoring a polynomial means writing it as a product of simpler polynomials: x² − 9 = (x − 3)(x + 3), and x² + 5x + 6 = (x + 2)(x + 3). Integer factoring skill transfers directly — recognizing that 6 can split as 2 × 3 with a sum of 5 is the same search as finding factor pairs of an integer.

In number theory, the difficulty of factoring very large integers underpins modern cryptography. RSA encryption relies on the fact that multiplying two large primes is fast, but recovering those primes from their 2048-bit product is computationally infeasible with known algorithms. That asymmetry — easy to multiply, hard to factor — is what protects secure web traffic every day.

For everyday use, though, factoring stays practical: reducing 84/126 starts by factoring both (84 = 2² × 3 × 7, 126 = 2 × 3² × 7), taking the GCD 2 × 3 × 7 = 42, and dividing through to get 2/3. The calculator automates the factor step so the rest of the arithmetic is easy.

Frequently Asked Questions

How do I find the prime factors of a number?

Divide by the smallest prime that divides it evenly, repeat with the quotient, and continue until the quotient is prime. For 84: divide by 2 twice to get 21, then by 3 to get 7, giving 84 = 2 × 2 × 3 × 7. You only need to test primes up to the square root of the number.

What is the fundamental theorem of arithmetic?

It states that every integer greater than 1 can be written as a product of primes in exactly one way, apart from the order of the factors. This uniqueness is why prime factorization is well defined and useful.

Is 1 a prime number?

No. By modern definition a prime has exactly two distinct positive divisors; 1 has only one divisor, itself. That convention keeps the unique-factorization theorem true, so 1 is classified as neither prime nor composite.

How do I use prime factors to find the GCD or LCM?

Factor both numbers. The GCD takes the lowest power of each prime common to both; the LCM takes the highest power of each prime present in either. For 12 = 2²×3 and 18 = 2×3²: GCD = 2×3 = 6, LCM = 2²×3² = 36.

How many divisors does a number have?

Add 1 to each exponent in the prime factorization and multiply. For 60 = 2² × 3¹ × 5¹, the count is (2+1)(1+1)(1+1) = 12 divisors. This works because every divisor of 60 is a product of some power of 2 (three choices), some power of 3 (two choices), and some power of 5 (two choices), and every combination yields a distinct divisor — 3 × 2 × 2 = 12 in all.

What is a factor pair?

A factor pair is two divisors that multiply to the number, such as (6, 10) for 60. Listing factor pairs is a quick way to enumerate all divisors: start at 1 and climb — (1, 60), (2, 30), (3, 20), (4, 15), (5, 12), (6, 10) — and stop when the smaller factor passes the square root of the number. For 60 that happens after 6, since the square root of 60 is about 7.75, confirming exactly six pairs and twelve divisors.

Ad