Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Prime Number Tools

Prime Number Tools

Check if numbers are prime, factorize into prime factors, generate prime lists, and find primes in any range.

Prime Number Calculator for Checking, Factoring & Listing Primes

This prime number calculator lets you check whether a number is prime, break a number into its prime factors, generate a list of primes, find the next or previous prime, and list every prime between two values — all from one screen. Pick a tab, type a number, and the answer appears instantly.

A prime number is a whole number greater than 1 whose only divisors are 1 and itself: 2, 3, 5, 7, 11, 13, and so on. Primes are the building blocks of every other number, since any integer can be written as a unique product of primes. This tool is built for students learning number theory, programmers needing a quick prime reference, teachers demonstrating factorization, and anyone curious about how numbers are made.

Private by design: every calculation runs in your browser using plain JavaScript. The numbers you enter and the results you generate are never uploaded to a server.

How to Use the Prime Number Calculator

1

Check if a number is prime

Open the Check tab and type any number. The tool tells you whether it is prime, and for a prime it shows its position in the sequence (for example, 97 is the 25th prime). For a non-prime it shows the smallest divisor.

2

Factorize a number

Switch to the Factorize tab and enter a number of 2 or more. You get the full prime factorization in exponent notation (such as 360 = 2³ × 3² × 5), the unique prime factors as badges, and a copy button for the formula.

3

Generate a list of primes

On the Generate tab, set how many primes you want (up to 10,000) and click Generate. The list is built with the Sieve of Eratosthenes, and Copy All saves the whole list at once.

4

Find adjacent or in-range primes

Use the Next tab to find the previous and next prime around any number, or the Range tab to list every prime between a From and To value (up to 100,000 numbers apart).

Features

Prime Checker

Instantly tell whether any number is prime using optimized trial division that only tests divisors up to the square root. Primes show their ordinal position; non-primes show the smallest divisor.

Prime Factorization

Break any number of 2 or more into its prime factors with exponents, shown in clean math notation like 2³ × 3² × 5 and ready to copy.

Prime Generator

Generate the first N prime numbers — up to 10,000 at once — using the Sieve of Eratosthenes, one of the fastest ways to find all primes up to a limit.

Adjacent Prime Finder

For any number, find both the previous prime (the largest prime below it) and the next prime (the smallest prime above it), each with a copy button.

Range Prime Lister

List every prime between a start and end value using a segmented sieve, handling ranges up to 100,000 numbers wide.

One-Click Copy & Ordinal Info

Copy any formula or prime list with a single tap, see where a prime ranks in the sequence, and use the tool on desktop, tablet, or mobile with built-in dark mode.

Frequently Asked Questions

What is a prime number?

A prime number is a natural number greater than 1 that has exactly two divisors: 1 and itself. The first primes are 2, 3, 5, 7, 11, and 13. Any number that has additional divisors is called composite.

How do you check if a number is prime?

Open the Check tab and type the number. Behind the scenes the tool uses optimized trial division, testing divisibility only up to the square root, so the answer is instant even for large numbers. If the number is not prime, it also shows the smallest divisor.

How do you find the prime factorization of a number?

Use the Factorize tab and enter a number of 2 or more. Prime factorization rewrites a number as a product of primes — for example, 60 = 2² × 3 × 5. By the Fundamental Theorem of Arithmetic, every composite number has exactly one such factorization.

What are the prime numbers from 1 to 100?

There are 25 primes between 1 and 100: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97. To get this list yourself, set From to 1 and To to 100 on the Range tab.

Is 1 a prime number?

No. A prime must have exactly two distinct divisors, but 1 has only one (itself), so it does not qualify. The smallest prime number is 2, which is also the only even prime.

What is the difference between prime and composite numbers?

A prime number has only two divisors (1 and itself), while a composite number has at least one extra divisor and can be broken into smaller factors. For instance, 7 is prime but 8 is composite because 8 = 2 × 2 × 2. The number 1 is neither prime nor composite.

Is there a largest prime number?

No — there are infinitely many primes, a fact proven by Euclid around 300 BCE. The largest known prime keeps growing as mathematicians discover bigger ones, but the supply of primes never runs out.

What are prime numbers used for?

Primes underpin much of modern computing: RSA encryption, hash functions, random number generators, and error-correcting codes all rely on them. They are central to keeping online data secure.

Enter a number to check
Enter a number ≥ 2 to factorize
Click Generate to create prime list
Enter a number to find adjacent primes
Enter a number in the Check tab to see if it's prime and its position in the sequence
Use Factorize to break any number into prime factors with exponents
Generate up to 10,000 primes with the Generate tab
Find the next and previous prime for any number on the Next tab
List every prime between two values with the Range tab (up to 100,000 apart)
All calculations happen in your browser - no data sent to servers
Want to learn more? Read documentation →
1/7
Start typing to search...
Searching...
No results found
Try searching with different keywords