Skip to main content

Random Number Generator – Range & Dice

Quick answer

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

x = min + ⌊r × (max − min + 1)⌋, r uniform in [0,1)

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. 1

    Set the range

    Minimum and maximum, inclusive — e.g. 1 and 6 for dice

  2. 2

    Choose the count

    Generate one value or batches like 600 rolls

  3. 3

    Optionally seed

    Same seed → same sequence, ideal for testing

  4. 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?

1/6 ≈ 16.67% per roll, uniformly across 1–6.

How do I reproduce the same numbers?

Set a seed; identical seed and range regenerate the identical sequence.

Are the outputs really uniform?

Yes — the floor mapping gives each integer probability exactly 1/span; over 600 die rolls each face lands near 100.

Can I generate a range like 10–99?

Yes: span = 99−10+1 = 90, each value 1/90 chance.

Do previous results affect the next one?

No. Each draw is independent — five sixes in a row still leaves the next roll at 1/6.