Check whether any positive integer is prime, with the full prime factorisation when it is not. Trial division to ⌈√n⌉ — deterministic and exact.
Paste any positive integer and the Prime Number Checker tells you in one click whether it is prime. If it is not, you also get the complete prime factorisation, so 91 does not just return “not prime” but shows 91 = 7 × 13, and you can see immediately which factors you were missing. The result copies as a sentence ready to paste into a report or a chat thread.
Pressing Load Sample loads 9999991 on the first click, the largest prime below ten million. That number passes the trial-division limit of √9999991 ≈ 3163 without finding a factor, which is the fastest way to see both the algorithm and the result side by side. Subsequent clicks cycle through a Mersenne prime (131071 = 2¹⁷ − 1), a classic trick question (91 = 7 × 13), the Fermat pseudoprime 341, and other instructive cases.
√n, the number is prime. For 9999991 that means checking 528 candidates, not five million.97.5 returns “Please enter a positive integer — whole numbers only, no decimals or signs.”341 = 11 × 31 passes the naive test that many student implementations use (checking whether 2³⁴⁰ ≡ 1 mod 341) but this tool divides directly, so it correctly identifies 341 as composite on the first Load Sample cycle that reaches it. 72 shows 72 = 2³ × 3², not2 × 2 × 2 × 3 × 3.Probabilistic methods like Miller-Rabin are needed when testing numbers above roughly 10¹⁵. Below that threshold, trial division up to √n is exact, gives zero false positives, and for any value a person would plausibly type runs in well under a millisecond. The component does not need a primality certificate or a probabilistic witness. The loop either finds a factor or exhausts every possible one, and the 2⁵³ − 1 ceiling is stated on screen so there is no silent failure on large inputs.