100% Mobile Friendly — Works Instantly On Any Phone, Tablet Or Desktop
Sigma Calculator — 80+ Free Tools
Generate truly random numbers in any range — pick integers for draws, games and lotteries, with or without duplicates allowed.
Generating a fair random number takes five seconds with the tool above. Follow these steps to get exactly the kind of draw you need, whether it is a single lucky number or a whole set of unique winners.
Behind the scenes the tool uses the standard integer formula result = min + floor(random() × (max − min + 1)), where random() returns a decimal in [0, 1). The multiplication stretches that decimal across your range, floor() snaps it down to a whole number, and adding min shifts it into place. Because every input decimal is equally likely, every integer in your range is equally likely too — that is the definition of a uniform distribution.
A random number is a value drawn from a process whose outcome cannot be predicted in advance. When every possible value has the same probability, mathematicians call it a uniform distribution — the digital equivalent of a perfectly balanced die. This calculator produces uniformly distributed integers in any range you choose, which is exactly what games, draws, lotteries, and sampling plans require.
There is an important distinction between true randomness and pseudorandomness. True randomness comes from unpredictable physical processes: atmospheric noise, thermal fluctuations in a resistor, or the precise timing of your keystrokes. A pseudorandom number generator (PRNG), by contrast, is a deterministic algorithm: it starts from a seed value and applies fixed arithmetic to produce a long sequence that looks random and passes statistical tests, even though the same seed always reproduces the same sequence. Your browser’s built-in generator is a PRNG, and it is more than unpredictable enough for games, raffles, classroom demos, and everyday sampling. It is not suitable for cryptography or gambling, where a cryptographically secure generator fed by real entropy is required.
People have randomized decisions for millennia. Carved knucklebone dice date back over 5,000 years, Roman soldiers cast lots, and medieval courts used sortition — selection by lot — to choose officials. The mathematics caught up in the 20th century: John von Neumann proposed the middle-square method in 1946 for early computers, and the Mersenne Twister (1997) became the workhorse PRNG of scientific computing with its enormous period of 219937 − 1. Modern browsers typically use compact, fast algorithms from the xorshift family, reseeded from operating-system entropy, which is why every visit gives you a fresh stream of numbers.
Random integers power a surprising share of daily life: lotteries and raffles draw winners, games shuffle cards and roll dice, statisticians select unbiased survey samples, programmers generate test data and randomize algorithms, teachers pick students fairly, and event organizers assign secret-Santa pairs. Whenever a decision must be impartial, a uniform random draw is the gold standard — no human can fake that fairness by “picking randomly” in their head, because people unconsciously favor middle values and avoid repeats.
The tool converts a random decimal into a random integer in your range with one line of arithmetic:
result = min + floor(random() × (max − min + 1))
Here random() is a decimal from 0 (inclusive) to 1 (exclusive). Multiplying by the range size (max − min + 1) stretches it across that many unit intervals; floor() rounds down to pick one of them (0 through range − 1); adding min slides the whole thing up to your starting value. The “+ 1” is what makes the maximum inclusive: without it, the top value could never appear.
Set min = 1, max = 100. The range size is 100 − 1 + 1 = 100. Suppose the generator produces random() = 0.37284. Multiply: 0.37284 × 100 = 37.284. Take the floor: 37. Add the minimum: 37 + 1 = 38. Every integer from 1 to 100 has exactly a 1/100 = 1% chance, because each one owns an equal slice (0.01 wide) of the [0, 1) interval. A different run might produce random() = 0.90112 → 90.112 → floor 90 → +1 = 91.
Set min = 25, max = 75. The range size is 75 − 25 + 1 = 51. Suppose random() = 0.812. Multiply: 0.812 × 51 = 41.412. Floor: 41. Add the minimum: 41 + 25 = 66. Note how the formula never produces 24 or 76 — the result always lands inside [min, max]. If you need decimals instead of integers, generate a large integer range and divide: min 1, max 1000, then divide by 100 to get values like 38 ÷ 100 = 0.38 or 905 ÷ 100 = 9.05 with two decimal places.
A charity sells 200 numbered raffle tickets and must draw 3 distinct winners on stage. Set minimum 1, maximum 200, how-many 3, and — critically — uncheck “allow duplicates,” because one ticket cannot win twice. Press Generate Numbers and suppose the tool returns 47, 133, and 189. Announce them in the order drawn: ticket 47 wins first prize, 133 second, 189 third.
The math behind the fairness: each ticket’s chance of being drawn first is 1/200 = 0.5%. Any specific ticket’s chance of appearing anywhere among the 3 winners is 3/200 = 1.5%. And the number of possible winning triples is the combination C(200,3) = (200 × 199 × 198) ÷ 6 = 1,313,400 — every one of those 1.3 million triples is equally likely, which is precisely why the audience trusts the draw. If duplicates had been left on, the tool might have returned something like 47, 47, 133, forcing an awkward re-draw; the checkbox exists to prevent exactly that.
A factory produces 5,000 widgets a day and the quality team inspects 50 of them, chosen so no inspector can “pick the good-looking ones.” Number the widgets 1–5000 as they leave the line, then set minimum 1, maximum 5000, how-many 50, duplicates OFF, and generate. A result might begin 17, 402, 918, 1504, 2207, 3319, 4412, 4988… — 50 serial numbers spread across the whole production run.
Each widget’s probability of selection is 50/5000 = 1%, and because duplicates are off, the sample contains 50 distinct units. This is called simple random sampling, and it is the reason the inspection results can be generalized to the full day’s output. A classroom version: 30 students, 4 presentation slots, min 1, max 30, count 4, no duplicates — C(30,4) = (30 × 29 × 28 × 27) ÷ 24 = 27,405 possible groups, each equally likely, so nobody can claim the teacher played favorites.
Pair the generator with tools that use its output. The Probability Calculator turns draw odds like 3/200 into percentages; the Dice Roller is a themed shortcut for tabletop games; the Password Generator handles the security-grade secrets this tool should not make; the Mean / Median / Mode Calculator summarizes large samples you draw; and the Percentage Calculator converts hit rates. Browse everything in Math Calculators.
This page provides a random integer generator producing uniformly distributed integers in an inclusive range [min, max]. Method: result = min + floor(random() × (max − min + 1)), where random() ∈ [0, 1). Inputs: minimum, maximum (inclusive), count of numbers, duplicates toggle (sampling with replacement when on, without replacement when off). Outputs: the drawn integers plus a plain-language summary. Verified numeric facts: C(200,3) = 1,313,400 possible triples; a specific ticket’s win probability among 3 winners from 200 is 3/200 = 1.5%; random() = 0.37284 with min 1, max 100 yields 38; random() = 0.812 with min 25, max 75 yields 66; a specific value’s chance of appearing at least once in 5 draws from 1–100 with replacement is 1 − (99/100)^5 ≈ 4.9%. Browser PRNG output is pseudorandom and unsuitable for cryptographic use.
Sources: Donald Knuth, The Art of Computer Programming, Vol. 2 (random numbers); Matsumoto & Nishimura, “Mersenne Twister” (1997); MDN Web Docs, Math.random(). All combinatorial and probability figures were computed by hand.
Set min 1, max 100 and generate — every integer equally likely.
They are pseudo-random, unpredictable enough for everyday uses like games and draws.
Turn off “allow duplicates”.
Generate an integer and divide (e.g. 1–1000 ÷ 100).
Set min 1, max 6, count 1.
Set minimum 1, maximum 49, how-many 6, and turn OFF ‘allow duplicates’. A draw might give 7, 14, 23, 31, 38, 45 — six distinct numbers, every combination equally likely.
1 divided by the range size. For 1–100, each integer has a 1/100 = 1% chance per draw. Over 5 draws with duplicates allowed, a specific number appears at least once with probability 1 − (99/100)⁵ ≈ 4.9%.
Set minimum 1, maximum 2, how-many 1: treat 1 as heads and 2 as tails. Each side has a 1/2 = 50% chance, exactly like a fair coin.