Random Number Generator

Generate deterministic pseudo-random integers in a range from a seed (same inputs → same sequence—good for demos and QA).

CalcHub

Random Number Generator

Full page
Live

Preview

1

Mirrors whichever field is focused below.

Add to workspace

Run up to six calculators on one board. You can try without an account—your board stays on this device until you sign in to save it.

Add to workspace

No account needed—build a local board (one workspace on this device). Sign in later to save it to your account.

Open My workspace →

The Random Number Generator Calculator produces deterministic pseudo-random integers from a seed, so the same inputs always return the same sequence. That makes it useful when you need repeatable “random” values for demos, QA, classroom examples, simulations, or test data. You choose a minimum and maximum value, set how many numbers to generate, and provide a seed. The tool then samples integers uniformly within the inclusive range you defined.

Because this is a pseudo-random generator rather than a cryptographic source of randomness, it should not be used for security-sensitive tasks. Its value is reproducibility: if you rerun the calculator with the same min, max, count, and seed, you should get the same output sequence again.

How This Calculator Works

This calculator uses the Mulberry32 pseudo-random number generator to create a repeatable stream of values from your seed. Each generated number is then converted into an integer within your selected range, including both endpoints. If you request multiple numbers, the generator advances through the same deterministic sequence each time, which is why the list is reproducible for identical inputs.

In practical terms, the calculator takes the seed as the starting state, generates a pseudo-random fraction, scales it to the size of your range, and shifts it into the interval from minimum to maximum.

Formula

The calculator uses a deterministic PRNG step and then maps that output into your requested integer range.

Mulberry32 PRNG step: x = (x + 0x6d2b79f5) ^ (x >> 15); x = x * (x ^ (x >> 7)); x = x * (x ^ (x >> 8)); return x % (max - min + 1) + min;

Uniform integer sampling: Random Integer = floor(random() * (max - min + 1)) + min

Variable definitions

VariableMeaning
minMinimum inclusive value in the output range
maxMaximum inclusive value in the output range
countHow many integers to generate
seedStarting value that determines the reproducible sequence
random()Deterministic pseudo-random value derived from the PRNG state

Example Calculation

  1. Set Seed = 42.
  2. Set Minimum = 1 and Maximum = 100, so the range is inclusive from 1 to 100.
  3. Set Count = 5 to generate five numbers.
  4. The calculator advances the PRNG five times and maps each result into the 1–100 interval.
  5. The output is a reproducible list: if you repeat the same inputs later, you should get the same sequence again.

For this example, the exact list depends on the generator implementation, but the key property is stability: seed 42 with 1–100 and count 5 will always produce the same 5-number output in this tool.

Where This Calculator Is Commonly Used

  • QA and software testing for repeatable test cases and data fixtures
  • Classroom demonstrations where deterministic “random” examples are easier to verify
  • Game design prototypes for reproducible loot rolls, spawns, or encounter tables
  • Simulation workflows where controlled randomness helps compare runs
  • Content generation such as sample IDs, shuffled-like examples, or mock datasets

How to Interpret the Results

The Numbers output is the generated list of integers. Since the range is inclusive, both min and max can appear in the results. The Sum helps you quickly verify totals or compare runs, while the Average gives a simple central value for the generated list.

If the same seed and range are reused, the number sequence should match exactly. If you change the seed, you should expect a different sequence. If the minimum is greater than the maximum, or the seed is invalid, the result cannot be interpreted correctly. Also note that very large counts may be capped in the UI for usability.

Frequently Asked Questions

What does “deterministic” mean in this calculator?

Deterministic means the calculator follows the same calculation path every time for the same inputs. If you enter the same minimum, maximum, count, and seed, the generator should produce the same sequence again. That makes it ideal for testing, demos, and repeatable examples.

Are the numbers truly random?

No. They are pseudo-random, which means they look random but are created by a mathematical algorithm. That is useful for reproducibility, but it is not suitable for cryptographic or security-sensitive uses. For those cases, a cryptographically secure random source is required.

Does the range include both minimum and maximum?

Yes. The calculator uses an inclusive range, so both the minimum and maximum values can appear in the output. For example, a range of 1 to 6 can produce 1, 2, 3, 4, 5, or 6.

Why do I get the same output every time?

That is expected when the seed and all other inputs are unchanged. The seed determines the starting state of the pseudo-random generator, so the same seed recreates the same sequence. Change the seed if you want a different reproducible result.

What happens if the count is too large?

The UI may cap the count to keep the tool fast and usable. Very large lists can also make results harder to inspect. If you need more values, consider generating them in smaller batches or using a workflow designed for larger datasets.

Can I use this for passwords, tokens, or security codes?

No. This tool is designed for deterministic pseudo-random integers, not secure randomness. Passwords, session tokens, verification codes, and similar values should come from a cryptographically secure generator rather than a seeded PRNG.

Why does the average matter?

The average provides a quick summary of the generated list. It can help you compare different seeds or ranges and spot whether the output is centered where you expect. It is especially useful when you generate multiple numbers and want a single representative statistic.

FAQ

  • What does “deterministic” mean in this calculator?

    Deterministic means the calculator follows the same calculation path every time for the same inputs. If you enter the same minimum, maximum, count, and seed, the generator should produce the same sequence again. That makes it ideal for testing, demos, and repeatable examples.

  • Are the numbers truly random?

    No. They are pseudo-random, which means they look random but are created by a mathematical algorithm. That is useful for reproducibility, but it is not suitable for cryptographic or security-sensitive uses. For those cases, a cryptographically secure random source is required.

  • Does the range include both minimum and maximum?

    Yes. The calculator uses an inclusive range, so both the minimum and maximum values can appear in the output. For example, a range of 1 to 6 can produce 1, 2, 3, 4, 5, or 6.

  • Why do I get the same output every time?

    That is expected when the seed and all other inputs are unchanged. The seed determines the starting state of the pseudo-random generator, so the same seed recreates the same sequence. Change the seed if you want a different reproducible result.

  • What happens if the count is too large?

    The UI may cap the count to keep the tool fast and usable. Very large lists can also make results harder to inspect. If you need more values, consider generating them in smaller batches or using a workflow designed for larger datasets.

  • Can I use this for passwords, tokens, or security codes?

    No. This tool is designed for deterministic pseudo-random integers, not secure randomness. Passwords, session tokens, verification codes, and similar values should come from a cryptographically secure generator rather than a seeded PRNG.

  • Why does the average matter?

    The average provides a quick summary of the generated list. It can help you compare different seeds or ranges and spot whether the output is centered where you expect. It is especially useful when you generate multiple numbers and want a single representative statistic.