Prime Factorization Calculator
The definitive number theory calculator for breaking down any integer into its unique prime factors, generating canonical exponential forms, division ladder proofs, complete divisor lists, and GCF/LCM linkages.
Target Integer
N ≥ 2Compare Prime Factors
GCF & LCM LinkCanonical Prime Decomposition
Visual Factor Tree
Division Ladder Derivation
1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
How to Find the Prime Factorization of a Number
Prime factorization is the unique expression of a composite number as a product of prime factors. To factorize an integer N, divide it by the smallest prime number (2, 3, 5, 7, ...) that divides it evenly, note the prime divisor, and repeat the process on the resulting quotient until the quotient reaches 1.
The Fundamental Theorem of Arithmetic & Prime Numbers
In mathematics, prime numbers are the fundamental building blocks of all integers—often described as the "chemical elements" of arithmetic. The Fundamental Theorem of Arithmetic (Unique Factorization Theorem) states:
Every integer n > 1 is either a prime number itself or can be factored uniquely as a product of prime powers, up to the arrangement order of the factors.
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71...
4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30...
Methods: Trial Division, Factor Trees & Ladders
Three complementary algorithms allow manual and programmatic factorization of any integer:
Test divisibility starting with the smallest prime p = 2. If n mod p == 0, record p and divide n by p. If not, advance to the next prime. Stop when p² > n.
Split the original number into any two factor branches (e.g. 120 = 12 × 10). Continue splitting composite child branches (12 = 4 × 3, 4 = 2 × 2; 10 = 2 × 5) until all terminal leaves are primes.
Repeatedly divide vertically by prime divisors on the left side of a ladder bar, writing quotients below, until reaching a final quotient of 1.
Canonical Prime Power Exponential Form
Rather than listing repeated prime factors linearly (2 × 2 × 2 × 3 × 5), standard mathematical literature condenses identical factors into exponential prime powers:
Where p₁ < p₂ < ... < pₖ are distinct prime numbers in strictly ascending order and each exponent aᵢ ≥ 1.
Deriving Total Divisors τ(N) & Divisor Sum σ(N)
A major advantage of canonical prime factorization is the ability to determine all arithmetic divisor properties instantaneously without trial division:
For 120 = 2³ × 3¹ × 5¹: Total factors = (3+1)(1+1)(1+1) = 16 divisors.
For 120: σ(120) = (15/1) × (8/2) × (24/4) = 15 × 4 × 6 = 360.
Real-World Applications & RSA Cryptography
Prime factorization powers the security infrastructure of global digital civilization:
RSA Public-Key Encryption
SSL/TLS web encryption relies on public keys generated from the product of two massive primes (N = p × q). Factoring N is the only way to break the private key.
Gear Ratios & Periodic Scheduling
Engineers use co-prime gear tooth counts (e.g. 17 and 31 teeth) to ensure even mechanical wear across all teeth surfaces over time.
Fraction Simplification & GCD
Reducing complex fractions to lowest terms requires identifying and canceling shared prime factors between the numerator and denominator.
Acoustics & Musical Harmonics
Harmonic intervals (octaves 2:1, perfect fifths 3:2, perfect fourths 4:3) are exact prime frequency ratios that create consonant auditory waveforms.
Step-by-Step Worked Examples
Find the prime factorization and total divisor count of 360.
1. Divide by 2: 360 ÷ 2 = 180 (Factor: 2)
2. Divide by 2: 180 ÷ 2 = 90 (Factor: 2)
3. Divide by 2: 90 ÷ 2 = 45 (Factor: 2)
4. Divide by 3: 45 ÷ 3 = 15 (Factor: 3)
5. Divide by 3: 15 ÷ 3 = 5 (Factor: 3)
6. Divide by 5: 5 ÷ 5 = 1 (Factor: 5)
7. Canonical Form: 360 = 2³ × 3² × 5¹.
8. Total Divisors: τ(360) = (3+1)(2+1)(1+1) = 4 × 3 × 2 = 24 divisors.
Common Calculation Pitfalls & Edge Cases
Including 1 as a Prime Factor
Writing 1 × 2 × 3 is invalid. 1 is neither prime nor composite and must never appear in prime factorizations.
Stopping with Composite Leaves
Leaving an answer as 4 × 3 × 5 is incomplete because 4 is composite (2²). Every factor must be strictly prime.
Skipping Primality Checks
Assuming a large odd number (like 91) is prime without testing divisors up to √N (91 = 7 × 13).
Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.
Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.