Last updated ·Published ·By the WiserWork team
Random Number Generator
Generate random numbers, dice rolls & lottery picks instantly
Draw a number between any two values you set, roll a D2 through D100, or flip a coin, with the last fifty results kept on screen for reference.
What is the Random Number Generator?
Type a minimum and a maximum, press Generate, and the tool returns one value drawn uniformly from that span using the browser's built-in Math.random. Whole-number draws include both endpoints, and if the two fields are entered backwards they are swapped for you before the draw. Ticking 'Include decimal numbers' switches to a continuous draw rounded to four decimal places instead.
Key Features
- Minimum and maximum fields accept negatives and are swapped if reversed
- Decimal mode returns a continuous value rounded to four decimal places
- Unique-only mode rejects any number already sitting in the visible history
- Eight dice presets from D2 to D100, plus a coin flip button
- History keeps the last fifty results; click any chip to copy
Common Use Cases
- Rolling a D20 for a tabletop session when the dice are missing
- Picking which numbered student or ticket goes next in a classroom draw
- Filling a spreadsheet column with sample figures inside a known range
- Generating a four-decimal test value for a measurement or pricing mockup
How to Use the Random Number Generator
- Set Minimum and Maximum in the Settings card; the order does not matter.
- Tick 'Include decimal numbers' if you want fractions to four places rather than whole numbers.
- Tick 'Unique numbers only' when drawing a series where repeats would spoil the result.
- Press Generate Random Number, or tap a dice preset to overwrite the range and roll at once.
- Click any chip in the History strip to copy that result to your clipboard.
Tips for Best Results
- Zero is read as an empty field, so a 0-to-9 draw means rolling 1-10 and subtracting one.
- Unique mode only checks the fifty stored results, so wider ranges can still repeat eventually.
- The unique setting is ignored in decimal mode, where an exact repeat is vanishingly unlikely anyway.
- History lives in memory only; refreshing the page wipes it, so copy anything you need first.
Why Use WiserWork's Random Number Generator?
Every draw here comes from Math.random, the browser's general-purpose pseudorandom generator. That is uniform enough for games, sampling and test data, but its internal state can be inferred from enough observed output, so it is the wrong tool for prize draws with money attached, gambling, or anything security-related. For those you want a cryptographic source such as crypto.getRandomValues, or a physically audited draw.
Who Uses the Random Number Generator?
Tabletop players and game masters who need a D20 mid-session, teachers running a cold-call or raffle order, and QA engineers who want throwaway figures inside a fixed range. Statistics students also use it to hand-build small samples and watch how quickly a uniform spread appears.
Frequently Asked Questions
Is this random number generator cryptographically secure?
No. It calls Math.random, which is a fast pseudorandom generator rather than a cryptographic one. Use crypto.getRandomValues or a hardware source whenever an attacker would gain something from predicting the output.
Are the minimum and maximum included in the result?
In whole-number mode yes, both ends are possible. Decimal mode can return the minimum but effectively never the exact maximum, because the underlying draw stops just short of one.
What happens if I put the larger number in the Minimum box?
The tool sorts the two values before drawing, so 100 to 1 behaves exactly like 1 to 100. The label under the result always shows the corrected order.
Can I generate a number starting from zero?
Not directly. A zero in the Minimum field is treated as blank and falls back to 1. Draw one value higher than you need and subtract one from the answer to get a true zero-based range.
How does 'Unique numbers only' work?
It redraws whenever the candidate already appears in the on-screen history. Once every value in the range has been used, a browser alert appears and the history is cleared so drawing can continue.
Does unique mode apply to decimals?
No. The checkbox is only consulted in whole-number mode. Decimal draws run to four places, where landing on the same value twice is already improbable.
How many results does the history keep?
Fifty. New results push in at the front and the fifty-first drops off the end, which also means the no-repeat check cannot see anything older than that.
Can I use it to pick lottery numbers?
You can build a line one number at a time with unique mode on, but there is no ticket layout and no bulk draw. Your odds do not change whichever numbers you end up with.
Is the distribution actually even?
Yes for practical purposes. The whole-number path multiplies the random fraction by the size of the range and floors it, which gives every value the same chance without introducing modulo bias.
Do the numbers I generate leave my device?
No. The whole thing is a small script inside the page. Nothing is posted anywhere, and the history is a variable in memory that disappears when you close the tab.
Set a range, press the button, and you have an even draw from it, plus dice presets and a coin flip when the range you want is a standard one. Just keep it out of anything where money or security rides on the outcome.