Prime Number Calculator

Test a whole number for primality and meet its neighbouring primes.

A whole number from 1 to 1 000 000 000 000

Try

Result

You enteredn=91n = 91

91 is not prime: 91 = 7 × 13\displaystyle \text{91 is not prime: 91 = 7 × 13}

Next prime

97\displaystyle 97

Previous prime

89\displaystyle 89
Show the work
  1. Test divisors up to the square root

    If 9191 had a factor larger than its square root, it would be paired with a smaller one, so it is enough to test the primes up to it, 22, 33, 55 and 77. The first one that divides 9191 exactly is 77, so 9191 has a factor other than 11 and itself.

    ⌊91⌋=991=7×13\begin{gathered} \lfloor\sqrt{91}\rfloor = 9 \\ 91 = 7 \times 13 \end{gathered}
  2. Result

    So 9191 is not prime, because it equals 7×137 \times 13.

Worked examples