Worksheets · Pre-Algebra

Prime and composite numbers worksheet

A prime number is a whole number greater than 1 whose only factors are 1 and itself, such as 2, 3, 5, 7, 11 and 13. A composite number has more than two factors, so it can be written as a product of two smaller whole numbers: 15 = 3 × 5. The numbers 0 and 1 are neither prime nor composite. 2 is the only even prime, because every other even number has 2 as a factor. To test a number, try the primes up to its square root; if none of them divides it, it is prime.

Not quite the one you need? Same words, different skill:

Select your difficulty

Pick more than one for a sheet that mixes them.

The preview can look cramped on a phone. The PDF and printed sheet come out normal.

Free math worksheets at sigmaprep.io/worksheets© 2026 Sigma Prep

Sigma Prep · sigmaprep.io/worksheets

Name

Prime and Composite Numbers

Date Period

Follow the heading above each group.

  1. Use divisibility tests to rule out or find the prime numbers

    Use a divisibility test to show that 627 is composite.
  2. To decide whether 163 is prime, which primes do you need to test as factors? Test them, then decide.
  3. Use the divisibility tests for 2, 3 and 5 to rule out three of these numbers as primes. Which number is left? 167, 201, 265, 532
  1. Answer each question about the Sieve of Eratosthenes

    The chart shows the Sieve of Eratosthenes partway through: the multiples of 2 and 3, except 2 and 3 themselves, are shaded. Which numbers from 21 to 30 are not shaded but are composite?123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  2. You use the Sieve of Eratosthenes to find the primes from 1 to 81. What is the largest prime whose multiples you need to cross out? Explain.
  3. In the Sieve of Eratosthenes on the numbers 1 to 200, the multiples of each prime are crossed out in turn: 2, then 3, then 5, and so on. Which prime's multiples cross out 120 first?
  1. Answer each question about twin primes (two primes that differ by 2)

    What is the first pair of twin primes after 251?
  2. List all the pairs of twin primes between 169 and 208.
  3. Are 277 and 279 twin primes? Explain.
  1. Answer each question about even and odd numbers, and explain

    Every even number greater than 2 is composite. Explain why, using 536 as an example.
  2. Is every odd number prime? Use 987 to explain.
  3. 535 ends in 5. Is it prime or composite? Explain.

Free math worksheets at sigmaprep.io/worksheets© 2026 Sigma Prep

Sigma Prep · sigmaprep.io/worksheets

Name

Prime and Composite NumbersAnswer keyVersion 1

Date Period

Follow the heading above each group.

  1. Use divisibility tests to rule out or find the prime numbers

    Use a divisibility test to show that 627 is composite.The digits add up to 6 + 2 + 7 = 15, which is divisible by 3, so 3 is a factor: 627 = 3 × 209.
  2. To decide whether 163 is prime, which primes do you need to test as factors? Test them, then decide.2, 3, 5, 7 and 11, because 13 × 13 = 169 is more than 163; none of them divides 163, so 163 is prime
  3. Use the divisibility tests for 2, 3 and 5 to rule out three of these numbers as primes. Which number is left? 167, 201, 265, 532532 is even; the digits of 201 add up to 3, so 3 is a factor; 265 ends in 5; so 167 is left (and 167 is prime)
  1. Answer each question about the Sieve of Eratosthenes

    The chart shows the Sieve of Eratosthenes partway through: the multiples of 2 and 3, except 2 and 3 themselves, are shaded. Which numbers from 21 to 30 are not shaded but are composite?12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910025 (5 × 5)
  2. You use the Sieve of Eratosthenes to find the primes from 1 to 81. What is the largest prime whose multiples you need to cross out? Explain.7: 7 × 7 = 49 is at most 81, but the next prime has 11 × 11 = 121, more than 81. Every composite number up to 81 has a prime factor of 7 or less.
  3. In the Sieve of Eratosthenes on the numbers 1 to 200, the multiples of each prime are crossed out in turn: 2, then 3, then 5, and so on. Which prime's multiples cross out 120 first?2, its smallest prime factor: 120 = 2 × 60
  1. Answer each question about twin primes (two primes that differ by 2)

    What is the first pair of twin primes after 251?269 and 271
  2. List all the pairs of twin primes between 169 and 208.179 and 181; 191 and 193; 197 and 199
  3. Are 277 and 279 twin primes? Explain.No: 279 = 3 × 93, so it is not prime.
  1. Answer each question about even and odd numbers, and explain

    Every even number greater than 2 is composite. Explain why, using 536 as an example.An even number has 2 as a factor. So 536 has at least the factors 1, 2 and 536 (536 = 2 × 268), more than two factors.
  2. Is every odd number prime? Use 987 to explain.No: 987 is odd, but 987 = 3 × 329, so it is composite.
  3. 535 ends in 5. Is it prime or composite? Explain.Composite: every number that ends in 5 has 5 as a factor, and 535 = 5 × 107.

Free math worksheets at sigmaprep.io/worksheets© 2026 Sigma Prep

How to do these

Is 57 prime or composite? Give a reason.

  1. It is odd, so 2 is not a factor.
  2. Its digits add up to 5 + 7 = 12, which is divisible by 3, so 3 is a factor.
  3. 57 = 3 × 19, so 57 has factors other than 1 and 57.

The answer is Composite: 3×19=57.

Where students go wrong

Calling every odd number prime. 9, 21, 51 and 91 are all odd, but 9 = 3 × 3, 21 = 3 × 7, 51 = 3 × 17 and 91 = 7 × 13.

Also called prime or composite, prime and composite, prime numbers, identifying prime and composite numbers or sieve of eratosthenes.

What you can put on this worksheet

Prime or composite, and why (easy); divisibility tests (medium); true or false (hard)
The dots are arranged in 4 equal rows of 10. Is the number of dots prime or composite? Explain using the array. → Composite: there are 4 × 10 = 40 dots, so 40 has the factors 4 and 10 as well as 1 and 40.
Factors and factor pairs (easy); the Sieve of Eratosthenes (medium); the largest or smallest prime (hard)
List the factors of 38 and of 47. Which of the two numbers is prime? → 38: 1, 2, 19, 38; 47: 1, 47; 47 is prime
Primes in a range (easy); twin primes (medium); word problems (hard)
What is the first prime number after 51? → 53 (52 is composite)
Sorting numbers, with 0 and 1 (easy); even and odd numbers (medium); mistakes to explain (hard)
Sort these numbers into prime, composite and neither: 47, 45, 1, 0, 34, 3 → Prime: 3, 47; composite: 34, 45; neither: 0, 1 (0 and 1 are neither prime nor composite)

Questions about these worksheets

Yes. Every prime and composite numbers sheet is free to print and free to download as a PDF. There is no account to make, no email to hand over and no limit on how many you take.

Yes. The answer key prints on a second page, and you can choose whether it shows each question beside its answer or just the answers in a list.

Yes. Print straight from the page, or download the PDF and print that. The sheet is laid out for paper rather than squeezed off a screen, so there is room to work under each question, and the answer key comes out on its own page.

Pre-Algebra is usually taken around 7th or 8th grade, though schools vary and plenty of students meet it earlier or later. Pick the difficulty rather than the grade: the easy level suits a first lesson on it, the hard level suits review before a test.

Yes, as many as you like. The questions are built fresh each time rather than picked from a fixed set of files, so pressing Generate gives a new sheet. That is what you want for a second class, a retake, or two students sitting next to each other.

That is the closest comparison, and Kuta Software is good software. It is also paid software you install on a computer. These worksheets run in a browser tab for free, with no account and nothing to install. Like Kuta, the prime and composite numbers questions are generated when you ask for them rather than pulled from a fixed set of files, so two classes never get the same sheet, and the answer key comes with it.

Yes. There are three levels, and you can tick more than one for a sheet that mixes them, in which case the questions come out easiest first. The harder levels are not just larger numbers: they ask for something the easy ones do not.

You pick from 4: prime or composite, and why (easy); divisibility tests (medium); true or false (hard), factors and factor pairs (easy); the sieve of eratosthenes (medium); the largest or smallest prime (hard), primes in a range (easy); twin primes (medium); word problems (hard) and sorting numbers, with 0 and 1 (easy); even and odd numbers (medium); mistakes to explain (hard). Tick as many as you want and set how many of each, or let it spread them evenly.

Calling every odd number prime. 9, 21, 51 and 91 are all odd, but 9 = 3 × 3, 21 = 3 × 7, 51 = 3 × 17 and 91 = 7 × 13.