Random Number Generator
Generate random whole or decimal numbers within a range, with a seed you can reuse.
Last updated · View algorithm, constants and default inputs (JSON)
About this calculator
A random number generator is only trustworthy if you can verify it, which is why this one is seeded: the same seed and range always produce the same numbers. Change the seed to get a fresh set without losing the ability to reproduce an earlier one. Seeded pseudo-random results are repeatable for the same inputs, but the generator is not cryptographically secure or suitable for audited contests, security, or high-stakes drawings.
Worked example
calculated with the default values below
Lowest number 1 · Highest number 100 · How many numbers 5 · Unique numbers only Allow repeats · Seed 12,345 · Decimal places (0 = whole numbers) 0 Your numbers 98, 31, 49, 82, 51 · Sum 311 · Average 62.20 · Range size 100 · Lowest generated 31 · Highest generated 98
Disclaimer
These calculators give general estimates for information and entertainment. Platform algorithms, metrics and definitions change without notice, and none of these results are official figures from the platforms named.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
a_{i+1} = (a_i + 0x6D2B79F5) mod 2³²; u_i = (t_i ⊕ (t_i ≫ 14) mod 2³²) ÷ 2³²; x_i = lo + ⌊u_i×(hi−lo+1)⌋
- a_i
- PRNG state, a₀ = seed
- u_i
- Uniform draw in [0,1)
- lo
- Lower bound
- hi
- Upper bound
- x_i
- Generated integer
- t_i
- Intermediate 32-bit word
- i
- Draw index
Uses a seeded pseudo-random generator for reproducible numbers; it is not cryptographically secure. Unique mode rejects requests when the discrete value pool is smaller than the requested count. Decimal values are rounded to the selected precision.
Frequently asked questions
What happens if I request more unique numbers than the range contains?
The calculator shows an input error instead of quietly returning duplicates. Increase the range or choose fewer numbers.
Is this suitable for a fair or high-stakes drawing?
No. It is a deterministic seeded pseudo-random generator, useful for repeatable examples. It is not cryptographically secure or independently auditable, so do not use it for security or consequential prize drawings.