Skip to main contentSkip to calculator
108 calculatorsLive resultsStep-by-step solutions

Rechnerpilot tool

Random Number Generator

Generate pseudo-random integers with a range, count, duplicate rule and sorting.

Generators

The range contains no valid integers.

Explanation

How Random Number Generator works

The random number generator produces integers from a freely selectable range. You decide whether numbers may occur more than once (drawing with/without replacement) and how the output is sorted.

The bounds are ordered internally and narrowed to the integers they contain. Equal integer bounds always yield the same single possible value. Negative ranges are also supported. Without duplicates, an impossible count is visibly limited to the size of the range.

The separator determines how the numbers are separated when copied — handy for import into Excel, CSV files or other programs.

Common mistakes

  • Using pseudo-randomness for cryptography: Math.random is predictable and not suitable for security purposes. For passwords, tokens or cryptographic keys use crypto.getRandomValues().
  • Reading a single output as a quality test: Small sequences prove neither uniform distribution nor its absence; this tool performs no statistical quality test.
  • Understanding decimal bounds as decimal output: The generator outputs integers only and rounds the lower bound up and the upper bound down.
  • Expecting reproducibility: Without a seed value the results differ on every call. For reproducible experiments use a documented seed generator.

Limits of this tool

  • Uses Math.random — no substitute for cryptographically secure randomness in security applications.
  • Integer values only — no floating-point numbers or normal distributions.
  • No seed value can be set — results are not reproducible.
  • At most 500 numbers per run — use dedicated tools for larger data sets.

Sources

  • NIST SP 800-90A: Recommendation for Random Number Generation Using Deterministic Random Bit Generators (DRBG). Standard for cryptographic random number generators.
  • ECMAScript Specification: Math.random() — returns pseudo-random numbers with approximately uniform distribution in the range [0, 1).

Practice

Practical examples

Draw a lot

Minimum 1, maximum 30 and count 1 return exactly one integer from 1 to 30.

Sample

10 distinct numbers from a range for statistical selection.

CSV output

Separated by semicolons for direct import into spreadsheet programs.

FAQ

Frequently asked questions

Are duplicates allowed by default?

No. The generator starts without duplicates so draws like lottery numbers are unique. You can enable duplicates explicitly.

Why is the count sometimes limited?

Without duplicates there cannot be more results than integer values exist in the chosen range. The generator automatically limits to the maximum possible count.

Are the numbers cryptographically secure?

No. The generator uses Math.random (a pseudo-random generator) and is meant for everyday use, lists, games and tests. For security-relevant applications use crypto.getRandomValues().

How does Math.random compare to cryptographic randomness?

According to ECMAScript, Math.random returns random or pseudo-random values with approximately uniform distribution; the algorithm is implementation-dependent. This tool offers no seed and no cryptographic suitability.

Are the numbers uniformly distributed?

The JavaScript specification describes the values as approximately uniformly distributed. The tool does not thereby prove any verified randomness quality for a particular use case.

Can I use the generator for scientific samples?

Not without methodological review. The tool documents neither a seed nor a fixed algorithm and therefore cannot reproduce draws.

What happens when min > max?

The generator swaps the values automatically, so the smaller value is treated as the minimum and the larger as the maximum.

Which separator is suitable for Excel import?

For import into Excel or other spreadsheets use semicolon as the separator. Comma may be interpreted as a decimal separator depending on the language settings.

How many numbers can I generate at most?

The generator supports up to 500 numbers per run. When drawing without duplicates the count is limited by the available range.

Are the numbers stored?

No. The numbers are generated in the browser and drawn anew on every reload or click on Generate. No storage or transmission takes place.

Tips

Good to know

  • For lottery numbers: 1–49, 6 numbers, no duplicates, sorted ascending.
  • For samples: turn off duplicates to draw each number only once.
  • The separator determines the copy format for Excel or CSV.

Related calculators

More tools