Prime Number Checker
Check whether a number is prime and see how many divisors it has.
Last updated · View algorithm, constants and default inputs (JSON)
About this calculator
A prime number has exactly two divisors: one and itself. Primality testing only needs trial division up to the square root, because any factor larger than that must be paired with one smaller.
Worked example
calculated with the default values below
Number 97 Prime status Prime · Number of divisors 2 · Prime factors 1 · Square root 9.8489
General background references
Disclaimer
These calculators give general mathematical results. They suit study, planning and estimation — verify anything that feeds a graded submission, a published figure or a financial commitment.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
τ = Σ_{k=1}^{⌊√n⌋} [k|n](2 − [k² = n]); n ∈ ℙ ⇔ τ = 2
- n
- Integer to test
- k
- Trial divisor
- ⌊√n⌋
- Integer trial bound
- [P]
- Iverson bracket: 1 if P holds, else 0
- k|n
- k divides n
- τ
- Number of divisors
- ℙ
- Set of prime numbers
An integer greater than 1 is prime exactly when it has two positive divisors; the result states this directly.
Frequently asked questions
Does it tell me directly whether the number is prime?
Yes. It labels an integer greater than 1 as prime when it has exactly two positive divisors; 1 and lower values are not prime.