A lottery-style draw: 6 unique numbers from 1-49
Running the number range generator with a minimum of 1, a maximum of 49, a count of 6, and "allow duplicates" off produced 45, 19, 30, 49, 18, 48 — six different numbers, none repeated, each somewhere between 1 and 49. Because duplicates are switched off, every number in that result is guaranteed to be distinct, which is exactly what a lottery draw needs: it would be meaningless for the same ball to be drawn twice in the same round.
The formula: a partial Fisher-Yates shuffle
Without duplicates, the generator first builds the full list of whole numbers in the range — for min=1, max=49 that is the 49 numbers 1 through 49 — then shuffles that list using a Fisher-Yates shuffle (repeatedly swapping each position with a random earlier or equal position) and keeps only the first "count" entries. That is why 45, 19, 30, 49, 18, 48 came out with no repeats: each of the 49 numbers can be chosen at most once because it only exists once in the shuffled list. With duplicates allowed, the generator skips the shuffle entirely and instead draws each output number independently and uniformly from the range, the same way a single random integer generator would — so the same value can legitimately come up more than once.
A dice-roll example: 8 rolls from 1-6, duplicates allowed
Setting the minimum to 1, the maximum to 6, the count to 8, and switching "allow duplicates" on produced 4, 3, 6, 3, 6, 5, 1, 6 — eight independent rolls of a 6-sided die. Here 3 appears twice and 6 appears three times, which is expected and correct: with only 6 possible values and 8 rolls requested, at least one repeat is unavoidable by the pigeonhole principle, and the "allow duplicates" setting is precisely what makes that possible. A second run with the minimum at 1, the maximum at 20, and the count at 5 (duplicates off) produced 9, 10, 16, 3, 5 — five distinct numbers from a wider range, again with no repeats because the shuffle only visits each of the 20 numbers once.
Why the duplicate setting matters
The choice between the two modes is really a choice about what the numbers represent. Use "no duplicates" whenever each number should be usable only once, such as lottery balls, raffle winners, or names picked from a hat. Use "allow duplicates" whenever each draw is independent of the others, such as simulating several dice rolls or repeated coin flips, where getting the same result twice is not just possible but expected once enough draws are made. Mixing the two up — for example turning duplicates off for a dice simulation — would quietly cap how many times a value like 6 could appear, which no real die does.