CalcFolio

Random Number Generator

Use this random number generator to draw one number or a list of up to 500 between a minimum and a maximum, both included. Choose whole numbers or decimals, rule out repeats, sort the list, or enter a seed to get the same list again later. It suits classroom picks, games, shuffling a list and test data. Do not use it for lotteries, gambling, passwords or anything security-related.

Updated

1 to 500

Included in the draw

Included in the draw

Number type

1 to 10

Advanced options

Same seed and settings give the same list; leave empty for a fresh draw

How to use the generator

  1. How many numbers: from 1 to 500.
  2. Minimum and maximum: both ends can be drawn. For a die, use 1 and 6.
  3. Number type: whole numbers, or decimals with 1 to 10 decimal places.
  4. No repeats: each value appears at most once. You can't ask for more numbers than there are possible values.
  5. Sort: lists the numbers from smallest to largest.
  6. Seed (advanced, optional): any text. Leave it empty for a fresh draw every time.

Below the list, Possible values tells you how many different numbers could come up, and Random source shows which generator was used.

How the numbers are generated

Without a seed

The draw uses your browser's crypto.getRandomValues, which MDN describes as producing cryptographically strong random values. If a browser doesn't offer it, the generator falls back to Math.random, which MDN says does not provide cryptographically secure random numbers. The source line tells you which one ran. Either way, a new list appears on every draw and can't be recreated.

With a seed

The seed text is turned into a number with the FNV-1a hash, which starts a small deterministic generator called mulberry32. The same seed with the same settings always gives the same list, on any device. Spaces around the seed are ignored, but capitals matter: “Class” and “class” give different lists. A seed makes results repeatable and checkable, and also predictable to anyone who knows it.

Fair odds within the range

Each number is built from 53 random bits, and draws that would favor some values are thrown away and redrawn (rejection sampling). That avoids the modulo bias of the common “random % range” shortcut, so every possible value has the same chance. Decimals are drawn from the multiples of 0.01 (for 2 places) between the bounds. In whole-number mode, decimal bounds shrink to the whole numbers inside them: −5.5 to 5.5 gives −5 to 5, or 11 possible values. With no repeats, the generator shuffles the candidates with a Fisher–Yates shuffle (up to 10,000 of them) or redraws duplicates in larger ranges.

Examples

Draws without a seed change every time, so these examples use seeds you can type in to get the same output.

1. Ten numbers from 1 to 100

With seed 42: 50, 67, 18, 16, 78, 99, 70, 77, 17, 69. There are 100 possible values. With seed 43 the list is 64, 33, 37, 6, 81, 67, 38, 57, 57, 43. Notice that 57 comes up twice, which is normal when repeats are allowed.

2. Shuffle a class of 30

Number your students 1 to 30, ask for 30 numbers from 1 to 30 and tick No repeats. With seed class the order begins 25, 18, 29, 11, 5. Every student appears exactly once. Share the seed and anyone can check the order.

3. Decimals between 0 and 1

Five numbers with 2 decimal places, seed 42: 0.44, 0.33, 0.26, 0.07, 0.16. There are 101 possible values, from 0.00 to 1.00.

What not to use it for

Do not use this generator for lotteries, gambling, raffles or contests with legal or financial stakes, passwords, keys, or any security decision. A seeded list is predictable by design, Math.random is not cryptographically secure, and these draws are not certified or audited. For keys and other security uses, NIST publishes standards for random bit generation, and MDN recommends the Web Crypto API's generateKey() for creating keys.

Frequently asked questions

Are the numbers truly random?

This page makes no claim of “true randomness.” Without a seed the numbers come from the browser's cryptographic generator, which MDN describes as a pseudo-random generator seeded with enough entropy. They are unpredictable for everyday purposes, but they are not certified for any regulated use.

What does the seed do?

It makes the draw repeatable. Type the same seed with the same count, range and options and you get exactly the same list. That is useful for reproducible classroom draws, games and test data. Changing any setting, including No repeats, can change the whole list.

Are both the minimum and the maximum included?

Yes. A range of 1 to 100 has 100 possible values, and both 1 and 100 can be drawn.

How do I get numbers without repeats?

Tick No repeats. The count can't be larger than the number of possible values: you can draw 30 unique numbers from 1 to 30, but not 31. Add Sort if you want them in order.

Can I use it to pick lottery numbers or a giveaway winner?

Not for anything with money, prizes or legal stakes. The generator is not certified or audited, and a seeded draw can be predicted. Use the method the contest's official rules require.

Can I generate negative numbers?

Yes. Set a negative minimum, for example −10 to 10, which gives 21 possible whole numbers.

Sources

  1. MDN Web Docs — Crypto.getRandomValues()
  2. MDN Web Docs — Math.random()
  3. NIST Computer Security Resource Center — Random Bit Generation

This generator is for everyday, educational and testing use only. It is not certified or audited and must not be used for lotteries, gambling, prize draws, passwords, encryption keys or other security decisions.