Is 21 a Prime Number?
Updated · exact integer math
No, 21 is not a prime number. It's composite.
21 = 3 × 7
Why 21 is not prime
Its digits add up to 3, which is divisible by 3, so 21 is too: 21 ÷ 3 = 7.
Its prime factorization is 3 × 7, and it has 4 divisors: 1, 3, 7, 21.
The nearest primes are 19 (below) and 23 (above).
Numbers around 21
| Number | Prime? | Factorization |
|---|---|---|
| 16 | Composite | 2⁴ |
| 17 | Prime | 17 |
| 18 | Composite | 2 × 3² |
| 19 | Prime | 19 |
| 20 | Composite | 2² × 5 |
| 21 | Composite | 3 × 7 |
| 22 | Composite | 2 × 11 |
| 23 | Prime | 23 |
| 24 | Composite | 2³ × 3 |
| 25 | Composite | 5² |
| 26 | Composite | 2 × 13 |
Check another number
Any whole number up to 24 digits. Commas are fine.
Try 1,000,003 or 561. Want a list instead? See the list of prime numbers.
Is 23 prime?
Yes, prime
Number of divisors
2
Previous prime
19
Next prime
29
Divisors: 1, 23
Its only divisors are 1 and 23, so it's prime.
See where 21 sits among the first hundred numbers on the prime numbers chart, or browse every number from 1 to 1,000.
Questions people ask
Is 21 a prime number?
No, 21 is not a prime number. It's composite.
What are the factors of 21?
4 factors: 1, 3, 7, 21.
Is 21 prime or composite?
Composite: 21 = 3 × 7.