Tools/🧮 Calculators/Prime Number Tools

Prime Number Tools

Test primality, find prime factors, list primes in a range, and calculate neighboring prime numbers.

Version 1.0 · Last Updated: August 11, 2026 · Maintained by ToolLarder

Prime Operation

Zero, one, and negative numbers are not prime. Absolute value may not exceed 1000000000000.

Result
Enter values and calculate a prime operation.

Prime number testing and prime factor tools

Test one number, factor it into primes, or list primes in a selected interval with a segmented sieve. Neighbor tools find the next, previous, or equally close prime numbers.

Prime number test

Test possible divisors through the square root to determine whether an integer is divisible only by 1 and itself.

2 ≤ d ≤ √n

Prime factorization calculator

Divide by the smallest prime factors and count the exponent of each factor.

n = p₁ᵃ¹ × p₂ᵃ² × …

Prime numbers in a range

List all primes including the interval endpoints efficiently with a segmented sieve.

prime ∈ [start, end]

Next prime number

Find the first prime strictly greater than the entered number.

min(p > n)

Previous prime number

Find the greatest prime strictly less than the entered number.

max(p < n)

Nearest prime number

Compare lower and upper prime distances and return both primes when the distances are equal.

min |p−n|

Prime Number Frequently Asked Questions