The 1–31 range
One to thirty-one is the full span of a calendar month, so this is the range people reach for when they want a date rather than a number.
One thing to check before using it that way: real dates are not uniform. The 31st exists in only seven months, the 29th of February in three years out of four, and human birthdays bunch up in late summer while thinning out around Christmas.
The draw here is flat. Every day from 1 to 31 gets the same 3.23 percent, which is exactly what you want for a lottery-style pick and exactly what you do not want for a simulated birthday.
- 1 to 31, both included
- 31 whole numbers
- 3.23%, exactly 1 in 31
- 1 to 10 numbers per draw
- None inside a multi-number draw
- Every draw gets a link that replays it
What a 1–31 draw is for
- Choosing a day of the month for a recurring task
- Drawing a date for a monthly prize or a spot check
- Picking a start day for a habit streak
- Filling a random day into placeholder or test data
- Drawing a lottery number capped at 31, the birthday band
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 31 numbers in this range.
Folding it down with a plain remainder is where most generators go wrong, an error known as modulo bias. 31 does not divide 4,294,967,296 evenly: 4 values are left over at the top, and wrapping them around would make the first 4 numbers in the range fractionally likelier than the rest. This tool throws away any raw value at or above the last exact multiple of 31 and draws a fresh one instead. That is rejection sampling. It fires about 1 in 1,073,741,824 draws, and it is the difference between 3.23% exactly and 3.23% 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.
The 1–31 band is the most over-played stretch in every lottery on earth, because millions of players fill their slips with birthdays. That changes nobody's odds of winning. It does change the payout: a winning line drawn entirely from 1–31 is far likelier to be shared several ways. If you are picking lottery numbers rather than dates, the full-pool lotto draw is the one that steps around the crowd.
- crypto.getRandomValues, the browser's cryptographic generator
- One unsigned 32-bit value, sometimes more
- Rejection sampling onto 31 slots
- 4 of 4,294,967,296 raw values, redrawn
- No. These tools are never seeded
- Your browser. No server ever sees a draw
1–31 — frequently asked
Tap Generate and read the number as a day. If the answer has to be a real date in a specific month, check it exists: a 31 is meaningless in April, and February tops out at 28 or 29.
No. Late summer runs heavy in most of the northern hemisphere, the 13th is measurably avoided in countries where scheduled deliveries are common, and the 31st is scarce for the simple reason that five months do not have one. A flat 1–31 draw reproduces none of that.
Only if you want company. Birthday lines cluster in that band, so a win on one is split among far more people than a win on a line that uses the whole pool. The odds of winning are identical either way; the expected payout is not.