Random Integer Picker
Pick one random whole number between any two numbers: a raffle ticket, a page, a question, a seat or a dice roll. Raffle mode stops a number being drawn twice, you can leave out unsold tickets, and every pick is logged with its time and odds.
Each remaining number has exactly the same chance
Worked Example: Three Prizes From 500 Tickets
A school fair sold ticket books numbered 1001 to 1500, and there are three prizes. The organiser wants to draw them live on a projector.
Step 1: Set the range
Step 2: Turn on raffle mode
Step 3: Draw three times and copy the record
Buying more tickets raises your chance roughly in proportion. With three prizes from 500 tickets:
| Tickets held | Chance of at least one prize |
|---|---|
| 1 | 0.60% (3 in 500) |
| 5 | 2.98% |
| 10 | 5.89% |
| 25 | 14.29% |
Does It Matter Which Prize Is Drawn First?
No. Before the draw starts, every ticket has exactly the same 1-in-500 chance of being the first number, the second number or the third, whichever prize each draw is for. The chance on the screen rises from 1 in 500 to 1 in 498 only because two tickets are already out; across all tickets the odds for each prize are equal.
So drawing the star prize last is purely for suspense. What does change the odds is a rule that winners go back in (raffle mode off): then one ticket can win twice, and everyone else's chance of winning anything drops slightly. Decide which rule applies before the first draw, and say so.
Leaving Out Unsold Tickets and Absent Names
Ticket books rarely sell out. If books 1101–1150 and 1351–1400 were never sold, a draw from 1001 to 1500 could land on a ticket nobody holds. Type 1101-1150, 1351-1400 into Leave out and the draw shrinks to the 400 tickets that were sold. Every remaining ticket keeps an equal chance.
The same works for a class register (leave out absent students' numbers), a question bank (leave out questions already covered), or a seating plan with broken seats. If the gaps are large and irregular, it can be simpler to renumber the real entries 1 to N and draw from that instead.
Running a Draw People Trust
A random draw is only as convincing as the way it's run. A few habits avoid arguments afterwards:
| Habit | Why it helps |
|---|---|
| Announce the range and rules first | Including whether winners can win again and what happens if a winner isn't present |
| Draw where people can see | Share your screen or project the page; record a video if the draw is remote |
| Never redraw because you dislike the result | Redraw only under a rule announced in advance |
| Keep the draw record | Copy the list of numbers, times and odds, and post it with the results |
Raffles are a form of lottery and are regulated in many places. In Great Britain, for example, they fall under the Gambling Act 2005, with exemptions for small raffles held at an event. Check the rules where you are before selling tickets.
Everyday Picks and Their Odds
| To pick | Range | Chance of each number |
|---|---|---|
| A number to guess | 1 to 10 | 10% |
| A dice roll for a tabletop game | 1 to 20 | 5% |
| A question from a 50-question bank | 1 to 50 | 2% |
| A random page to read or test from | 1 to 320 | 0.31% |
| A raffle winner | 1001 to 1500 | 0.2% per draw |
To pick from a list of names, number them first and draw a number. For several numbers at once, such as a set of lottery numbers or a full shuffle, the random integer list generator is faster.
The Same Number Twice in a Row
With raffle mode off, every pick is a fresh draw that knows nothing about the last one. Picking 1 to 10, the next number matches the previous one 10% of the time, and in five picks there's a 70% chance that at least two match. That isn't the picker going wrong; it's what fair randomness looks like.
The opposite mistake is just as common: assuming a number that hasn't come up for a while is "due". It isn't. Each pick gives every number the same chance, regardless of history. If you need every number to come up before any repeats, turn raffle mode on and keep picking until the range is used up.
Frequently asked questions
Can I pick several winners?
Yes. Turn on raffle mode and press Pick again for each prize. Each winner is removed from the draw, and the record lists them in order with the time of each draw.
Is the picker really random?
It uses your browser’s cryptographically secure generator, crypto.getRandomValues(), and chooses so that no number is favoured. Nothing is decided in advance or sent to a server.
Does the page remember my picks?
Only until you change the range, the left-out numbers or the mode, press Start over, or reload the page. Copy the draw record to keep it.
Can I use negative numbers?
Yes. Any whole numbers work, including negatives and zero, for example −10 to 10 for a random temperature change in a maths question.
Sources
- MDN: Crypto.getRandomValues(): the secure random source behind each pick.
- NIST/SEMATECH e-Handbook: Uniform Distribution: every value in the range equally likely.
- Gambling Act 2005, Schedule 11: Exempt lotteries: the rules for small and incidental raffles in Great Britain.
Related Tools
Create GUIDs for Microsoft and .NET fields.
Generate binary numbers with a chosen bit length.
Create a random pixel image and save it as a PNG.
Generate bytes in hex, Base64, or decimal format.
Pick a date between your chosen start and end dates.
Generate decimals with a chosen range and precision.