How this calculator works
A prime is a whole number greater than 1 whose only positive divisors are 1 and itself. 2, 3, 5, 7, 11, 13 and 17 are the first few. A composite number is any whole number above 1 that is not prime; it can be written as a product of two or more primes.
The fundamental theorem of arithmetic says every whole number above 1 is either prime or a unique product of primes (ignoring the order of the factors). That uniqueness is why prime factorization is useful: it is the canonical fingerprint of a number.
The calculator finds the factorization by trial division. It divides by 2 as many times as possible, then by the odd numbers 3, 5, 7, … up to the square root of what remains. Anything left above 1 at the end is itself prime. Trial division is fast up to roughly 15-digit numbers; beyond that specialised algorithms (Pollard rho, elliptic-curve factorization, GNFS) are needed.
The result is given in exponent form by grouping repeated primes: 2 × 2 × 2 × 3 × 3 × 5 is written 2³ × 3² × 5. The exponent form matches how mathematicians and engineers normally quote factorizations.
The number of positive divisors of a number is found by adding 1 to each exponent and multiplying. 360 = 2³ × 3² × 5 has (3+1)(2+1)(1+1) = 24 divisors. This matters for problems like "how many ways can n objects be arranged in a rectangular grid".
A quick primality check at the top of the page tells you whether the entered number is prime without listing factors — useful for sanity-checking a cryptographic key size or verifying a Mersenne candidate.
Worked example
360
- 360 ÷ 2 = 180. 180 ÷ 2 = 90. 90 ÷ 2 = 45. Pulled out 2³.
- 45 ÷ 3 = 15. 15 ÷ 3 = 5. Pulled out 3².
- 5 is prime. Stop.
- Prime factorization: 2³ × 3² × 5. Divisor count: 4 × 3 × 2 = 24.
Common mistakes
- Including 1 in the list of prime factors. 12 = 2² × 3, not 1 × 2² × 3.
- Stopping too early. If after dividing by small primes a non-1 remainder is left, that remainder may itself be prime (for example, after extracting 2 and 3 from 42 you are left with 7, which is prime and must be included).
- Confusing the number of divisors with the number of prime divisors. 360 has 24 total divisors but only 3 distinct primes (2, 3, 5).
Limitations of this calculator
- Trial division is used, which is fast up to roughly 15-digit numbers but slow for larger inputs. The calculator caps input size to keep response time reasonable.
- Does not factor negative numbers or non-integers. Enter the absolute value and read the sign separately.
- Does not identify "almost prime" structure (semi-primes, Carmichael numbers) by name; those classifications must be inferred from the factorization.
For your specific situation, consult a tax professional or financial advisor.
Questions people ask
Is 1 a prime number?
No. A prime has exactly two positive divisors — 1 and itself. 1 has only one divisor, so it is neither prime nor composite. Treating 1 as prime would break the uniqueness of the fundamental theorem of arithmetic.
What is the smallest prime?
2, which is also the only even prime. Every other even number is divisible by 2, so cannot be prime.
Why does prime factorization matter?
For small numbers it is the basis of simplifying fractions and finding GCF and LCM. For large numbers it is the mathematical hardness assumption behind RSA public-key cryptography — RSA keys are safe because factoring a 2048-bit product of two large primes is practically impossible with current algorithms.
How can I tell quickly if a number is divisible by 3?
Add its digits: if the sum is divisible by 3, so is the number. 360 has digit sum 9, which is divisible by 3, so 360 is too. The same trick with digit sum 9 catches divisibility by 9.
What is the largest known prime?
As of early 2026 the largest known prime is a Mersenne prime with over 24 million digits. The Great Internet Mersenne Prime Search (GIMPS) is a distributed project that finds new ones every few years.
Sources
Last reviewed October 2, 2026 · Last reviewed by Muhammad Ahmad on October 31, 2026