Prime and Composite Numbers: Examples, Quiz, and Calculator

Updated 14 November 2026

Prime numbers have exactly two positive factors: 1 and themselves. Composite numbers have more than two. Both definitions apply to integers greater than 1.

Prime or composite?

Enter a positive integer from 1 to 1,000,000,000. See every positive factor, its factor pairs, and its prime factorization.

Classification

Positive factors

Prime factorization

Factor pairs

The key distinction

Prime: exactly two positive factors.
Composite: more than two positive factors.
1: neither prime nor composite.

Examples you can check

NumberPositive factorsClassification
11Neither
21, 2Prime
41, 2, 4Composite
71, 7Prime
91, 3, 9Composite
171, 17Prime

How to test a number

For an integer greater than 1, look for a factor other than 1 and the number itself. You only need to test possible divisors up to its square root: any larger divisor is paired with a smaller one.

Is 29 prime?

\(\sqrt{29}\approx5.39\). Check the primes 2, 3, and 5. None divides 29 exactly, so 29 is prime.

Is 91 prime?

\(91=7\times13\), so 91 is composite. An odd number can still be composite.

2 is the only even prime. Every even integer greater than 2 has 2 as an extra factor. Zero and negative integers are not classified as prime or composite in this elementary definition.

Prime and composite number game

Choose the numbers that match the game's requested category. Remember: 1 belongs to neither category. If the older game stops responding after a round, reload the page to restart it.

Practice

Classify 13, 21, 31, and 49.

Show answers

13 and 31 are prime. 21 is composite because \(21=3\times7\). 49 is composite because \(49=7\times7\).

Learn to break composite numbers into primes in the prime factorization lesson.