Prime Factorization
Decompose any number into its prime factors. Instant result with the complete factorization.
What is prime factorization?
To factor a number is to write it as a product of prime numbers. By the Fundamental Theorem of Arithmetic, every integer greater than 1 has one unique prime factorization. Take 360 as an example: it works out to 2³ × 3² × 5.
This factorization is what GCD and LCM algorithms, RSA cryptography and much of number theory build on.
Prime factorisation and the fundamental theorem of arithmetic
The fundamental theorem of arithmetic states that every integer greater than 1 has a unique factorisation as a product of primes, up to the order of the factors. So 60 = 2² · 3 · 5 and no other prime-power combination produces 60. The simplest method to compute this is trial division: divide by 2 while possible, then 3, then 5, 7, 11... up to sqrt(n) — if nothing divides up to that point, what remains is itself prime. Example: 16 = 2⁴; 60 = 2 · 30 = 2 · 2 · 15 = 2² · 3 · 5.
Trial division is O(sqrt n) in the worst case. For numbers with hundreds of digits, faster algorithms are used: Pollard's rho (good for finding small factors), the quadratic sieve, and the general number field sieve (GNFS) — the asymptotically best classical algorithm and the one that holds the current public records for large RSA challenge numbers.
Why factorisation matters
- RSA cryptography relies on the practical difficulty of factoring the product of two large primes. Standard key sizes today are 2048 or 4096 bits.
- Counting divisors: if
n = p₁^e₁ · p₂^e₂ · ..., the number of positive divisors isd(n) = (e₁ + 1)(e₂ + 1).... For 60 = 2² · 3 · 5 that gives 3 · 2 · 2 = 12 divisors. - Sum of divisors and other multiplicative functions are computed from the factorisation as well.
- Shor's algorithm on a sufficiently large quantum computer would factor in polynomial time, breaking RSA — which is why post-quantum cryptography is now a major area of research.
Decompose a number into prime factors
Any integer greater than 1 can be written as a product of primes, and that's its factorisation. The decomposition serves as the basis for understanding divisibility, GCD, LCM and quite a bit beyond that. This tool breaks the number you choose into its primes.
Type the number and get the full factorisation, with each prime factor and how many times it appears (360 = 2³ × 3² × 5, for example). It's good for maths exercises, for simplifying fractions, finding divisors or just understanding how a number is built on the inside.
Without doing the successive divisions on paper, the calculation runs in the browser. A direct tool for prime factorisation.
Frequently asked questions
Why stop trial division at sqrt(n)?
Is 1 a prime number?
How large can this calculator handle?
How do you factor a prime?
Related Tools
Prime Factorization Calculator
Splits a whole number of 2 or more into its prime powers by trial division: type 360 and read back 2^3 · 3^2 · 5, the unique decomposition.
Prime Number Checker
Check if a number is prime. Shows the prime factorization, the previous prime and the next prime. Instant result.
Number of Sprinklers
Calculate the number of automatic sprinklers needed, N = area ÷ coverage area per head, dividing the total area to protect (m²) by the maximum coverage area of each sprinkler (m²). The result is the minimum number of heads to cover the space, spaced within code limits (coverage per head depends on hazard class and sprinkler type). In practice, always round up and adjust to the piping and beam layout. It is an initial quantity calculation in sprinkler system design. Enter the area to protect and the coverage area per head.
PT Classical Poetry Verses
Shows verse count for classical Portuguese poetic forms sonnet ballad sextain.
Mobile Task Taps Count
Estimates total taps to complete a mobile task based on screen count (3 taps per screen).
Termite Mounds per Hectare
Estimates termite mound density per hectare by biome.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.