CalcDuck

Random Number Generator

Random Number Generator

Number type
Duplicates
Same seed + same settings always produces the same numbers -- reproducible and shareable. Not for passwords or lotteries.
Generated numbers
63, 1, 53, 99, 97
Count
5
Sum
313
Mean
62.6

This generator uses a seeded pseudo-random algorithm (mulberry32): the same seed, range, count, and settings always produce the exact same sequence of numbers, every time, on any device. That reproducibility is the point—it lets you share a result or regenerate it later—but it also means the output is fully predictable if someone knows your seed, so it must never be used for passwords, security tokens, or anything meant to be unguessable.

Tip: “Copy with settings” shares a link that opens this calculator with your numbers already filled in.

How this calculator works

Pick a minimum and maximum, how many numbers you want, whether they should be whole numbers or decimals, and whether duplicates are allowed. This generator then produces that list using a seeded random number algorithm, along with the count, sum, and mean of the results.

The seed is a plain number you choose (default 1). Changing the seed changes the sequence of numbers produced; keeping the seed the same, with the same range and settings, reproduces the identical sequence every time. That makes results shareable and verifiable—useful for picking teams, assigning raffle numbers you want to double-check later, or generating test data—but it also means this tool is deliberately deterministic, not secretive.

How the numbers are generated

Algorithm: mulberry32, a small, fast, well-documented pseudo-random number generator seeded by a single 32-bit integerWhole numbers: value = min + floor(random() * (max - min + 1))Decimals: value = min + random() * (max - min), rounded to the chosen number of decimal places

mulberry32 is a deterministic algorithm, not a cryptographically secure one. It is well suited to reproducible simulations, games, and sampling demonstrations—never to passwords, security tokens, or lottery/gambling numbers where true unpredictability matters.

Worked example: 5 whole numbers from 1 to 100, seed 7

  1. The seed (7) initializes the mulberry32 generator's internal state.
  2. Each call to the generator produces a float in [0, 1), which is scaled into the 1-100 range and rounded down to a whole number.
  3. With duplicates allowed, five draws are taken directly from the stream; with duplicates disallowed, any repeat is skipped and a fresh value drawn until five unique numbers are collected.
  4. Running this again with seed 7 and the same range/count produces the exact same five numbers—that's the reproducibility a seed provides.

Frequently asked questions

Is this safe to use for passwords or security codes?

No. This tool is explicitly NOT cryptographically secure. A seeded generator like mulberry32 is fully predictable once the seed is known, which is the opposite of what a password or security token needs. Use a dedicated cryptographically secure random generator (like the Web Crypto API's crypto.getRandomValues) for anything security-related.

Can I use this to pick lottery numbers or settle a bet?

Don't rely on it for anything where fairness or true unpredictability matters, like lotteries or wagers. Because the sequence is fully determined by the seed, someone who knows (or guesses) your seed and settings can predict every number you'll generate.

Why did changing my seed change the results?

The seed is the entire starting state of the algorithm—different seeds walk a completely different path through the generator's internal sequence, so even a seed that differs by 1 produces an unrelated-looking set of numbers.

What happens if I ask for more unique numbers than the range allows?

You'll get a clear message instead of an incomplete or misleading list. For example, asking for 10 unique whole numbers between 1 and 5 is mathematically impossible (there are only 5 possible values), so the calculator tells you to allow duplicates or widen the range.

Do decimals and whole numbers use the same range rules?

Both respect the min and max you set. Whole numbers are drawn from the integers within that range; decimals are drawn continuously across the full range and rounded to your chosen number of decimal places.

Sources

Related calculators