Coin Flip (Heads or Tails)
Flip one coin or thousands, with counts, percentages and streaks.
Use via API
Flip one or more fair coins with a cryptographic random source, with head/tail counts and longest streaks. Send JSON, get JSON back.
POST https://pithlab.com/api/v1/tools/coin-flip
curl https://pithlab.com/api/v1/tools/coin-flip \
-H "Authorization: Bearer $PITHLAB_KEY" \
-H "Content-Type: application/json" \
-d '{"count":10}'About the Coin Flip
Flip a fair virtual coin, or up to 10,000 coins at once. See heads and tails counts, percentages, the longest streaks and a history of your flips.
How to use the Coin Flip
- Press Flip to toss one coin. The result appears straight away and is announced to screen readers.
- To flip many coins at once, change How many coins (up to 10,000) and press Flip again.
- Check the totals, percentages and longest streaks, copy the sequence, or press Reset to start again.
Examples
Input
1 coin
Output
e.g. Heads
Input
H H T H T T T H
Output
4 heads (50%), 4 tails (50%), longest streak 3 tails
Input
H H H H T
Output
4 heads (80%), 1 tail (20%), longest streak 4 heads
Frequently asked questions
Is this coin flip really 50/50?
Yes. Each flip uses your browser's cryptographically secure random number generator, so heads and tails are equally likely and every flip is independent of the last.
Why do I get long streaks?
Streaks are normal. In 100 fair flips the longest run of the same side is usually around 6 or 7. A run of heads does not make tails more likely next time.
Why aren't 1,000 flips exactly 500 heads?
Random results wobble around the average. For 1,000 flips, anything from roughly 470 to 530 heads is typical. The percentage gets closer to 50% as you flip more coins.
Is anything sent to a server?
No. The flips happen entirely in your browser and the history is kept only on this page until you reset or leave.