Society lucky draw: 5 winners from ticket numbers 1-200
Set min=1, max=200, count=5, unique=on. Generated: e.g. [42, 187, 9, 156, 73]. Each ticket has exactly equal probability (1/200) of being selected; once picked, removed from the pool.
Generate random numbers within any range, with support for multiple results and unique-only mode. Useful for raffles, classroom picks, dice-style games, sampling, giveaways and quick random decisions.
Result
Ein Teil der Inhalte wird noch auf Englisch angezeigt.
Random number generation might sound trivial, but the difference between 'looks random' and 'truly random' matters enormously. Most programming languages' default random() functions are pseudo-random - they look random but follow a predictable mathematical sequence given the same starting seed. This is fine for video game effects but inadequate for raffles, draws, audits, scientific sampling, password generation, or any situation where predictability would compromise fairness or security. This tool uses crypto.getRandomValues - the same cryptographically-strong API used for TLS session keys - so each number is genuinely unpredictable.
Common uses include classroom student-of-the-day picks, society raffle draws, dice and board game replacements, A/B test bucket assignment, statistical sampling for surveys, password generation, and quick 'decide for me' moments. The unique-only mode is particularly useful for raffles where you can't draw the same number twice - say 10 winners from ticket numbers 1-500. The tool also handles negative ranges and very large numbers (within JavaScript safe integer range) for specialised use cases.
Enter the minimum and maximum values.
Choose how many numbers to generate.
Turn on unique-only mode if repeats should not be allowed.
Click Generate to produce a fresh random list.
Copy the output if you need to paste it elsewhere.
The generator uses the browser's cryptographic random API when available. Each value is uniformly selected from the inclusive range [min, max]. In unique-only mode, generated values are stored in a set until the requested count is reached or the range is exhausted.
random integer = min + randomIndex(0...max−min)
The generator uses window.crypto.getRandomValues() which fills a Uint32Array with cryptographically-strong random bytes from the operating system's entropy source. To map these to your range [min, max] without modulo bias, the algorithm uses rejection sampling: discard any value outside the largest multiple of (max−min+1) that fits in a Uint32, then take modulo. This ensures every integer in the range has exactly equal probability.
Pseudo-random vs cryptographic random: Math.random() uses a Mersenne Twister-like algorithm that's deterministic given its internal state. Knowing a few outputs in sequence lets an attacker predict the next. crypto.getRandomValues() pulls from the OS entropy pool (mouse movements, keystrokes, hardware noise) and is genuinely unpredictable. For raffles, draws, and any 'fair' randomness, always use cryptographic randomness.
Unique mode uses a Set to track already-generated values; if a duplicate is drawn, it's discarded and another is drawn. For small ranges with many requested unique values, this can be slow - when count > 50% of range, the algorithm switches to a Fisher-Yates shuffle of the full range, then takes the first N. Both produce uniformly random selections; the swap is just for efficiency.
Set min=1, max=200, count=5, unique=on. Generated: e.g. [42, 187, 9, 156, 73]. Each ticket has exactly equal probability (1/200) of being selected; once picked, removed from the pool.
Set min=1, max=6, count=3, unique=off (dice can repeat). Generated: e.g. [3, 5, 5]. Each face has 1/6 probability per roll, independent.
Set min=1, max=45, count=1. Teacher uses for daily 'student of the day' picks or fair seating rotation.
Yes. If you choose 1 to 6, both 1 and 6 can appear.
Yes. Enable unique-only mode. The count cannot exceed the number of values in the range.
Yes for simple raffles and classroom draws. For legally regulated lotteries, use audited software and follow local rules.
It uses crypto.getRandomValues where available, which is stronger than Math.random.
Yes. Enter a negative minimum or maximum.
Date math, password generation, QR codes, IP subnets, base64 encoding, dew point, dice rolls, age calculations - none of these are 'big' problems individually, but they are the small frictions that interrupt your day. This tool runs entirely in your browser, has no popup, no chat widget and no tracking inside the calculation, so you can finish the task and move on.
Many tools in the Daily Utilities category complement each other - date difference + day counter + day-of-the-week, or password generator + QR code + base64 encoder. The related-tool grid links them together so you can move between adjacent problems in a click.
The Random Number Generator is part of the Daily Utilities suite on Online Calculator Tools, alongside 6 related calculators. All tools share the same UI patterns, the same privacy-first rendering (nothing is sent to a server), and the same commitment to showing the formula and assumptions behind every result.