Prime Number Calculator
Check whether a whole number is prime, composite, 0, or 1. Shows the smallest factor for composite numbers and links to full factorization.
Up to 15 digits. Larger numbers usually need specialized primality tests.
Check whether a number is prime or composite
The English prime number calculator intent is a fast checker: enter a whole number and see whether it is prime, composite, or one of the special cases 0 and 1.
If a factor d greater than 1 is found, the number is composite.
- Prime numbers are whole numbers greater than 1 with exactly two positive factors.
- Composite numbers are whole numbers greater than 1 with more than two positive factors.
- 0 and 1 are neither prime nor composite.
Trial division used here
This browser calculator uses explainable trial division through the square-root boundary. For very large integers, specialized tests such as Miller-Rabin are commonly used by competitor tools.
| Number | Result |
|---|---|
| 97 | Prime |
| 91 | Composite, smallest factor 7 |
| 1 | Neither prime nor composite |
| 2 | Prime |
Frequently Asked Questions
Sources and References
Calculations are based on the listed reference sources. Links open in a new tab.
Related Tools
Break an integer into prime factors, see repeated factors, canonical exponent form, trial-division steps, and the total number of positive factors.
Find all positive factors of a number, factor pairs, prime factorization, factor count, sum of factors, proper factors, and number type.
Calculate a mod b and compare JavaScript-style remainder with Python-style modulo for positive, negative, integer, and decimal inputs.
Calculate n! for non-negative integers from 0 to 170. See the exact factorial value, digit count, and multiplication steps.
Round numbers to decimal places, whole numbers, or a nearest multiple. Compare half-away, half-even, ceiling, floor, and truncation results.