Prime vs Composite Numbers (original) (raw)

Last Updated : 26 Jan, 2026

Prime and Composite Numbers are subsets of Natural Numbers based on divisibility. A prime number is divisible by only 1 and itself and a composite number is divisible by one or two more other

Every natural number, except 0 or 1, is either prime or composite.

Prime-vs-Composite

Prime Numbers vs Composite Numbers

The following table lists five differences between a prime and composite number:

Prime Numbers Composite Numbers
All the natural numbers greater than 1 that have only two factors - one and the number itself are called prime numbers. All natural numbers that can be expressed as a product of at least two smaller natural numbers are known as composite numbers.
Prime numbers have exactly two factors - 1 and the number itself. Composite numbers have at least 3 or more factors.
All the prime numbers except 2 are odd numbers. There is no such pattern for composite numbers. They can be odd or even both.
Their prime factorization has only one prime factor i.e., the number itself. Their prime factorization has one or more other prime factors. For example, 49 has a prime factor of 7 and
The product of two prime numbers is a composite number The product of two composite numbers is also a composite number
Examples: 2, 3, 5, 7, ... Examples: 4, 6, 8, 9, 10, ...

Prime and Composite Numbers Chart

A prime and composite numbers chart is a table that lists all the numbers from 1 to 100 and identifies them as either prime or composite. Here is the prime and composite numbers chart

Prime-and-Composite-Numbers

Tests for Prime and Composite numbers

We can use below quick steps.

  1. If the given number is 0 or 1, then it is neither prime not composite.
  2. If a number is even and not 2, then it is composite
  3. For other cases, a simple way is to find all divisors of a given number and check if the divisors are other than 1 and the number itself. If there are other, then the number is composite, else prime.

**Also Check:

**Important Facts about Prime and Compsite Numbers

**Read More:

Practice Questions on Prime and Composite Numbers

Here are some practice questions/problems based on prime and composite numbers:

**1. Is 1 a composite number?

**2. Check whether 23 is a prime number.

**3. Check whether 56 is a prime number.

**4. Check whether 2779 is a prime number. (Hint: Use Efficient Primarility Test)

**5. Use Eratosthenes sieve to find all the prime numbers from 1 to 100.

**6. Find the prime factors of 69.