How it works
Generate random numbers within a specified range.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
5-
?min=MinNumber · Optional · Default: 1
-
?max=MaxNumber · Optional · Default: 100
-
?count=QuantityNumber · Optional · Default: 1
-
?allowDuplicates=Allow DuplicatesTrue or false · Optional · Default: true
-
?seed=SeedText · Required · Default: askcalculators
Outputs
1-
resultResultText · Primary output
result contains the calculator’s complete rendered result area, including its visible result cards, tables, charts, and messages.
Generate random values within a custom range
Description
The Random Number Generator (RNG) is a utility for generating unbiased, random integers. Whether you’re picking lottery numbers, conducting a scientific sample, or settling a dispute, this tool provides quick results with customizable constraints. It features a “No Duplicates” mode to ensure every number in a multi-number result is unique.
Inputs
- Min: The lowest possible number in the range.
- Max: The highest possible number in the range.
- Quantity: How many numbers you want to generate.
- Allow Duplicates: Toggle whether the same number can appear more than once in the output.
Outputs
- Result List: A visually distinct list of the generated random numbers.
Chart
- N/A: This tool provides a randomized numeric list.
“Good to Know”
- Copy to Clipboard: Use the built-in copy button to instantly save your results for use in other documents or emails.
- Randomness: This tool uses high-quality pseudo-random number generation algorithms provided by modern browsers to ensure statistical distribution.
- Limit Check: If you turn off “Allow Duplicates,” the quantity cannot exceed the total count of numbers in your specified range ($Max - Min + 1$).
Examples
Example 1: Picking a Single Number (1-100)
- Input: Min: 1, Max: 100, Quantity: 1
- Output: [42] (Random example)
Example 2: Lottery Pick (No Duplicates)
- Input: Min: 1, Max: 50, Quantity: 5, Duplicates: Off
- Output: [7, 23, 14, 49, 2]
Example 3: Coin Flip Equivalent
- Input: Min: 0, Max: 1, Quantity: 1
- Output: [0] (Heads) or [1] (Tails)