Everyday Math

Random Number Generator

Generate random numbers, lists, dice rolls, coin flips, and random items from a custom list. Cryptographically random.

True Randomness vs. Pseudo-Randomness

This generator uses the Web Crypto API (crypto.getRandomValues()) — a cryptographically secure pseudo-random number generator (CSPRNG). This is the same technology used in password generation and cryptographic applications, producing numbers that are statistically indistinguishable from true randomness for all practical purposes.

Standard random functions in most programming languages (like Math.random()) use a much simpler pseudo-random algorithm that produces predictable sequences — unsuitable for security or fair sampling. CSPRNGs solve this by using entropy from hardware sources.

Common Uses for Random Number Generators

  • Games and contests: Selecting winners, rolling dice, randomising game elements
  • Statistics and research: Random sampling from a population
  • Decision making: Breaking ties, random assignment of tasks or shifts
  • Education: Creating random test questions or exam seating arrangements
  • Coding and testing: Generating test data
  • Passwords: Generating secure random PIN numbers (not full passwords — use a dedicated password generator for that)

Dice Probability Reference

  • D6 (standard die): Each face has 1/6 (≈16.7%) probability
  • D20 (RPG die): Each number has 5% probability — critical hit (20) is 5% chance
  • Two D6 sum: Most likely sum is 7 (6/36 = 16.7%), least likely are 2 and 12 (1/36 = 2.8% each)

Frequently Asked Questions

Is this random number generator truly random?
It uses the Web Crypto API (crypto.getRandomValues()), which is a cryptographically secure pseudo-random number generator (CSPRNG). While technically pseudo-random (generated by an algorithm), it is seeded with hardware entropy and is indistinguishable from true randomness for all practical purposes.
How do I generate a random number between 1 and 10?
Set Min to 1, Max to 10, and click Generate. The result will be a whole number between 1 and 10 inclusive.
Can I generate random numbers without duplicates?
Yes — in the Multiple tab, check the "No duplicates (unique)" option before generating. This ensures each number in your list appears only once.
How do I pick a random winner from a list?
Use the "From List" tab. Enter each participant's name on a separate line, set "How many to pick?" to 1 (or more for multiple winners), and click Pick Random.
What are the odds of rolling a specific number on a D20?
Each face on a D20 (20-sided die) has a 1/20 = 5% probability. Rolling a natural 20 (critical hit in D&D) happens 5% of the time, or roughly once every 20 rolls.