Tool guide
How to use the Random Number Generator
This generator selects whole numbers from an inclusive minimum-to-maximum range, which means both endpoints can be drawn. When the browser supports the Web Crypto API, it fills a 32-bit unsigned integer with a cryptographically strong browser-generated value and uses rejection sampling before mapping that value into the requested range. Rejecting the uneven remainder avoids the modulo bias created when the 4,294,967,296 possible unsigned values do not divide evenly by the size of the chosen range.
People also use this tool for
People also use this random number generator for classroom activities, board games, raffle preparation, sampling, practice problems, team orders, dice-style choices, test data, creative prompts, giveaways, and quick decisions that need one or many whole numbers from a clearly defined range.
What this tool is useful for
- Draw one or many whole numbers for games, classroom activities, samples, practice data, orders, giveaways, or everyday decisions.
- Choose whether repetitions are allowed inside the current batch and receive a clear warning when the requested unique quantity exceeds the range.
- Generate across positive, zero, or negative integer ranges, preserve draw order or sort the final results, and see the range size and probability summary.
Practical example
For a range from 1 through 10, there are ten possible whole numbers and any specified number has a 1-in-10 chance on one independent draw. If you request three unique numbers, a specified number has a 3-in-10 chance of appearing somewhere in that no-duplicate batch, although its position remains random. Sorting changes only how the completed results are displayed; it does not change which numbers were selected.
Helpful tips
- Minimum and maximum are inclusive, so a range from 1 to 100 contains exactly 100 possible whole numbers.
- No-duplicate mode applies only within the current batch; generating again starts a new batch and can repeat earlier results.
- Sorted output hides the original draw order but does not reroll or alter the selected values.
- Random does not mean evenly distributed in every small sample. Short streaks, clusters, and repeated values are normal when duplicates are allowed.
- Do not use a general-purpose webpage as the sole selection system for regulated gambling, legal drawings, security keys, or any process that requires an independently audited random-number system.
Related tools and next steps
Random Name Picker, Decision Wheel, Random Team Generator, Custom Random Generator, Random Generators
Common questions this tool can help answer
Common random number questions this generator can help answer
- How can I generate a random whole number between two limits?
- Are the minimum and maximum both included?
- How can I generate several numbers without duplicates?
- What is the probability of drawing a specific number?
- Can I use negative numbers or sort the results?
- Does the generator use browser cryptography?
Sources and methodology
The formulas, standards, and reference information on this page are checked against the authoritative sources below. External references open the original source.
- W3C Web Cryptography Level 2 specification
- MDN: Crypto.getRandomValues()
- NIST Random Bit Generation project
Frequently asked questions
Are the minimum and maximum included?
Yes. The generator uses an inclusive integer range, so entering 1 and 100 allows both 1 and 100 to be selected and creates 100 possible values.
Can I generate negative numbers?
Yes. Both limits may be negative, or the range may cross zero, provided each limit is a safe whole number and the complete range contains no more than 4,294,967,296 values.
How does no-duplicate mode work?
The generator keeps each selected value in a set and redraws whenever the same value appears again, continuing until the requested number of distinct results is reached. It stops with a clear message if the requested quantity is larger than the range.
Can numbers repeat when duplicates are allowed?
Yes. Every draw is independent in repeat-allowed mode, so the same value can appear several times. A repetition is not evidence that the generator is broken.
Does sorting affect randomness?
No. Selection happens first. The optional sorting step only rearranges the completed output from smallest to largest, although it means the displayed list no longer shows draw order.
What is rejection sampling and why is it used?
A 32-bit random source has 4,294,967,296 possible values, and many range sizes do not divide that total evenly. Rejection sampling discards the small uneven remainder before using the modulo operation, preventing some outputs from receiving an extra source value.
What random source does the tool use?
It uses window.crypto.getRandomValues when the browser provides it and reports the source in the result. If that API is unavailable, it identifies that a browser pseudorandom fallback was used instead.
Is this suitable for lotteries, gambling, or legal drawings?
It is designed for ordinary games, samples, classroom tasks, and everyday decisions. Regulated or high-stakes selections may require certified equipment, published rules, supervision, audit records, jurisdiction-specific compliance, or an independently verified drawing service.
Why do random results sometimes look patterned?
Randomness does not guarantee a perfectly even spread in a small sample. Runs, clusters, adjacent numbers, and repeats are possible outcomes, particularly when repetitions are allowed.
Does the tool save my generated numbers?
The calculation runs in the browser and the tool does not require an account. Use the copy or download action if you need to retain a result before leaving or generating a new batch.
https://wowwebtools.com/random-generators/random-number-generator
