Random Number Generator
Generate random numbers, roll dice, or flip coins
Methodology & standardsRuns in your browser
Inputs
Results update liveInterpretation
How Random Number Generation works
The Random Number Generator uses JavaScript's Math.random() to produce pseudo-random numbers within your specified range. It also includes dice roller and coin flip modes for common randomization needs.
Example
Key features
A realistic scenario showing how the calculation guides a practical decision.
Formula
Random integer in [min, max]: Math.floor(Math.random() * (max - min + 1)) + min
- Generate random numbers in any range
- Generate multiple numbers at once (up to 1000)
- Option to allow or prevent duplicates
- Sort results ascending
- Dice roller with d4, d6, d8, d10, d12, d20
- Coin flip with heads/tails tally
Watch out
Common mistakes
- When duplicates are disabled, the maximum count of numbers is limited to the range size. For cryptographic purposes, use window.crypto.getRandomValues() instead of Math.random().