All calculators
MathsLive
Random Number Generator
Range
Fill in the fields above to see your result instantly.
How it works
We use crypto.getRandomValues() when your browser supports it (most modern browsers), otherwise fall back to Math.random(). Each integer is uniformly distributed across your chosen range.
Worked example
Min 1, Max 6, Count 1, Unique off → simulates a single dice roll. Min 1, Max 49, Count 6, Unique on → a Lottery line.
Who should use this
- •Picking a winner from a list
- •Choosing test data
- •Random sampling for surveys
Common mistakes
- ×Confusing 'unique' with 'sorted' — uniqueness doesn't change order
- ×Setting count higher than the range allows when unique is on
Frequently asked questions
Are the numbers truly random?▾
Browser crypto-random is suitable for most uses. For cryptographic security, use server-side hardware-backed randomness.