What this calculator does
Every whole number above one is either prime or a unique product of primes. That uniqueness is the fundamental theorem of arithmetic, and it makes prime factorisation the natural way to understand a number’s structure: its divisors, its common factors with other numbers, and how it behaves in fractions.
This calculator tests primality by trial division and returns the complete factorisation along with the count and sum of all divisors. Both of those follow directly from the factorisation rather than needing the divisors to be listed out.
The formula
Trial division tests each integer from 2 upward, dividing out any factor found and repeating until the remainder cannot be divided further. Testing only up to the square root is sufficient, because any factor above it must pair with one below.
| Term | Meaning |
|---|---|
| Prime | A number greater than 1 whose only divisors are 1 and itself. |
| Prime factorisation | The unique set of primes whose product is the number. |
| Divisor | Any number that divides evenly with no remainder. |
| Exponent form | The factorisation written with repeated primes as powers. |
The inputs explained
| Field | What to enter |
|---|---|
| Whole number | A whole number. Very large values will take longer, since trial division tests every integer up to the square root. |
When to use it
Simplifying fractions
Factorising numerator and denominator makes the shared factors visible, which is the manual route to lowest terms.
Finding all the divisors
The divisor count comes straight from the exponents in the factorisation: add one to each and multiply. That is far faster than testing every candidate.
Understanding why some numbers are convenient
60 has twelve divisors, which is why it underpins minutes, seconds and degrees. Highly composite numbers divide neatly in many ways, and that is why they were chosen.
Checking primality
Useful in number theory work and as a sanity check. Cryptographic applications use enormous primes and probabilistic tests rather than trial division, but the principle is the same.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
Factorisation of some interesting numbers
A range of numbers chosen to show different factorisation patterns.
| Number | Is it prime? | Prime factors | Exponent form | Number of divisors |
|---|---|---|---|---|
| 60 | No | 2 × 2 × 3 × 5 | 2^2 × 3 × 5 | 12 |
| 97 | Yes | 97 | 97 | 2 |
| 100 | No | 2 × 2 × 5 × 5 | 2^2 × 5^2 | 9 |
| 128 | No | 2 × 2 × 2 × 2 × 2 × 2 × 2 | 2^7 | 8 |
| 360 | No | 2 × 2 × 2 × 3 × 3 × 5 | 2^3 × 3^2 × 5 | 24 |
| 5,040 | No | 2 × 2 × 2 × 2 × 3 × 3 × 5 × 7 | 2^4 × 3^2 × 5 × 7 | 60 |
Powers of two versus highly composite numbers
Numbers of similar size with very different divisor structures.
| Number | Prime factors | Number of divisors | Sum of divisors |
|---|---|---|---|
| 64 | 2 × 2 × 2 × 2 × 2 × 2 | 7 | 127 |
| 96 | 2 × 2 × 2 × 2 × 2 × 3 | 12 | 252 |
| 100 | 2 × 2 × 5 × 5 | 9 | 217 |
| 120 | 2 × 2 × 2 × 3 × 5 | 16 | 360 |
| 128 | 2 × 2 × 2 × 2 × 2 × 2 × 2 | 8 | 255 |
| 144 | 2 × 2 × 2 × 2 × 3 × 3 | 15 | 403 |
Questions
Is 1 a prime number?
No. Primes are defined as having exactly two distinct divisors, and 1 has only one. Excluding it is what keeps prime factorisation unique: otherwise any factorisation could have any number of 1s appended.
How do I find prime factors by hand?
Divide by the smallest prime that goes in evenly, then repeat on the quotient. Start with 2, then 3, 5, 7 and so on. Stop when the remaining number is prime.
How many divisors does a number have?
Add one to each exponent in the prime factorisation and multiply. For 360 = 2³ × 3² × 5, that is 4 × 3 × 2 = 24 divisors.
What is the largest known prime?
It changes as new ones are discovered, and the record has stood in the tens of millions of digits for some years. They are found by distributed computing projects searching a particular form of number, and cannot be verified by trial division.
Why do primes matter in cryptography?
Multiplying two large primes is easy; recovering them from the product is computationally hard. Several widely used encryption schemes rest on that asymmetry.
For common factors between numbers, see GCD and LCM. For counting arrangements, try permutations and combinations.