Random Number Generator Tips: Fair, Unbiased Draws
To get fair, defensible random numbers, use a cryptographically secure generator, turn on no-duplicates mode for any draw where a pick can only win once, keep your range tight to what you actually mean, and make the process transparent so results can't be called rigged. Most "random" mistakes aren't about luck β they're about wrong settings and hidden bias. Here is how to run draws that hold up to scrutiny.
Prefer secure randomness over Math.random()
Not all randomness is equal. Math.random() is a fast pseudo-random generator whose internal state can be predicted if it leaks, and it was never meant for fairness-critical use. This tool uses crypto.getRandomValues, seeded from your operating system's entropy pool, so results are unpredictable enough for security work β and more than fair enough for raffles, sampling and games. For anything where someone might dispute the outcome, secure randomness is the baseline, not a nicety.
Turn off duplicates for real draws
The single most common mistake is leaving duplicates allowed in a prize draw, so the same entrant can be picked twice for multiple prizes. If each entrant can win only once, untick "Allow duplicates" and each result is unique, like drawing numbered balls without replacement. Remember the ceiling: you can't draw more unique numbers than the range contains β asking for ten winners from a range of eight is impossible, and the tool will tell you.
Watch out for modulo bias β but let the tool handle it
Naive random code often does randomValue % range, which subtly favors the lower numbers in a range β a real bias that skews draws. This generator uses rejection sampling, discarding values that would cause that skew, so every number in your range has exactly equal probability. The tip: don't roll your own modulo math in a spreadsheet for important draws; use a tool that samples without bias.
Set the range to mean exactly what you intend
Both ends are inclusive, so a range of 1 to 100 includes 1 and 100. Off-by-one range errors are a quiet source of "unfair" outcomes β excluding entrant number 1, or double-thinking whether 100 is in play. For a giveaway, number entrants 1 to N and set the range to exactly 1βN. Negative numbers are allowed too, which matters for sampling around zero.
Settings for common jobs
| Job | Range | Count / duplicates |
|---|---|---|
| Single giveaway winner | 1 to N entrants | Count 1 |
| Multiple unique winners | 1 to N entrants | Count k, duplicates OFF |
| Dice roll | Dice preset | One click |
| Coin flip | Coin preset | One click |
| Random sample (with repeats) | Your population | Duplicates ON |
Make draws transparent and repeatable
Fairness people can trust is as much about process as math. Announce the entrant numbering and the exact range before you draw. For live giveaways, share your screen so viewers see the range, count and no-duplicates setting, then click Generate once β don't quietly re-roll until you like the result, which is the fastest way to look rigged. Copy the comma-separated results as a record. Turning on sort makes multi-winner lists easy to read and verify.
Know when to use presets vs a custom range
For quick decisions and games, the one-click dice and coin presets save setup. For anything structured β raffles, sampling, assigning slots β a deliberate custom range with the right duplicate setting is worth the extra few seconds. Matching the tool's mode to the task is most of the battle.
Try the Random Number Generator β free and 100% in your browser.
FAQ
How do I prove a draw was fair?
Fix and announce the numbering and range beforehand, use a secure generator with no-duplicates on for once-only picks, draw once on a shared screen, and keep the copied results. Transparency plus unbiased sampling is what makes it defensible.
Why shouldn't I just use a spreadsheet's random function?
Many spreadsheet and code approaches lean on modulo math that introduces bias toward lower numbers, and on weaker pseudo-random sources. A tool using rejection sampling and crypto.getRandomValues avoids both, so probabilities stay exactly equal.
What happens if I ask for more unique numbers than the range holds?
It's impossible to draw more distinct values than exist in the range, so the tool flags it. Widen the range or lower the count. This only applies when duplicates are turned off.
Are the dice and coin presets truly random?
Yes β they use the same cryptographically secure source as the custom ranges, so a preset roll or flip is just as unbiased as a manual one, with less setup.
Related free tools
- Password Generator β secure credentials from the same strong randomness.
- Random Name Generator β pick a random winner by name.
- UUID Generator β unique identifiers, no collisions.
- Random Color Generator β random picks for design and games.
Built by ByteVancer
ByteTools is a free product of ByteVancer, a software and web development studio building web apps, SaaS and custom software. Need a giveaway platform, sampling tool or custom app built correctly? Explore ByteVancer's services.
Recommended reading
Random Number Generator: Fair Draws & Winner Picks
Generate truly unbiased random numbers online for raffles, giveaways and sampling β with no-repeat mode, sorting and dice or coin presets. Free and private.
Random Number Generator Use Cases: 8 Real Scenarios
Where a random number generator actually helps β giveaways, classroom picks, sampling, games and testing β with concrete range and count examples.
XOR Cipher Use Cases: CTFs, Learning, and Puzzles
Real use cases for the XOR cipher, from CTF challenges and teaching bitwise logic to lightweight obfuscation, with concrete worked examples.
XOR Cipher Tips: Keys, Security, and Common Mistakes
Pro tips and common mistakes for the repeating-key XOR cipher: key length, reuse pitfalls, format choices, and when to switch to real encryption.