抛硬币:正面或反面,抛一次或最多 10,000 次
抛一枚公平的虚拟硬币一次即可快速做决定,也可抛最多 10,000 次,查看正面和反面的次数、百分比以及各自的最长连续次数。
输入
提示:按 Ctrl + Enter 运行
已保存的设置
下方的详细帮助目前仅提供英文版。
关于此工具
A coin toss is the oldest fair way to settle a small decision: who kicks off, who picks first, which restaurant tonight. This page flips a virtual coin in one click, and because the outcome comes from your browser’s cryptographic random source, nobody can predict or steer it.
Flip it many times and it becomes a small probability experiment. Up to 10,000 flips give the number of heads and tails, their percentages, the longest run of each side and, for up to 500 flips, the full sequence. Students can watch the share of heads settle towards 50% as the number of flips grows, and see that long streaks are a normal part of randomness rather than a sign of a rigged coin.
使用方法
- Leave the number of flips at 1 for a single heads-or-tails decision.
- For an experiment, enter a larger number such as 100 or 1,000.
- Run it to see the result, or the counts, percentages, longest runs and sequence.
- Run it again for a fresh, independent set of flips.
计算原理
Every flip draws one random value from the Web Crypto API and maps it to heads or tails with equal probability. The counts are added up, percentages are heads ÷ flips × 100, and the longest run is the longest unbroken stretch of the same side in the sequence. The expected number of heads, flips ÷ 2, is shown for comparison.
each flip: heads or tails with probability 1/2; expected heads = flips ÷ 2计算示例
A teacher flips 100 coins in front of the class. The page always shows the expected 50 heads for comparison; the actual count changes every run, and results such as 53 heads and 47 tails, or 46 and 54, are ordinary. Flipping 10,000 times usually lands within about one percentage point of 50%, which shows the law of large numbers at work.
示例输入和结果
抛 100 次:正面和反面的次数、百分比、最长连续次数以及完整的 H/T 序列
局限性
- Simulates a fair two-sided coin only; it cannot model a weighted or real coin landing on its edge.
- The full sequence is shown for up to 500 flips; larger runs show the totals only.
- Nothing is stored, so a result cannot be verified later by someone else.
最后更新:
常见问题
虚拟抛硬币真的是 50/50 吗?
是的。每次抛掷都从 Web Crypto API 取一个随机比特,因此正面和反面的概率相同,前面的结果不会影响下一次。
为什么会出现很长的连续正面或反面?
连续出现很正常。在 100 次公平抛掷中,同一面连续出现五次或更多的情况大多数时候都会发生,所以连续出现并不说明硬币有问题。
常见问题
Can I use this to make a fair decision between two people?
Yes. Agree who takes heads before flipping, then flip once. The result cannot be influenced from the page.
Why is it not exactly 50% heads?
Randomness varies around the average. With 100 flips, anything from about 40 to 60 heads is common; the share gets closer to 50% as the number of flips grows.
Is there a best-of-three option?
Enter 3 flips and count the heads; two or more heads wins for heads. For longer contests use an odd number of flips.
故障排除
It says the number of flips is invalid.
Enter a whole number from 1 to 10,000.
I got heads five times in a row.
The chance of five heads in a row is 1 in 32, so it happens regularly over many flips.
隐私 & 免费使用
我的输入会被保存吗?
你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。
这个工具免费吗?
是的。无需注册或付费。