How the numbers are drawn
Your browser supplies 32-bit random values from the operating system's secure generator. To turn one into a whole number between your minimum and maximum without bias, the calculator finds the largest multiple of the range size that fits in 32 bits, rejects any raw value above it, and takes the remainder of the rest. With "No repeats", it performs a partial Fisher–Yates shuffle of the range, so every possible set of numbers is equally likely.
The method
span = max − min + 1 limit = ⌊2³² / span⌋ × span draw u from 0 … 2³² − 1, repeat while u ≥ limit result = min + (u mod span) P(any given value) = 1 / span
Worked example
For a number from 1 to 6 (a die roll), span = 6 and limit = ⌊4,294,967,296 / 6⌋ × 6 = 4,294,967,292. If the raw value is 4,294,967,294 it is rejected (it would make 1 and 2 slightly more likely); a raw value of 1,000,003 gives 1 + (1,000,003 mod 6) = 1 + 1 = 2. Each face has probability 1/6 ≈ 16.67%.
Notes
- Whole numbers only, up to a range of about 4.29 billion values; up to 1,000 numbers per draw.
- Nothing is stored: refreshing the page or pressing Calculate draws a new set. A shared link reproduces the settings, not the numbers.
Sources: W3C, Web Cryptography API — getRandomValues(); NIST, SP 800-90A Rev. 1 (approved random bit generators); Knuth, The Art of Computer Programming, Vol. 2, §3.4.2 (random sampling and shuffling).
Frequently asked questions
Are these numbers truly random?
They come from your browser's cryptographically secure random number generator (crypto.getRandomValues), the same source used to create encryption keys, rather than the predictable Math.random(). The numbers are generated on your device and never sent anywhere.
Is every number equally likely?
Yes. A common shortcut — taking a random value modulo the range size — slightly favors small numbers. CalcNest uses rejection sampling: it discards the few raw values that would cause that bias and draws again, so each integer in the range has exactly the same chance.
How do I pick lottery-style numbers with no repeats?
Tick "No repeats". The generator then draws without replacement using a Fisher–Yates shuffle, like pulling numbered balls from a drum. For example, 6 numbers from 1 to 49.
Can I use this for a raffle or giveaway?
Yes — number the entries, set the range from 1 to the number of entries, and draw. For a public drawing, share your screen or record it, since a page refresh draws new numbers. Check any local rules for prize drawings.