Random Number Generator
Random Number Generator
Set a start number, an end number, and how many to draw. A slot appears for each one, and they roll and lock in one at a time. Repeats are off by default and can be switched on.
Draw board
6 numbers will be drawn.
Purpose
Draw numbers from a range, one slot at a time, with or without repeats.
How to use
- Enter the start and end number.
- Set how many numbers to draw, and switch on repeats if the same number may come up twice.
- Run the draw and watch each slot roll and lock in turn.
- View the result in draw order or smallest first, then copy or save it.
The hidden bias in narrowing a range
Cutting a random value down to a range with the remainder operator introduces a subtle bias. Take a value from 0 to 255 and use the remainder after dividing by ten, and because 256 leaves 6 over, the values 0 through 5 come up about four percent more often than 6 through 9.
This picker uses rejection sampling instead: values in the leftover region are discarded and drawn again. However you set the range, every number ends up with exactly equal odds, and no region gains an advantage over thousands of draws.
Allowing duplicates or not
Whether the same number can appear twice depends on what you are doing. A lottery-style draw needs distinct numbers, so duplicates must be blocked. Repeated dice rolls are independent events, so duplicates are the natural behaviour there.
When duplicates are blocked, the count cannot exceed the size of the range. Drawing twelve distinct numbers from one to ten is impossible, so either lower the count or widen the range.
When this beats rolling dice
Rolling two dice to choose among seven options pushes results towards the middle, so middle options come up far more often. Rolling one six-sided die for five options and treating a six as option five doubles that option's odds.
Choosing options needs a flat distribution. A picker with an explicit range is far more accurate for this. Seven options simply means setting the range to one through seven.
Sorted output or draw order
When drawing several numbers, sorting them makes them easier to check, while keeping draw order lets you use the sequence as a ranking. For assigning prize tiers, draw order is the ranking, so leaving it unsorted is usually better.
Results can be copied or saved as an image. If you need a record of a draw, the image is convenient because it captures both the range settings and the outcome.
Negative and very large ranges
Start and end values are both free, so negative ranges and very large ones work directly. A range that crosses zero, such as a temperature simulation, needs no extra arithmetic.
With a very wide range, repeats effectively stop happening. With a narrow one, repeats appear frequently. That is not a fault; it is simply what the probabilities say.
Examples
- Pick seat numbers
- Draw raffle numbers
- Choose question numbers
- Create a quick random sample
Notes
- Ranges can hold up to 1,000,000 numbers, and up to 50 can be drawn at once.
- Without repeats the count cannot exceed the range size; switch on repeats if you need more.
- Use a separate audit process for official draws.
FAQ
Can the same number come up twice?
Not by default. Switch on Allow repeats and every slot draws independently, like rolling a die again, so repeats become possible.
Can I sort the result?
Yes. Once the draw finishes you can switch between draw order and smallest first. Draw order suits ranking; sorted suits checking numbers.