Explanation
How Random Number Generator works
The random number generator produces integers from a freely selectable range. You decide whether numbers may occur more than once (drawing with/without replacement) and how the output is sorted.
The bounds are ordered internally and narrowed to the integers they contain. Equal integer bounds always yield the same single possible value. Negative ranges are also supported. Without duplicates, an impossible count is visibly limited to the size of the range.
The separator determines how the numbers are separated when copied — handy for import into Excel, CSV files or other programs.
Common mistakes
- Using pseudo-randomness for cryptography: Math.random is predictable and not suitable for security purposes. For passwords, tokens or cryptographic keys use crypto.getRandomValues().
- Reading a single output as a quality test: Small sequences prove neither uniform distribution nor its absence; this tool performs no statistical quality test.
- Understanding decimal bounds as decimal output: The generator outputs integers only and rounds the lower bound up and the upper bound down.
- Expecting reproducibility: Without a seed value the results differ on every call. For reproducible experiments use a documented seed generator.
Limits of this tool
- Uses Math.random — no substitute for cryptographically secure randomness in security applications.
- Integer values only — no floating-point numbers or normal distributions.
- No seed value can be set — results are not reproducible.
- At most 500 numbers per run — use dedicated tools for larger data sets.
Sources
- NIST SP 800-90A: Recommendation for Random Number Generation Using Deterministic Random Bit Generators (DRBG). Standard for cryptographic random number generators.
- ECMAScript Specification: Math.random() — returns pseudo-random numbers with approximately uniform distribution in the range [0, 1).