The 1–30 range
Thirty is a class register, a hotel floor, a month of April, a thirty-day challenge. It is the size at which a list stops being something you can eyeball and starts needing a draw.
Each number carries 3.33 percent. Nothing in the tool knows that 30 sits at the end of the range, so the last number is drawn exactly as often as the first.
For a calendar day, note that only four months run to thirty. If you want a date that also works in January, 1–31 is the range you want.
- 1 to 30, both included
- 30 whole numbers
- 3.33%, exactly 1 in 30
- 1 to 10 numbers per draw
- None inside a multi-number draw
- Every draw gets a link that replays it
What a 1–30 draw is for
- Picking a day in April, June, September or November
- Drawing a name from a class register of thirty
- Choosing a start day for a thirty-day challenge
- Selecting one of thirty numbered prizes or lots
- Assigning thirty shifts, desks or parking bays
How the randomness works
Every tap calls crypto.getRandomValues, the browser's cryptographic generator, and asks it for one unsigned 32-bit value. That lands somewhere between 0 and 4,294,967,295, and it then has to be folded down to the 30 numbers in this range.
Folding it down with a plain remainder is where most generators go wrong, an error known as modulo bias. 30 does not divide 4,294,967,296 evenly: 16 values are left over at the top, and wrapping them around would make the first 16 numbers in the range fractionally likelier than the rest. This tool throws away any raw value at or above the last exact multiple of 30 and draws a fresh one instead. That is rejection sampling. It fires about 1 in 268,435,456 draws, and it is the difference between 3.33% exactly and 3.33% approximately.
Ask for more than one number and the tool keeps drawing until it holds that many distinct values, then sorts them ascending. Nothing is seeded, nothing is sent anywhere, and each draw is independent of the one before it. The roll history under the tool lives in your browser's local storage, where the clear button empties it. The daily lucky numbers elsewhere on this site work the opposite way on purpose: they use a seeded generator so the same date always returns the same set. How random is random sets the two side by side.
Thirty is a forgiving number to split: halves, thirds, fifths, sixths and tenths all come out whole, so a 1–30 draw maps onto teams and rotas with nothing left over. It is less forgiving as a date. Real calendars run 28 to 31 days, and a generator pinned at 30 quietly deletes the 31st from seven months of the year, which matters if you are sampling dates rather than picking off a list.
- crypto.getRandomValues, the browser's cryptographic generator
- One unsigned 32-bit value, sometimes more
- Rejection sampling onto 30 slots
- 16 of 4,294,967,296 raw values, redrawn
- No. These tools are never seeded
- Your browser. No server ever sees a draw
1–30 — frequently asked
Use 1–31 for a month that has 31 days, 1–30 for April, June, September and November, and 1–28 if the answer has to be valid in February. A single fixed range across all twelve months will skew your dates.
Yes, provided you number the register once and keep that numbering. The draw is flat across all thirty; the unfairness people worry about creeps in when the list is renumbered between draws.
Raise the count to 10 and the results come back sorted and distinct, which is enough for a top-ten or a set of group leaders in one pass.