How this calculator works
Numbers come from your browser's Web Crypto API random number generator — specifically crypto.getRandomValues() — not from a simple arithmetic formula. Web Crypto draws from the operating system's cryptographically secure source, the same pool used to generate TLS session keys, so every number in the chosen range has the same chance of appearing.
This matters for fairness. The older Math.random() function used by many online calculators is a pseudo-random number generator (PRNG) seeded at page load. Its output is reproducible if the seed is known, which makes it unsuitable for a legally defensible prize draw.
With "no repeats" turned on, each number can be drawn only once, like drawing numbered raffle tickets from a bag. The tool uses a Fisher-Yates shuffle on the range and takes the first n values. If you ask for more unique numbers than the range contains, you get as many as possible with a warning.
With "repeats allowed", each draw is independent. Over many draws the same number can reappear — the probability of seeing a specific number at least once in n draws from a range of size R is 1 − ((R−1)/R)ⁿ.
The range is inclusive on both ends. Choosing 1 to 100 includes both 1 and 100. For non-integer ranges, generate integers and divide: 1 to 10000 divided by 100 gives decimals in 0.01 increments between 0.01 and 100.00.
Nothing you enter is sent to a server; the result lives only in the open browser tab. For a prize-draw audit trail, screenshot the result with the inputs visible, or record the draw on screen.
Worked example
Picking 3 winners from 250 numbered entries
- Set minimum 1, maximum 250, count 3, no repeats.
- Each entry number has the same 1-in-250 chance on the first draw.
- The second draw is from the remaining 249, and so on — no number can win twice.
- Match the three drawn numbers to your numbered entry list.
- Screenshot the result (inputs visible) as the audit record.
Common mistakes
- Using "repeats allowed" for a prize draw where each entry should win at most once. Use "no repeats".
- Setting the range wider than the entry list. Only entries that actually exist can win; numbers outside the list are void draws.
- Forgetting to record the result. Nothing is stored, and the next click overwrites what is on screen.
Limitations of this calculator
- Generates whole numbers only; non-integer draws need integer-then-divide (see the FAQ).
- Does not generate random strings, UUIDs, dice rolls, cards or weighted draws. Specialised tools exist for those.
- Does not produce an immutable audit log. For regulated prize draws, record the screen or use a notarised third-party tool.
For your specific situation, consult a tax professional or financial advisor.
Questions people ask
Is this truly random?
Cryptographically random, which for a prize draw is as random as it gets without a hardware random source like radioactive decay. The Web Crypto API draws from the operating system's secure entropy pool — the same source that generates TLS session keys and SSH keys — and is unpredictable in practice.
Can I use it for a legally compliant giveaway?
Yes, provided your terms and conditions say the draw will be done with a secure random source. For transparency: number your entries in advance (do not leave gaps), announce the draw time, and record the draw on screen so entrants can verify it. Some jurisdictions require an independent witness for prizes above a threshold — check your local rules.
Can it generate decimals or negative numbers?
It generates whole numbers directly. The range can include negative values (minimum −50, maximum 50). For decimals, generate integers and divide: a range of 1 to 10,000 divided by 100 gives 0.01-step decimals between 0.01 and 100.00.
Why does the same number appear twice when I click the button again?
With "repeats allowed" each click is an independent draw, so sequences can overlap. If you want fresh unique numbers every click, use "no repeats" and set a count greater than 1.
Sources
Last reviewed October 2, 2026 · Last reviewed by Muhammad Ahmad on October 31, 2026