A simple tool to calculate the the next prime after a given number (the smallest prime larger than that number) or the largest prime below it.
Next Prime:
Last Prime:
This program uses the Miller–Rabin primality test to quickly tell if a number is prime. It runs quickly because the distance between prime numbers remains small even as the primes become quite large.