Prime Factorization Calculator
Decompose any integer into its prime factors - and find GCF and LCM for any two numbers.
🔢 What is Prime Factorization?
Prime factorization is the process of breaking down a positive integer into a product of prime numbers. A prime number is a whole number greater than 1 that has exactly two factors: 1 and itself. The primes begin: 2, 3, 5, 7, 11, 13, 17, 19, 23, … The Fundamental Theorem of Arithmetic guarantees that every integer greater than 1 has a unique prime factorization - there is exactly one way to write any number as a product of primes (ignoring order).
For example, 360 = 23 × 32 × 5. This means 360 = 8 × 9 × 5. The exponents tell you how many times each prime divides the number. No matter which method you use to find it, you always arrive at the same answer - this uniqueness is fundamental to number theory and cryptography.
The number of divisors of a number follows directly from its prime factorization. If n = p1e1 × p2e2 × …, then the count of divisors = (e1+1)(e2+1)… - multiply each exponent-plus-one together. For 360: (3+1)(2+1)(1+1) = 4 × 3 × 2 = 24 divisors. This is why highly composite numbers (like 360, used in angle measurement) have so many convenient factors.
Prime factorization also provides the most efficient method to find the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of two numbers. GCF uses the lower exponent for shared primes; LCM uses the higher exponent for all primes. These operations are essential in simplifying fractions, solving equations, scheduling repeating events, and countless other mathematical tasks.
📐 Formula
📖 How to Use This Calculator
Steps to Find Prime Factorization
💡 Example Calculations
Example 1 — Prime Factorization of 360
Factor 360 into primes
Example 2 — Is 97 Prime?
Check whether 97 is prime
Example 3 — GCF and LCM of 12 and 18
Find GCF and LCM of 12 and 18
Example 4 — A Large Composite Number
Factorize 1,000,000
❓ Frequently Asked Questions
🔗 Related Calculators
What is prime factorization?
Prime factorization is the process of expressing a positive integer as a product of prime numbers. Every integer > 1 has exactly one prime factorization (Fundamental Theorem of Arithmetic). For example: 360 = 2³ × 3² × 5, meaning 360 = 8 × 9 × 5. The primes 2, 3, and 5 are the building blocks of 360.
How do you find the prime factorization of a number?
Use trial division: start dividing by 2, then 3, 5, 7, 11, ... (only need to test up to √n). Example for 180: 180÷2=90, 90÷2=45, 45÷3=15, 15÷3=5, 5 is prime. So 180 = 2² × 3² × 5.
What is the prime factorization of 360?
360 = 2³ × 3² × 5. Step by step: 360÷2=180, 180÷2=90, 90÷2=45, 45÷3=15, 15÷3=5, 5 is prime. Grouped: two appears 3 times, three appears 2 times, five appears 1 time. Total divisors = (3+1)(2+1)(1+1) = 24 divisors.
How do you find GCF and LCM using prime factorization?
GCF: write both numbers as prime factor products, take each shared prime with its LOWER exponent. LCM: take each prime with its HIGHER exponent. Example: GCF(12,18): 12=2²×3, 18=2×3². GCF = 2¹×3¹ = 6. LCM = 2²×3² = 36. Check: GCF×LCM = 6×36 = 216 = 12×18 ✓.
How many divisors does a number have?
If n = p₁^e₁ × p₂^e₂ × ... × pₖ^eₖ, then the number of divisors = (e₁+1)(e₂+1)...(eₖ+1). Example: 360 = 2³×3²×5¹ has (3+1)(2+1)(1+1) = 4×3×2 = 24 divisors. These range from 1 and 2 up to 180 and 360.
Is 1 a prime number?
No. 1 is neither prime nor composite by mathematical convention. Primes must have exactly two distinct factors: 1 and themselves. The number 1 has only one factor (1), so it doesn't qualify. This exclusion keeps the Fundamental Theorem of Arithmetic valid: every integer > 1 has a unique prime factorization.
What is the Fundamental Theorem of Arithmetic?
Every integer greater than 1 is either prime itself or can be expressed as a unique product of primes (up to the order of factors). This theorem guarantees that prime factorization is unique: 12 = 2²×3 and there is no other way to write 12 as a product of primes. This uniqueness is foundational to number theory and cryptography.
What is the largest prime factor of 100?
100 = 2² × 5². The prime factors are 2 and 5. The largest prime factor of 100 is 5. For comparison: 99 = 3² × 11 (largest prime factor is 11), and 101 is itself prime.
How is prime factorization used in real life?
Prime factorization underlies RSA public-key encryption - the security depends on the fact that multiplying two large primes is easy, but factoring the product is computationally infeasible. It is also used in simplifying fractions (via GCF), finding LCM for scheduling problems (e.g., when do two events next coincide?), and in music theory (beat subdivisions).
How do I find GCF and LCM without prime factorization?
GCF can be found using the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing the larger by the smaller, until the remainder is 0. Example: GCF(48,18): 48=2×18+12; 18=1×12+6; 12=2×6+0; GCF=6. Then LCM(48,18) = 48×18/GCF = 864/6 = 144.