šŸ”¢Prime Factorization Calculator

Enter an integer (2 or greater) to instantly see its prime factorization, divisor count, and whether it is prime.

Prime Factorization

—
ItemValue
Prime Factors—
Total Factor Count (with multiplicity)—
Distinct Prime Factors—
Number of Divisors—
Is Prime?—

Prime Factorization — Breaking Numbers Down to Their Primes

Prime factorization expresses any integer greater than 1 as a product of prime numbers. The Fundamental Theorem of Arithmetic guarantees this representation is unique for every number. For example, 360 = 2³ Ɨ 3² Ɨ 5. This calculator uses trial division — systematically dividing by each prime from 2 up to √n — to find all prime factors efficiently.

Key applications of prime factorization:
1. Greatest Common Divisor (GCD) — Take the product of shared prime factors using the smaller exponent. GCD(36, 48) = 2² Ɨ 3 = 12.
2. Least Common Multiple (LCM) — Take the product of all prime factors using the larger exponent. LCM(4, 6) = 2² Ɨ 3 = 12.
3. Simplifying fractions — Find the GCD of numerator and denominator through prime factorization to reduce to lowest terms.
4. RSA encryption — The security of RSA relies on the difficulty of factoring the product of two large primes. Multiplying is easy; reversing is computationally hard.
5. Divisor counting — For n = p₁^a₁ Ɨ pā‚‚^aā‚‚ Ɨ …, the number of divisors is (a₁+1)(aā‚‚+1)…
6. Number theory — Perfect numbers, abundant numbers, and other special classes are identified through their prime factorizations.

If the input is itself a prime, the calculator reports it as prime with a single factor. For very large numbers (above 10,000,000), the calculation may take a moment due to the trial division approach.

Frequently Asked Questions

Q: Can I enter 1?

A: 1 is neither prime nor composite and has no prime factorization by definition. Please enter an integer of 2 or greater.

Q: What does the number of divisors mean?

A: It is the total count of positive integers that divide n evenly. For 12 = 2² Ɨ 3, the number of divisors is (2+1)(1+1) = 6: namely 1, 2, 3, 4, 6, 12.

Q: What if the input is a prime number?

A: A prime number has only itself as a prime factor with an exponent of 1. The calculator will display it as prime.