Skip to content

Prime Number Calculator

Check whether an integer is prime, inspect a factor witness, and understand why the square-root test is enough.

Calculation inputs

Whole number from 0 to 1,000,000,000,000.

Precision & interpretation

The 1–100 number map is a teaching aid. An input outside this range is still checked, but is not a cell in that small reference grid.

Calculation results

Number classificationPrimen = 97
Trial-divisor bound9
Factor witnessNone
DefinitionExactly two divisors
Step-by-step solution
  1. Choose the formula

    A prime is an integer greater than 1 with only divisors 1 and itself.
  2. Substitute your inputs

    Check n = 97; √n ≈ 9.848857802
  3. Calculate in order

    No nontrivial divisor exists through floor(√n) = 9.
  4. Write the result

    97 is prime.

Prime number map · 1 to 100

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100

Blue cells are prime; 1 is neither prime nor composite. Inputs outside 1–100 are not cells in this teaching grid.

Deterministic integer test. The displayed square root is approximate; the divisibility stopping condition uses exact integer products.

Exact value & calculation details
Prime
QuantityValue
Input97
ClassificationPrime
Factorization witnessNot applicable

Understand the calculation

Concept & meaning

Prime numbers are integers greater than 1 with no positive divisors other than 1 and themselves. Composite numbers have a nontrivial factor pair.

Formula & special cases

If n = a × b is composite, at least one factor is no larger than √n. Testing divisors through that bound is sufficient. This tool uses deterministic trial division within its stated range.

Precision & limitations

The 1–100 number map is a teaching aid. An input outside this range is still checked, but is not a cell in that small reference grid.

Prime p > 1: positive divisors are exactly 1 and p.

Worked example from your inputs

n = 97 = Prime

Sources & References

OpenStax official logoOpenStax · Prime factorizationPrime factors and factor-tree methodsRead the referenceNIST official logoNIST DLMF · Number theoryPrime powers and divisor functionsRead the reference

References explain the mathematics; they do not imply institutional endorsement.