Fairylands

logo
Back

Next/Previous Prime Calculator

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:

Comment

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.