No flips yet.
Uses local browser-generated random values.
For casual decisions and simulations only. Not for regulated gaming, lotteries, audits, certifications, or cryptographic key generation.
This tool runs locally in your browser. Inputs and results are not transmitted or retained by BoringToolsKit.
Use this result
Share the current inputs or ask ChatGPT to explain the calculation in context.
More options
What does this calculator estimate?
Coin flip tool: flip a coin online with truly random results, flip history counts, and multiple coin tosses for quick decisions and games. Free, no signup.
How this calculator works
Formula
Each flip reads a 32-bit unsigned integer from the browser Web Crypto random-value source. Values below half the unsigned range map to Heads; values at or above half map to Tails, giving equal-size outcome ranges.
Worked example
For deterministic test values [0, 4294967295, 1, 3000000000], the mapped sequence is Heads, Tails, Heads, Tails: two of each and a longest streak of one.
Sources
Assumptions to verify
- Each browser-generated 32-bit value is mapped independently to one of two equal-size ranges.
- Short samples can be uneven and can contain streaks even when the process is fair.
- The tool is for casual decisions and simulations, not regulated gaming, auditing, or key generation.
Frequently asked questions
Why was my batch not exactly 50/50?
Randomness describes long-run probabilities, not a promise that every short batch contains equal counts.
Are flips sent to a server?
No. Random values and results are generated and processed locally in the browser.
Can I use this for gambling or security keys?
No. It is designed for casual choices and simulations, not regulated outcomes, audits, lotteries, or cryptographic key management.
Cite this tool
BoringToolsKit. “Coin Flip Tool.” boringtoolskit.com/coin-flip/ (reviewed July 2026). Free to reference in articles, syllabi, and answer posts with a link.
Privacy: Inputs and results stay in this browser. Any future sponsored recommendation or advertisement will be clearly labeled and kept separate from the calculation.
Worked example: 10 flips at 60% heads
Set the weighted toggle on and slide the weight to 60. The script converts that to a probability of 0.6 and builds a cutoff at 2,147,483,648 x 2 x 0.6 = 2,576,981,011.2. Each crypto.getRandomValues draw is an unsigned 32-bit integer between 0 and 4,294,967,295, and any draw below the cutoff counts as heads. That window covers 60.0% of the possible integers, so each flip lands heads with probability 0.6.
Say the tool returns 6 heads and 4 tails in 10 flips (heads 60%, tails 40%, longest streak 3). With a fair coin the chance of exactly 6 heads in 10 is C(10,6)/1024 = 210/1024 = 20.51%. At p = 0.6 it is C(10,6) x 0.6^6 x 0.4^4 = 210 x 0.046656 x 0.0256 = 25.08%. The weighted coin makes a 6-head outcome about 22% more likely, which is why a 6-4 split is weak evidence of bias on its own: 6 heads is the single most likely count at every weight from roughly 40% to 65%. Track the streak box too. In 10 fair flips the longest run exceeds 3 about 46.5% of the time (P(longest 4 or more) = 100% - 53.52% = 46.48%), so a streak of 4 is unremarkable while a streak of 7 or more happens under 2% of the time.
Edge cases: what the inputs actually do
The weight slider accepts 0 to 100. At 0, the cutoff drops to zero and every random draw falls above it, so all flips are tails and the heads box reads 0 no matter how many times you run it. At 100, the cutoff is 4,294,967,296, the full integer range, so every draw is heads and tails is impossible. Anything the slider sends outside 0 to 100, or a non-numeric value, silently resets the weight to a fair 50/50 instead of erroring. Between 0 and 100 the mapping is exactly linear: 55 gives a cutoff of 2,362,232,238.1 and 90 gives 3,865,470,463.9.
The flip count rejects non-integers, values below 1, and anything above 100 with the message 'Choose between 1 and 100 flips', so a request for 500 flips is not silently truncated. Below 100, the RNG is drawn fresh each run from crypto.getRandomValues, and if it ever supplies fewer values than the count the run fails closed rather than reusing values. Two practical boundaries follow from the 100-flip cap. First, weighted percentages are coarse at small counts: at 10 flips each flip moves the heads percentage by 10 points, so an honest 60% coin can easily show 50% or 70% in a single run. Second, the streak statistic saturates near the cap; in 100 fair flips the longest run is typically 6 to 8, and streaks of 10 or more are common enough that seeing one is not evidence the coin is rigged. Undo removes only the most recent run from the local history, and Clear wipes history and resets counters while leaving the flip count and weight settings untouched.