📐 Math CalculatorsFree · No signup

Prime Factorization Calculator

Find prime factorization of any number with factor tree. Decompose numbers into prime factors step by step.

About the Prime Factorization Calculator

A prime factorization calculator decomposes any positive integer into its unique set of prime number factors — the fundamental building blocks of all integers. The Fundamental Theorem of Arithmetic guarantees that every integer greater than 1 has exactly one prime factorisation (ignoring the order of factors). Prime factorisation is the foundation for computing GCF and LCM, simplifying fractions and algebraic expressions, understanding divisibility, proving properties of numbers, and — critically — it underlies the security of modern public-key cryptography: RSA encryption is secure precisely because factoring the product of two large primes is computationally infeasible. Our calculator uses trial division for small numbers and more efficient methods for large numbers, displays the factorisation in standard exponential notation (2^3 x 3^2 x 5), and shows the factor tree visual for educational purposes.

Formula

n = p1^a1 x p2^a2 x ... x pk^ak (unique factorization) | GCF: lowest shared prime powers | LCM: highest prime powers

How It Works

Trial division algorithm: test divisibility by 2 first (divide out all factors of 2), then 3, then 5, and all odd numbers up to the square root of the remaining quotient. If the remaining quotient is greater than 1 after testing all primes up to its square root, it is itself prime. Example: 360 = 2 x 180 = 2 x 2 x 90 = 2 x 2 x 2 x 45 = 2^3 x 45 = 2^3 x 5 x 9 = 2^3 x 5 x 3^2. In standard form: 2^3 x 3^2 x 5. Verify: 8 x 9 x 5 = 360. Efficiently: only need to test primes up to sqrt(360) ≈ 18.97, so check 2, 3, 5, 7, 11, 13, 17. For GCF: multiply the lowest powers of shared prime factors. For LCM: multiply the highest powers of all prime factors.

Tips & Best Practices

  • Divisibility shortcuts: if digit sum is divisible by 3, the number is divisible by 3. If digit sum is divisible by 9, the number is divisible by 9. Ends in 0 or 5: divisible by 5.
  • A number is prime if no prime up to its square root divides it — only test sqrt(n) possible divisors, making primality testing fast even for large numbers.
  • GCF from prime factorisation: take shared primes at lowest powers. GCF(360, 504): 360=2^3x3^2x5, 504=2^3x3^2x7. Shared: 2^3x3^2=72.
  • RSA cryptography: the product of two 150-digit prime numbers is easy to compute but practically impossible to factorise — the asymmetry between multiplication and factorisation secures internet communications.
  • Perfect numbers: a number equal to the sum of its proper divisors. 28 = 1+2+4+7+14. All known perfect numbers are even and involve Mersenne primes.
  • Highly composite numbers: have more divisors than any smaller positive integer. 12 has 6 divisors (1,2,3,4,6,12) — more than any smaller number. These are the most "divisible" numbers.
  • Euler's totient function phi(n): counts integers from 1 to n that are coprime to n. For prime p: phi(p) = p-1. Used in RSA key generation.
  • The Sieve of Eratosthenes: an ancient algorithm for finding all primes up to N by repeatedly marking multiples of found primes as composite. Still the fastest method for generating all primes up to a moderate limit.

Who Uses This Calculator

Students solving GCF, LCM, and fraction problems. Number theory and cryptography students exploring prime structure. Programmers implementing factorisation algorithms. Teachers creating structured divisibility exercises. Math competition participants solving number theory problems. Computer scientists understanding the computational basis of RSA encryption.

Optimised for: USA · Canada · UK · Australia · Calculations run in your browser · No data stored

Frequently Asked Questions

What is prime factorization?

Prime factorization breaks a number into its prime factors. 60 = 2 × 2 × 3 × 5 = 2² × 3 × 5.