GenerateRandomSearch

Random Prime Number Generator

Generates a random prime number within a range you set (up to 1,000,000). Every prime in range has an equal chance of being picked.

What this generator does

Picks a prime number at random from within a range you set. A prime has exactly two distinct divisors, itself and one, which is why the results thin out as the numbers get larger.

How to use this tool

  1. Set a minimum and maximum.
  2. Press generate for a random prime in that range.
  3. Generate again for a different prime.

Worked examples

Examples
2, 3, 5, 7, 11, 13, 17, 19, 23, 29 — the primes below 30

Common use cases

  • Maths teaching and homework examples
  • Picking a prime for a coding exercise
  • Cryptography/number-theory demonstrations

Limitations and good to know

  • Primes are not evenly spaced, so a wide range does not produce evenly spread results. The tool draws uniformly from the primes it finds, not from the number line.