Statistics

Coin Flip Probability Calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a coin flip probability calculator?

A coin flip probability calculator works out how likely a particular number of heads is when you toss a coin several times. Each toss is an independent trial with two possible outcomes — heads or tails — so a sequence of flips follows the binomial distribution. The calculator answers questions such as “What is the chance of getting exactly 5 heads in 10 flips?” or “What is the chance of at least 2 heads in 3 flips?”.

It works for both fair and biased coins. You set the probability of heads pp to any value between 0 and 1, so the same tool also covers loaded coins, weighted dice with two outcomes, and any other yes/no experiment repeated a fixed number of times.

How does the calculator work?

You provide three inputs and choose what to calculate:

  • Number of flips (nn) — how many times the coin is tossed (an integer 1\ge 1).
  • Number of heads (kk) — the count of heads you are interested in (an integer with 0kn0 \le k \le n).
  • Probability of heads (pp) — the chance of heads on a single toss, between 0 and 1 (0.5 for a fair coin).

The Calculate option selects one of three questions:

  • Exactly k heads — the probability of getting precisely kk heads.
  • At most k heads — the cumulative probability of getting kk or fewer heads.
  • At least k heads — the cumulative probability of getting kk or more heads.

The result is shown as a probability between 0 and 1 (rounded to six decimal places) and also as a percentage.

Formulas

The probability of exactly kk heads in nn flips is the binomial probability mass function:

P(X=k)=(nk)pk(1p)nkP(X = k) = \binom{n}{k}\, p^{k} (1-p)^{n-k}

where the binomial coefficient is

(nk)=n!k!(nk)!\binom{n}{k} = \frac{n!}{k!\,(n-k)!}

The cumulative cases sum the individual terms:

P(Xk)=i=0k(ni)pi(1p)niP(X \le k) = \sum_{i=0}^{k} \binom{n}{i}\, p^{i} (1-p)^{n-i} P(Xk)=i=kn(ni)pi(1p)niP(X \ge k) = \sum_{i=k}^{n} \binom{n}{i}\, p^{i} (1-p)^{n-i}

Worked examples

  1. Exactly 5 heads in 10 fair flips. With n=10n = 10, k=5k = 5, p=0.5p = 0.5: (105)=252\binom{10}{5} = 252, so P=252×0.55×0.55=252/10240.246094P = 252 \times 0.5^{5} \times 0.5^{5} = 252 / 1024 \approx 0.246094 (about 24.61%).

  2. Exactly 1 head in 2 fair flips. With n=2n = 2, k=1k = 1, p=0.5p = 0.5: (21)=2\binom{2}{1} = 2, so P=2×0.5×0.5=0.5P = 2 \times 0.5 \times 0.5 = 0.5 (50%).

  3. At least 2 heads in 3 fair flips. With n=3n = 3, k=2k = 2, p=0.5p = 0.5: P(X2)=P(2)+P(3)=0.375+0.125=0.5P(X \ge 2) = P(2) + P(3) = 0.375 + 0.125 = 0.5 (50%).

Practical notes

  • Setting k=0k = 0 with “at least” always returns 1, and k=nk = n with “at most” always returns 1, because every outcome satisfies the condition.
  • For a biased coin, change pp. For example, n=5n = 5, k=2k = 2, p=0.3p = 0.3 gives (52)×0.32×0.73=0.3087\binom{5}{2} \times 0.3^{2} \times 0.7^{3} = 0.3087.
  • The binomial model assumes the flips are independent and that pp stays the same on every toss.

To explore related ideas, see the Bayes’ theorem calculator for updating probabilities with evidence, or the average calculator for summarising data.

Report a bug

This field is required.