Arithly

← All topics

Binomial Distribution Calculator

When the same trial is repeated and you count the successes — heads in 10 coin tosses, defective items in a sample of 20, correct guesses on a quiz — the count X follows a binomial distribution, written X ~ B(n, p). This calculator finds the probability of exactly k successes, the cumulative probability of at most or at least k, and the distribution’s mean and standard deviation, showing every step in exact fractions. Pick a mode and press the buttons; there is almost nothing to type. For the topic taught in full, see the Binomial distribution lesson; or ask the question in your own words on the Arithly home page — hints first, then the whiteboard. Free, no sign-up.

P(X = k) = C(n, k) pk (1 − p)n−k: one exact count of successes.

The result appears here as you change the numbers.

The binomial formula

The probability of exactly k successes in n trials is

P(X = k) = C(n, k) × pk × (1 − p)n−k

When the binomial model applies

X ~ B(n, p) is the right model only when all four of these conditions hold:

Sampling without replacement from a small group breaks the last two conditions (the chances change after each draw) — that is a different distribution, and this calculator does not use it.

How the calculator works

Every answer can be checked in words: the Solve box solves the same questions with hints and a whiteboard, and the three worked examples below are its own output, word for word.

Think first

Arithly gives hints before the answer. For the first worked example below, the hints are:

Worked examples

A basketball player makes 80% of her free throws. She takes 10 free throws. Find the probability that she makes exactly 7

  1. X counts the number of successes in n independent trials, each with the same success probability p — a BINOMIAL distribution, X ~ B(n, p). Here n = 10 and p = 4/5 (X ~ B(10, 80%)).
  2. The probability of failure on one trial is q = 1 − p = 1 − 4/5 = 1/5.
  3. The binomial formula: P(X = k) = C(n, k) × p^k × q^(n−k) — C(n, k) chooses WHICH k of the n trials succeed, p^k is the k success factors multiplied together, and q^(n−k) is the failure factors for the remaining trials.
  4. Choosing which 7 trials succeed is the same as choosing which 3 fail, so C(10, 7) = C(10, 3) — work with the smaller number, 3.
  5. C(10, 7) = (10 × 9 × 8) / (3 × 2 × 1) — the falling product of 3 factors over 3!. Cancel common factors BEFORE multiplying out.
  6. Cancelling: 9 ÷ 3 = 3 (the 3 below cancels into the 9 above); 10 ÷ 2 = 5 (the 2 below cancels into the 10 above). This leaves 5 × 3 × 8.
  7. C(10, 7) = 5 × 3 × 8 = 120.
  8. The success factors: p^7 = (4/5)^7 = 16384/78125. The failure factors: q^3 = (1/5)^3 = 1/125.
  9. Multiply the three parts: P(X = 7) = 120 × 16384/78125 × 1/125 = 1966080/9765625 = 393216/1953125.

Answer: 393216/1953125 (≈ 0.2013)

Try it in the calculator above: mode Exactly k, n = 10, p = 80% (type it as 0.8 or 80%), k = 7 — the same answer, worked the same way.

A fair coin is tossed 8 times. What is the probability of getting at most 2 heads?

  1. X counts the number of successes in n independent trials, each with the same success probability p — a BINOMIAL distribution, X ~ B(n, p). Here n = 8 and p = 1/2 (a fair coin tossed 8 times (success = the face asked about)).
  2. The probability of failure on one trial is q = 1 − p = 1 − 1/2 = 1/2.
  3. The binomial formula: P(X = k) = C(n, k) × p^k × q^(n−k) — C(n, k) chooses WHICH k of the n trials succeed, p^k is the k success factors multiplied together, and q^(n−k) is the failure factors for the remaining trials.
  4. The asked range is X from 0 to 2 — add the probability of EACH count in the range (each term uses the same binomial formula):
  5. P(X = 0) = 1/256; P(X = 1) = 1/32; P(X = 2) = 7/64.
  6. Add them: P(X ≤ 2) = 37/256.

Answer: 37/256

That one is mode Cumulative with At most k: n = 8, p = 0.5, k = 2.

Find the mean and standard deviation of a binomial distribution with n = 20 and p = 0.4

  1. In a binomial distribution X ~ B(n, p): n is the number of independent trials and p is the probability of success on each trial. Here n = 20 and p = 2/5 (X ~ B(20, 0.4)).
  2. The failure probability is q = 1 − p = 1 − 2/5 = 3/5 — q is the probability that a trial does NOT succeed.
  3. Mean = np — the number of trials times the success probability: mean = 20 × 2/5 = 8.
  4. Variance = npq: variance = 20 × 2/5 × 3/5 = 24/5.
  5. Standard deviation = √variance: SD ≈ 2.1909.

Answer: Mean = 8; Standard deviation ≈ 2.1909

And that one is mode Mean & standard deviation: n = 20, p = 0.4.

Ask it in words

Every shape below is one the Arithly Solve box answers today, with the same hints, steps and checking as the examples above:

Honest notes: exact probabilities are worked for up to 30 trials and cumulative ones for up to 20 — the same limits as the solver, because every answer is added up exactly rather than rounded from a table. Counts of failures (“at least one failure”) and draws without replacement are different questions and are not quietly answered as if they were this one; for large n the usual next step is the normal approximation, a separate topic.

Practice

Each question opens in the Arithly solver — try it yourself first, then compare:

Related topics

Binomial distribution

The topic taught as a lesson: the formula built up from coin tosses, a worked example and the mean and variance.

Probability Calculator

One event, complements, two events and repeated trials — exact fractions with steps.

Z-Score Calculator

Turn a value into a z-score, a z-score back into a value, and read off its percentile.

Permutations and combinations

C(n, k) itself: choosing which trials succeed is a combination — order does not matter.

More topics: all maths topics · Next topic: Integer Calculator

Arithly — free maths help, hints first. About · Privacy · Licence (CC BY-NC 4.0)