Prime Number Checker and Generator

Check if a number is prime or list all prime numbers in a range — free online prime tool.

About

About the Prime Number Checker and Generator

Checks whether a number is prime, or lists every prime in a range, using a fast sieve algorithm.

Students and teachers use it to check homework and explore which numbers in a range are prime, while developers use it to generate quick reference lists of primes for algorithms and puzzles. It's one of many free generators on Toolapt, and like every tool here, it's free to use with no sign-up and no limit on how many times you run it.

Choose what to view about this tool

Guide

Using the Prime Number Checker and Generator

  1. 1

    Step 1

    Choose a mode — "Check a number" or "List primes in a range".

  2. 2

    Step 2

    In check mode, enter the whole number to test.

  3. 3

    Step 3

    In range mode, enter the "From" and "To" bounds of the range.

  4. 4

    Step 4

    Click "Calculate" to see the result, then "Copy" to copy it, or "Clear" to start over.

  • Checks whether a single whole number is prime, using an efficient trial-division test
  • Lists every prime number in a range, using a fast Sieve of Eratosthenes algorithm
  • Handles ranges up to 5,000,000, spanning up to 2,000,000 numbers
  • Shows the first 2,000 results directly, with "Copy" available for the full list
  • Formats large numbers with thousands separators for readability
  • Works entirely in your browser — no installs and no sign-up
  • Free to use, with no limit on how many times you run it
  • Fully responsive, so it works just as well on a phone as on a desktop

Students

Students use the Prime Number Checker and Generator for checking homework and exploring which numbers in a range are prime.

Teachers

Teachers use the Prime Number Checker and Generator for producing accurate example lists of primes for lessons and worksheets.

Developers

Developers use the Prime Number Checker and Generator for quick reference lists of primes to test algorithms against.

Puzzle and math enthusiasts

Puzzle and math enthusiasts use the Prime Number Checker and Generator for exploring prime distributions in a range at a glance.

Examples

Prime Number Checker and Generator examples

3 worked examples

01

Checking a single number

Checking 97 confirms it's prime, since no whole number other than 1 and 97 divides it evenly.

02

Checking a non-prime

Checking 100 shows it's not prime, since it's divisible by 2, 5 and 10 among others.

03

Listing a range

Listing primes from 1 to 50 returns 15 numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47.

FAQ

Frequently asked questions

Quick answers to common questions about the Prime Number Checker and Generator.

What does the Prime Number Checker and Generator do?

It either checks whether a single whole number is prime, or lists every prime number within a range you choose.

Is the Prime Number Checker and Generator free to use?

Yes. It's free, with no sign-up, no watermark and no limit on how many times you use it.

Is my input safe when I use this tool?

Yes. Every calculation happens entirely on your own device — nothing is sent to a server.

What counts as a prime number?

A whole number greater than 1 that has no divisors other than 1 and itself. 0 and 1 are not prime, and the tool follows that definition exactly.

How large a number can I check?

Single numbers can be checked up to Number.MAX_SAFE_INTEGER (about 9 quadrillion); beyond that, results can't be guaranteed exact.

Why is there a limit on the range size?

Listing primes uses a sieve that allocates memory for the whole range, so it's capped at 5,000,000 as the upper bound and 2,000,000 numbers spanned, to keep it fast in the browser.

Can I use the Prime Number Checker and Generator on my phone?

Yes. The page is fully responsive and works on mobile, tablet and desktop browsers alike.

Does the Prime Number Checker and Generator have any limitations?

In range mode, only the first 2,000 results are shown on screen (use Copy for the full list), and the range itself is capped at 5,000,000.

Still have a question? Contact us

Report a problem

Prime Number Checker and Generator

What went wrong?
    or paste a screenshot