How to use it
- Type a whole number from 1 to 10¹⁵ in Whole number. Spaces inside the number are allowed.
- Read Prime factorization and the table of prime factors with their exponents.
- Check Number of divisors, Sum of the divisors and Is it prime?.
- Go through How it is worked out to see the factor tree, one split at a time.
How the factors are found
Trial division divides the number by 2, 3 and 5, then by the numbers coprime to 30 (7, 11, 13, 17, 19, 23, 29 and so on), each time the division is exact. It stops at 10,000 or when the square of the next candidate is larger than what is left.
What is left is either 1, a prime, or a composite number with two prime factors above 10,000. A prime is recognised with the Miller-Rabin test, and a composite is split with Pollard's rho method, which finds a divisor by a cycle search.
Divisors and their sum
If n = p₁^e₁ × p₂^e₂ × … then n has (e₁ + 1) × (e₂ + 1) × … divisors. The sum of the divisors is the product of the sums 1 + p + … + p^e for each prime power.
A prime has two divisors, 1 and itself, so its sum of divisors is one more than the prime. The number 1 has one divisor and is not prime.
n = p₁^e₁ × … × p_k^e_k
number of divisors = (e₁ + 1) × … × (e_k + 1)
sum of divisors = (1 + p₁ + … + p₁^e₁) × … × (1 + p_k + … + p_k^e_k)
What the calculator does not cover
- Numbers above 10¹⁵, and negative numbers, decimals or fractions.
- Factorisation of many numbers at once: use the GCD and LCM calculator for a list of numbers.
- A proof of primality for numbers above 3.3 × 10²⁴: the test here is exact below that bound.
Worked example: 600851475143
Trial division removes 71, 839, 1471 and 6857, each once, so 600851475143 = 71 × 839 × 1471 × 6857. Every exponent is 1, so there are 2 × 2 × 2 × 2 = 16 divisors.
The sum of the divisors is (1 + 71) × (1 + 839) × (1 + 1471) × (1 + 6857) = 72 × 840 × 1472 × 6858 = 610,544,148,480. The number is composite, so it is not prime.
| Result | |
|---|---|
| Prime factorization | 71 × 839 × 1471 × 6857 |
| Number of divisors | 16 |
| Sum of the divisors | 610,544,148,480 |
| Is it prime? | No |
Frequently asked questions
What is a prime factorization?
It is the way a whole number is written as a product of prime numbers. For example 84 = 2 × 2 × 3 × 7, which is written as 2² × 3 × 7 with the exponent 2 on the 2.
Why does the tool stop trial division at 10,000?
Trial division is slow for large primes, so after the divisions up to 10,000 the rest is tested with Miller-Rabin and split with Pollard's rho method. Below 10¹⁵, what is left has at most three prime factors, and both methods find them quickly.
Is 1 a prime number?
No. A prime has exactly two divisors, and 1 has only one. So the number 1 is neither prime nor composite, and it has no prime factors.
How accurate is the primality test?
For every number below 3.3 × 10²⁴ the test is exact, because the bases 2 to 41 are known to decide primality for that range. The tool here only accepts numbers up to 10¹⁵.
What does the number of divisors tell me?
It counts every whole number that divides the number exactly, including 1 and the number itself. It is found from the exponents: multiply each exponent plus one.
Are the numbers I type sent to a server?
No. The factorisation runs in your browser, and nothing you type is sent to us.
Sources
- Wikipedia: Integer factorization, with trial division and Pollard's rho
- Wikipedia: Pollard's rho algorithm
- Wikipedia: Miller-Rabin primality test
- Wikipedia: Divisor function, the number and sum of divisors
Figures and text last checked on Tuesday, November 10, 2026.