Skip to content
Prime Checker
Menu

Is 5 a Prime Number?

Updated · exact integer math

Yes, 5 is a prime number.

Divisors: 1 and 5

Why 5 is prime

To prove 5 is prime, it's enough to test every prime up to its square root, √5 ≈ 2.24.

That means trying 2. None divides 5 evenly, so its only divisors are 1 and 5.

5 is the 3rd prime number. Both 3 and 7 are prime too, so it's part of two twin-prime pairs.

The nearest primes are 3 (below) and 7 (above).

Numbers around 5

NumberPrime?Factorization
0Neither-
1Neither-
2Prime2
3Prime3
4Composite2²
5Prime5
6Composite2 × 3
7Prime7
8Composite2³
9Composite3²
10Composite2 × 5

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 7 prime?

Yes, prime

Number of divisors
2
Previous prime
5
Next prime
11

Divisors: 1, 7

Its only divisors are 1 and 7, so it's prime.

See where 5 sits among the first hundred numbers on the prime numbers chart, or browse every number from 1 to 1,000.

Questions people ask

Is 5 a prime number?

Yes, 5 is a prime number.

What are the factors of 5?

2 factors: 1, 5.

Is 5 prime or composite?

Prime.

Sources

More prime number tools