How this random number generator works
You give us a range and a count, and we draw whole numbers where every value in the range has exactly the same chance of coming up. Ask for one number and you get a clean pick. Ask for twenty and you get a grid you can copy in one click. The share link remembers your settings (range, count, repeats) but never the numbers themselves, so every visit is a fresh draw.
The formula
Here random() is a decimal from 0 up to (but never reaching) 1, min and max are the ends of your range, and floor rounds down to a whole number. The "+ 1" matters: it makes the range inclusive on both ends, so the maximum can actually be drawn. Skip it (a classic bug) and your top number never appears.
Worked example
Say your range is 1 to 10 and the generator produces random() = 0.4237. Then n = floor(0.4237 × 10) + 1 = floor(4.237) + 1 = 4 + 1 = 5. Every slice of the 0-to-1 line maps to exactly one of the ten numbers, and every slice is the same width, so each number has a 10% chance.
What "random" actually means here
Your browser does not flip a real coin. It runs an algorithm (a pseudorandom generator) that starts from a hidden seed and produces a stream of numbers that passes every statistical test you would care to throw at it, while being completely deterministic underneath. For picking a winner among friends, shuffling chores, sampling a class, or settling who buys lunch, that is more than good enough. It is not good enough for cryptography, and it leaves no audit trail for a regulated lottery. When the stakes demand randomness you can defend, use physical dice or a service like random.org, which draws from atmospheric noise and publishes verification records.
What people use it for
The classics: drawing raffle and giveaway winners (number the entries, draw with repeats off), picking a random sample for a survey or a taste test, breaking a tie or a stalemate ("odd I choose, even you choose"), assigning presentation order, and teaching probability, where generating 100 numbers and tallying them beats any lecture on the law of large numbers. If your game just needs a d6 or a d20, our dice roller is the faster tool, and if you want to know the odds behind your draws, the probability calculator picks up where this page leaves off.
How the no-repeat draw works
When you turn repeats off, we do not draw and re-draw until we get lucky. For normal ranges we use the Fisher-Yates shuffle: picture every number in your range as a card in a deck. We shuffle the deck fairly, one card at a time, then deal your numbers from the top. Every possible hand is equally likely, and it finishes in one pass no matter how unlucky you are. For enormous ranges (over 100,000 values) building the whole deck would be wasteful, so we switch to drawing normally and quietly discarding any duplicate, which is nearly instant when the range dwarfs the count. Either way you get distinct numbers with equal odds; the only difference is what happens under the hood.