Random Number Generator – Range & Dice
Generate random integers in any range with optional seeds: dice 1–6, lottery 1–49, or custom spans like 10–99.
- Uniform, reproducible output.
Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.
How the Random Number Generator Works
The generator maps a uniform fraction r ∈ [0,1) onto your integer range using min + ⌊r × span⌋, so every value from min to max is equally likely. Rolling a die is the range 1–6 (span 6): each face has probability exactly 1/6 ≈ 16.67%, and across 600 rolls you should see roughly 100 of each — the tool can batch-generate that sample. A lottery-style 1–49 draw, a 0–100 percentage, or a custom 10–99 span all use the same mapping with the span adjusted. Entering an optional seed makes the sequence reproducible — the same seed regenerates the same numbers, which is how experiments and unit tests stay repeatable. Without a seed, system entropy drives each fresh run. The tool reports the theoretical probability 1/span per value and flags the common bias trap of using modulo on raw floats instead of the floor mapping.
- 1
Set the range
Minimum and maximum, inclusive — e.g. 1 and 6 for dice
- 2
Choose the count
Generate one value or batches like 600 rolls
- 3
Optionally seed
Same seed → same sequence, ideal for testing
- 4
Read the output
Values, plus the uniform probability 1/span per number
Use Cases
Games & Raffles
Fair die rolls and door-prize draws with verifiable uniformity
Sampling
Pick random record IDs from a 1–1000 range for audits
Teaching Probability
Watch 600 rolls approach 100 per face
Tips
- 1
Uniform output: each of the span values carries probability 1/span
- 2
Seeds make randomness reproducible on demand
- 3
Inclusive ranges need the +1 in the span: 1–6 spans 6 values
Common Mistakes
Forgetting the +1 so a 1–6 request only ever returns 1–5
Expecting short runs to look even — 10 rolls can easily show one face 4 times
Reusing one seed when independent sequences are required
Assuming lottery memory: past draws never change the 1-in-13,983,816 odds
FAQs
What is the chance of any single die face?
How do I reproduce the same numbers?
Are the outputs really uniform?
Can I generate a range like 10–99?
Do previous results affect the next one?
Related tools
Pick another tool to continue your calculation.
Catalan Number Calculator – C(n) Counts
Calculate the nth Catalan number.
Mixed Number to Decimal Converter
Convert mixed numbers to decimals and vice versa.
Armstrong Number Checker – Narcissistic Test
Check if a number is an Armstrong number.
Perfect Number Checker – Divisor Sums
Check if a number is perfect and list its divisors.
Bernoulli Number Calculator – B Sequence
Calculate Bernoulli numbers for a given order.
Partition Number Calculator – p(n)
Calculate the number of ways to partition an integer.