Factors & primes
What Is a Prime Number?
A prime number is a whole number greater than 1 that has exactly two factors: 1 and itself. 2, 3, 5, 7, 11 and 13 are prime; 6 is not, because 6 = 2 × 3. This guide gives the full list of primes to 100, shows how to test whether any number is prime, and explains why primes matter far beyond the classroom.
What is a prime number?
A prime number can only be divided evenly by 1 and by itself. Try any other whole number and you get a remainder. 7 is prime: 7 ÷ 2, 7 ÷ 3, 7 ÷ 4, 7 ÷ 5 and 7 ÷ 6 all leave something over. 9 is not prime, because 9 ÷ 3 = 3 exactly.
Three parts of the definition matter:
- Whole number. Primes are positive whole numbers. Fractions, decimals and negative numbers are not called prime. (If you are unsure which numbers count as whole, see whole numbers and natural numbers.)
- Greater than 1. The smallest prime is 2. The number 1 is excluded.
- Exactly two factors. Not “at most two”. A prime has 1 and itself, and those two must be different numbers.
A picture helps. Try to arrange a number of counters into a rectangle with at least two rows and two columns. 12 counters can make a 3 × 4 or a 2 × 6 rectangle. 7 counters cannot make any rectangle except a single row of 7. Prime numbers are exactly the numbers that only fit in one long row.
Whole numbers above 1 that are not prime are called composite, because they are composed of smaller factors. How to tell the two apart quickly, and why 1 belongs to neither group, is covered in prime and composite numbers. The short version on 1: it has only one factor, so it fails the “exactly two” test.
List of prime numbers to 100
There are 25 prime numbers between 1 and 100:
Grouped by tens, you can see them thinning out:
| Range | Primes | How many |
|---|---|---|
| 1–10 | 2, 3, 5, 7 | 4 |
| 11–20 | 11, 13, 17, 19 | 4 |
| 21–30 | 23, 29 | 2 |
| 31–40 | 31, 37 | 2 |
| 41–50 | 41, 43, 47 | 3 |
| 51–60 | 53, 59 | 2 |
| 61–70 | 61, 67 | 2 |
| 71–80 | 71, 73, 79 | 3 |
| 81–90 | 83, 89 | 2 |
| 91–100 | 97 | 1 |
The next 21 primes, between 100 and 200, are:
The thinning continues. There are 25 primes below 100, 168 below 1,000 and 1,229 below 10,000. Primes get rarer as numbers grow, but as the section on infinity below shows, they never run out.
Finding primes with the sieve of Eratosthenes
The list above can be produced in a few minutes with a method named after the Greek mathematician Eratosthenes. Write the numbers 2 to 100 in a grid, then:
- Circle 2, the first prime. Cross out every other multiple of 2: 4, 6, 8 and so on.
- Circle the next number not crossed out, 3. Cross out its multiples: 6, 9, 12 and so on.
- Circle 5 and cross out its multiples. Then circle 7 and cross out its multiples.
- Stop. Everything not crossed out is prime.
You can stop after 7 because the next prime, 11, has 11 × 11 = 121 as its first multiple that is not already crossed out, and that is beyond 100. In general, to sieve up to n you only need primes up to √n, and √100 = 10. Any composite number up to 100 must have a prime factor of 10 or less, so it has already been removed.
The sieve works on a multiplication chart too: every number that appears inside the grid, away from the 1 row and 1 column, is composite.
How to tell if a number is prime
To test a single number, try dividing it by each prime up to its square root. If none divides exactly, the number is prime. If one does, it is composite and you have found a factor.
The square-root limit is what makes this practical. If n had a factor larger than its square root, the partner in that pair would have to be smaller than the square root, and you would have found it already.
| Testing numbers up to | Square root | Primes you need to try |
|---|---|---|
| 100 | 10 | 2, 3, 5, 7 (4 primes) |
| 400 | 20 | 2 through 19 (8 primes) |
| 1,000 | ≈ 31.6 | 2 through 31 (11 primes) |
| 10,000 | 100 | 2 through 97 (25 primes) |
Divisibility shortcuts
- 2: the last digit is even.
- 3: the digits add up to a multiple of 3.
- 5: the last digit is 0 or 5.
- 11: the alternating sum of the digits is 0 or a multiple of 11. For 143,
1 − 4 + 3 = 0, so143 = 11 × 13.
There is no easy digit rule for 7 or 13, so divide. A remainder calculator tells you instantly whether the remainder is 0.
Example: is 113 prime?
Example: is 221 prime?
221 is a classic trap: no small prime divides it, and its smallest factor is 13.
For bigger numbers the factor calculator runs this test for you and reports prime or composite, along with every factor if there are any.
Numbers that look prime but are not
Odd numbers that avoid 5 and do not have an obvious factor fool a lot of people. These are the usual suspects:
| Number | Factors as primes |
|---|---|
| 51 | 3 × 17 |
| 57 | 3 × 19 |
| 87 | 3 × 29 |
| 91 | 7 × 13 |
| 119 | 7 × 17 |
| 133 | 7 × 19 |
| 143 | 11 × 13 |
| 161 | 7 × 23 |
| 169 | 13² |
| 187 | 11 × 17 |
| 209 | 11 × 19 |
| 221 | 13 × 17 |
51, 57 and 87 fall to the digit-sum test for 3. 91, 119, 133 and 161 are multiples of 7. 143 and 187 fail the 11 test. 169 is 13², one of the perfect squares, and any perfect square above 1 is composite.
Patterns in the primes
- 2 is the only even prime. Every other even number is divisible by 2, so it has at least three factors.
- Above 5, every prime ends in 1, 3, 7 or 9. A last digit of 0, 2, 4, 6 or 8 means divisible by 2; a last digit of 5 means divisible by 5. The reverse is not true: 21, 33, 27 and 49 end in those digits and are composite.
- Every prime above 3 is one more or one less than a multiple of 6. 5 and 7 sit beside 6, 11 and 13 beside 12, 17 and 19 beside 18. Numbers in the other positions are divisible by 2 or 3. Again, not every such number is prime: 25 and 35 sit beside multiples of 6 too.
- Twin primes are pairs two apart. Below 100 there are eight pairs: 3 and 5, 5 and 7, 11 and 13, 17 and 19, 29 and 31, 41 and 43, 59 and 61, 71 and 73. Whether there are infinitely many twin pairs is still an unsolved problem.
Why there are infinitely many primes
About 2,300 years ago Euclid gave a short argument that the primes never end. Suppose you had a complete list of every prime. Multiply them all together and add 1. The new number leaves remainder 1 when divided by every prime on your list, so none of them divides it. Either it is prime itself, or it has a prime factor that is not on the list. Either way, the list was not complete.
The second line shows a common misreading. The argument does not say “multiply the primes and add 1 to get a prime”. It says the result always contains a prime you did not have.
The largest primes known today are found by computer and have tens of millions of digits. Most of the record holders are Mersenne primes, of the form 2p − 1, written with the notation covered in exponent rules. Small examples are 2³ − 1 = 7, 2⁵ − 1 = 31 and 2⁷ − 1 = 127. Not every exponent works: 2¹¹ − 1 = 2,047 = 23 × 89.
Why prime numbers matter
They build every other number
Every whole number above 1 can be written as a product of primes in exactly one way, which is why primes are called the building blocks of the whole numbers. 360 = 2³ × 3² × 5 and there is no other set of primes that makes 360. The prime factorization calculator finds that breakdown for any number and draws it as a factor tree.
They drive fraction and factor arithmetic
Once numbers are written as primes, the greatest common factor and least common multiple fall straight out, as shown in how to find the GCF and LCM. That in turn is how you reduce fractions and find common denominators. Simplifying square roots works the same way: √72 = √(2³ × 3²) = 6√2, which the square root calculator shows step by step.
They protect information online
Widely used public-key encryption, including the RSA system, relies on a lopsided fact about primes. Multiplying two very large primes together is quick for a computer. Taking the product and recovering the two primes, when each has hundreds of digits, is far too slow with any known method. The product can be published, and only the person who knows the two primes can unlock what is encrypted with it.
Common mistakes
- Calling 1 prime. It has one factor, not two. The smallest prime is 2.
- Thinking all odd numbers are prime. 9, 15, 21, 25, 27 and 33 are all odd and composite.
- Forgetting that 2 is prime. Being even does not disqualify it; its only factors are 1 and 2.
- Stopping the test too early. Checking 2, 3 and 5 and declaring 91 prime misses
7 × 13. Check every prime up to the square root. - Testing far past the square root. Not wrong, just wasted effort. For 113, nothing beyond 7 needs checking.
- Treating a prime-looking last digit as proof. Ending in 1, 3, 7 or 9 is necessary for primes above 5, not sufficient.
Frequently asked questions
Is 1 a prime number?
No. A prime must have exactly two different factors, 1 and itself, and 1 has only one factor. It is also left out so that every whole number has exactly one prime factorization; if 1 were prime you could tack on as many 1s as you liked. 1 is neither prime nor composite. The smallest prime number is 2.
Is 2 a prime number?
Yes. 2 is the smallest prime and the only even prime. Its only factors are 1 and 2, which meets the definition exactly. Every other even number is divisible by 2 as well as by 1 and itself, so it has at least three factors and is composite. That makes 2 the only prime you need to check for divisibility by 2.
Is 91 a prime number?
No. 91 = 7 × 13, so its factors are 1, 7, 13 and 91. It looks prime because it is odd, does not end in 5 and its digits add to 10, so 2, 3 and 5 do not divide it. The square root of 91 is about 9.5, which means 7 must be tested too, and 7 divides 91 exactly.
Is 51 a prime number?
No. 51 is 3 × 17. The quickest check is the digit-sum rule for 3: 5 + 1 = 6, and 6 is a multiple of 3, so 51 is divisible by 3. Its factors are 1, 3, 17 and 51. 57 and 87 are similar traps, equal to 3 × 19 and 3 × 29.
How many prime numbers are there between 1 and 100?
There are 25 prime numbers between 1 and 100: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97. The largest prime below 100 is 97. Between 100 and 200 there are 21 more, starting with 101, 103, 107 and 109.
How do you check if a large number is prime?
Divide it by every prime up to its square root. If none divides evenly, it is prime. For a number below 10,000 that means at most the 25 primes up to 97. Use the digit rules for 2, 3, 5 and 11 to skip most of the work, and divide for the rest. A factor calculator does the whole test instantly.
Are there infinitely many prime numbers?
Yes, and Euclid proved it more than two thousand years ago. Multiply any finite list of primes together and add 1. The result is not divisible by any prime on the list, so it is either a new prime or has a new prime factor. No list of primes can ever be complete, even though primes become rarer as numbers get larger.
Calculators for this
Every one of these shows the working, so you can check the method as well as the answer.
More guides
https://fourfunctioncalculator.com/what-is-a-prime-number/