Draw random integers in any range — for giveaways, sampling, games or picking who goes first. Choose the count, the minimum and maximum, and whether repeats are allowed.
Numbers come from the browser's cryptographic random source with rejection sampling, so every value in the range is exactly equally likely. With "no duplicates" the page uses a Fisher–Yates shuffle, like drawing cards from a deck.
Frequently asked questions
Is the draw fair?
Yes — rejection sampling avoids the modulo bias that makes naive random numbers slightly unfair.
How do I pick a giveaway winner?
Number the entrants 1–N, set min 1 and max N, count 1, no duplicates — done.
Why does the count cap depend on the range?
With no duplicates allowed, you cannot draw more unique numbers than the range contains.
中文说明
在任意范围内抽取随机整数——可用于抽奖、抽样、游戏或决定顺序。可设置数量、最小值、最大值以及是否允许重复。
数字来自浏览器密码学随机源并采用拒绝采样,范围内每个值的概率严格相等。勾选"不允许重复"时采用 Fisher–Yates 洗牌算法,如同从牌堆里抽牌。
常见问题
抽取结果公平吗?
公平——拒绝采样避免了朴素取模算法导致的微小概率偏差。
怎么抽抽奖中奖者?
把参与者编号 1–N,最小值填 1、最大值填 N、数量 1、不允许重复即可。
为什么数量上限和范围有关?
在不允许重复的模式下,去重抽取的数量不可能超过范围内的数字个数。