upload Share

Prime Number Checker

Is your number prime or composite? Enter any number and find out instantly — with a clear explanation of why, the divisibility test shown step by step, and a list of nearby prime numbers.

calculate Enter a Number
Quick picks

Why?

Nearby Primes

"Prime numbers are the atoms of arithmetic — every number is either prime, or can be built by multiplying primes together. There are infinitely many of them, and they never run out."

What makes a number prime?

A prime number has exactly two factors: 1 and itself. That means nothing else divides into it evenly. Examples: 2, 3, 5, 7, 11, 13, 17, 19, 23…

A composite number has more than two factors. For example, 12 is composite because it can be divided by 1, 2, 3, 4, 6, and 12.

The number 1 is neither prime nor composite — it only has one factor (itself), so it doesn’t qualify as prime. The number 2 is the only even prime because every other even number is divisible by 2.

To test if a number n is prime, you only need to check divisors up to √n. If none divide evenly, it’s prime!

Quick Questions

Why do we only check up to the square root?

If a number n has a factor larger than √n, then it must also have a factor smaller than √n. So if we haven’t found any factors up to √n, there can’t be any larger ones either. This makes prime checking much faster for big numbers.

How many prime numbers are there?

Infinitely many! Euclid proved this around 300 BC. His proof: assume there’s a finite list of all primes, multiply them all together and add 1 — that new number is either prime itself, or has a prime factor not on your list. Either way, the list was incomplete. So there must be infinitely many primes.

Disclaimer: All calculators on this site are provided for informational and educational purposes only. Results are estimates based on the inputs you provide and mathematical formulas — they do not account for taxes, fees, inflation, risk, or other real-world factors that may affect financial outcomes. Past performance does not guarantee future results. Nothing on this site constitutes financial, investment, legal, or tax advice. Always consult a qualified professional before making financial decisions.

About FinanceCalcs.net — FinanceCalcs.net is a free financial calculator directory built and maintained by Ted Grajeda. The site exists to give everyone access to fast, accurate financial math — no subscriptions, no paywalls, no signup required. Every calculator runs entirely in your browser using standard financial formulas.