Probability of a given number
P = 1 ÷ n, with n = max − min + 1
n is the number of integers in the range, limits included.
Random number generator: minimum and maximum, quantity up to 1,000, integers or decimals, draws without repeats. Randomness from the browser's Web Crypto API, handy for raffles, dice, lottery picks and sampling.
Quick ranges
Generation options
Choose a range, a quantity and a type of value, and the tool draws the numbers at once. Use it for a raffle among numbered participants, a dice roll, lottery picks, a sample from a numbered list or test data. Draws without repetition (unique values) are supported too.
You set a minimum, a strictly greater maximum and a quantity from 1 to 1,000. In integer mode every number is drawn with equal probability among the integers of the range, limits included: between 1 and 6, each face has a 1 in 6 chance. In decimal mode the value is drawn uniformly in the real interval, with the full precision of a floating-point number.
Randomness comes from the browser's Web Crypto API (crypto.getRandomValues), a cryptographic-quality generator, not from Math.random, which can be predictable. The 53 random bits it supplies are used to build a uniform number between 0 and 1; mapped onto a range of n integers, the leftover bias stays below n ÷ 2^53, negligible in practice.
With "unique values", a number already drawn is discarded: this is drawing without replacement, like lottery balls. The range must then hold at least as many integers as values requested (from 1 to 5 you cannot draw 6 unique values). Without it, repeats are possible: in 100 draws between 1 and 100, the chance that a given number appears at least once is about 63.4%.
A cryptographic draw is not a password generator: values are shown on screen and copied in plain text. For a secret, use the password generator. For a fair raffle, make sure each participant has one unique number in the range.
Minimum and maximum, with the maximum greater than the minimum. For a six-sided die: 1 and 6; for a 49-number lottery: 1 and 49.
From 1 to 1,000 values, integers or decimals. Turn on unique values for a draw without replacement.
Each click draws a fresh set. If the range is too small for unique values, a message says so.
For n equally likely values, every value has the same chance.
P = 1 ÷ n, with n = max − min + 1
n is the number of integers in the range, limits included.
C(n, k) = n! ÷ (k! × (n − k)!)
Number of different draws of k numbers from n, ignoring order.
P = 1 − (1 − 1 ÷ n)^k
Probability that a given number comes up at least once.
Example: in a 6-from-49 lottery, C(49, 6) = 13,983,816 combinations, so one chance in 13,983,816. To get at least one 6 in 4 die rolls, P = 1 − (5 ÷ 6)^4 ≈ 51.77%.
Pick a winner or a speaking order among numbered participants, without visible bias.
Replace a die, a coin (1 or 2) or a lottery slip for a game or practice.
Pick random rows from a numbered file for a quality check or an audit.
Produce test values, dummy IDs or draws for a simple simulation.
Each face is equally likely: 1 in 6, about 16.67%.
Input
min 1, max 6, quantity 1, integersResult
one integer from 1 to 6There are 13,983,816 ways to choose 6 numbers from 49, so one chance in 13,983,816 of matching the draw.
Input
min 1, max 49, quantity 6, integers, uniqueResult
6 distinct numbers between 1 and 49With 100 numbered participants, nobody can be drawn twice.
Input
min 1, max 100, quantity 3, integers, uniqueResult
3 different participant numbersUseful to simulate probabilities or fill a dummy dataset.
Input
min 0, max 1, quantity 5, decimalsResult
5 decimal numbers between 0 and 1Only 5 integers exist, so 6 distinct ones cannot be drawn.
Input
min 1, max 5, quantity 6, uniqueResult
error messageThey come from the browser's cryptographic generator (crypto.getRandomValues), unpredictable in practice, with 53 bits of precision. It is not a physical draw, but it is better than Math.random.
It is 1 ÷ n, where n is the number of integers in the range: 1 in 100 (1%) between 1 and 100, 1 in 6 (16.67%) for a die.
Turn on "Unique values". The range must hold at least as many integers as values requested, or an error message appears.
Up to 1,000 per draw. Larger quantities are capped at 1,000.
Yes: turn off the integers option. Values are spread uniformly between the two limits.
Related tools
Tools similar or complementary to this one.
Generate strong random passwords from 8 to 128 characters, with the entropy shown.
Generate one or more random UUID v4 identifiers instantly and copy them when needed.
Create brand, product, project or domain names from your keywords – not personal names.