# Prime number checker > Is your number a prime number? Test any whole number up to 100 digits for primality, with its prime factors and the next and previous prime. Free prime number checker: test whole numbers of up to 100 digits, see the prime factors, the next and previous prime, and whether the answer is proven. - Page: https://how.box/prime/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/prime/?n={n} - `n` (text): A whole number of up to 100 digits. Example: `1200`. Example answer: https://how.box/prime/?n=1200 A complete link carries the primary answer in the page HTML; a missing or invalid value shows the default page. ## Agent tools - `prime_check`: Is a whole number of up to 100 digits prime? - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"prime_check","arguments":{"number":"1200"}}}` - GET: https://how.box/mcp/run/prime_check?number=1200 ## How it works A prime number is a whole number above 1 whose only divisors are 1 and itself: 2, 3, 5, 7, 11 and so on. Every other number above 1 is composite and is a product of primes in exactly one way, apart from the order: 1200 = 2⁴ × 3 × 5². The numbers 0 and 1 are neither prime nor composite. Dividing by every possible factor is far too slow for big numbers, so the check uses the Miller–Rabin test. It takes a base a and looks for a pattern in the powers of a that every prime must follow; a composite number usually breaks the pattern, and the base that breaks it is a witness. Below about 3.3 × 10²⁴ a fixed set of the first 13 primes as bases is known to catch every composite, so “prime” there is a proof. Above that, no fixed set is proven, so a number that passes 20 bases is shown as “probably prime”: certain enough for practice, but not a proof. “Not prime” is always a proof. Prime factors are found by trial division, which is instant up to 10¹⁵ (a thousand trillion). Above that a composite number is recognised as composite but not factored here. That gap is no accident: testing whether a number is prime is much easier than finding its factors, and much of modern encryption relies on it. ## FAQ **Is 1 a prime number?** No. A prime has exactly two divisors, and 1 has only one. Treating 1 as prime would also break the rule that every number has a single prime factorisation. **Is 2 the only even prime?** Yes. Every other even number is divisible by 2, so it has a divisor besides 1 and itself. **What does “probably prime” mean?** The number passed 20 Miller–Rabin tests with different bases. No composite number is known that fools them all, but for numbers this large it has not been proven, so the page does not call it proven. **How many primes are there?** Infinitely many, as Euclid showed over two thousand years ago. They thin out as numbers grow, but there is always a next one. **Why are no prime factors shown for a large composite number?** This tool factors numbers only up to 10¹⁵. Above that limit it can still identify a composite number without finding its factors. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)