ForHosting KIT · Math

Three events probability calculator

For the classic set with P(A) of 0.5, P(B) of 0.4 and P(C) of 0.3, plus their overlaps, the chance that at least one occurs is 0.8. Enter all seven probabilities to get the union and the chance of none, with no independence assumed. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
P a
0.5
P b
0.4
P c
0.3
P ab
0.2
P ac
0.15
P bc
0.1
You get
P union
0.8
P union string
0.8
P none
0.2
P none string
0.2

The chance that at least one of three named events occurs is not the sum of their individual probabilities. Adding the three figures double-counts every pairwise overlap and then under-counts the region where all three events happen together. Inclusion-exclusion repairs that: add the three singles, subtract the three pairwise intersections, and add back the triple intersection. This calculator accepts those seven probabilities, checks that each lies in the closed unit interval and that the joints respect elementary Fréchet-style bounds, and returns the union P(A ∪ B ∪ C) together with the complementary probability that none of the three events occurs.

What inclusion-exclusion computes for three events

In a probability space the union of three events A, B, and C is the set of outcomes that belong to at least one of them. Naively adding P(A), P(B), and P(C) counts every outcome in a pairwise intersection twice and every outcome in the triple intersection three times, so the sum is not a probability of a union.

The inclusion-exclusion identity undoes that overcount in two corrections: first subtract the three pairwise joints P(A ∩ B), P(A ∩ C), and P(B ∩ C), which removes the extra copy of each two-set overlap; then add back P(A ∩ B ∩ C), because the triple region was added three times and subtracted three times and would otherwise vanish.

The compact formula is P(A ∪ B ∪ C) equals P(A) plus P(B) plus P(C) minus P(A ∩ B) minus P(A ∩ C) minus P(B ∩ C) plus P(A ∩ B ∩ C). The complementary event that none of the three occurs has probability one minus that union. Mutual exclusivity is the special case in which every intersection is zero and the union collapses to a plain sum.

Independence is a different special case in which each joint factors as a product of the corresponding individuals. This tool does not assume either special case: it uses the joints you supply, so dependent classroom examples and overlapping failure modes compute correctly.

Who needs the chance of at least one of three

Classrooms and tutoring platforms use a three-event probability calculator so learners can check inclusion-exclusion homework without flipping a sign on the triple term. Exam-prep generators need a deterministic oracle that rejects a probability of 1.2 instead of silently clipping it, so a buggy grader cannot treat an impossible input as a successful zero.

Reliability and safety write-ups often start from three overlapping failure modes—sensor A, sensor B, and a common-cause alarm C—and need P(at least one fires) from calibrated rates and measured pairwise overlaps rather than an independence assumption that the data contradict. Product analytics teams convert reported rates (share of users who saw campaign A, campaign B, or campaign C) into a formal union when the reporting tool already gives pairwise and triple overlap cells. Failed validation does not consume balance.

Do not confuse this landing with a conditional-probability tool that divides a single joint by one marginal, or with a Bayes updater that takes likelihoods; here you already know the seven masses and only need the inclusion-exclusion union.

Overlapping failure-mode risk

Combine three instrumented failure rates and their measured pairwise and triple overlaps into P(at least one failure) without assuming independence.

Campaign and feature reach

Turn reported audience sizes and overlap cells for three campaigns or product flags into the share of users reached by at least one of them.

What formula does the three-event calculator use?

Inclusion-exclusion: P(A ∪ B ∪ C) = P(A)+P(B)+P(C) − P(A ∩ B) − P(A ∩ C) − P(B ∩ C) + P(A ∩ B ∩ C). The response also returns 1 minus that union as the probability that none of the three events occurs.

Why do I have to send the triple intersection P(A ∩ B ∩ C)?

The last term of inclusion-exclusion is the triple joint. Omitting it would under-count or over-count the region where all three events occur.

Can pairwise joints be larger than the individual probabilities?

No. P(A ∩ B) cannot exceed the smaller of P(A) and P(B), and it cannot fall below max(0, P(A)+P(B)−1). The same Fréchet bounds apply to the other pairs and to the triple versus the pairwise joints.

Why can't I just add the three probabilities?

Because every pairwise overlap is counted twice and the triple overlap three times. With 0.5, 0.4 and 0.3 the plain sum is 1.2, which is not even a probability; inclusion-exclusion removes the extra copies.

Can I use it for independent events?

Yes. The tool does not assume any relationship, so enter each pairwise and triple overlap as the product of the matching single probabilities, and the union follows from those numbers.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/stat/probability-three-events

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/stat/probability-three-events \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"p_a":0.5,"p_b":0.4,"p_c":0.3,"p_ab":0.2,"p_ac":0.15,"p_bc":0.1,"p_abc":0.05}'
{
  "p_a": 0.5,
  "p_b": 0.4,
  "p_c": 0.3,
  "p_ab": 0.2,
  "p_ac": 0.15,
  "p_bc": 0.1,
  "p_abc": 0.05
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "stat.probability_three_events",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Invalid probabilities are rejected with invalid_input and are not billed.

Input contract, response shape, and error behaviour

Classic check: P(A)=0.5, P(B)=0.4, P(C)=0.3, P(A ∩ B)=0.2, P(A ∩ C)=0.15, P(B ∩ C)=0.1, and P(A ∩ B ∩ C)=0.05 yields P(A ∪ B ∪ C)=0.8 and P(none)=0.2. POST a JSON body with seven required numbers, each in the closed interval from zero to one. Field p_a is P(A); aliases pA, pa, P_A, and prob_a are accepted. Field p_b is P(B) with aliases pB, pb, P_B, and prob_b. Field p_c is P(C) with aliases pC, pc, P_C, and prob_c. Field p_ab is the pairwise joint P(A ∩ B); aliases pAB, ab, and intersection_ab map to the same meaning. Field p_ac is P(A ∩ C) with aliases pAC, ac, and intersection_ac. Field p_bc is P(B ∩ C) with aliases pBC, bc, and intersection_bc. Field p_abc is the triple intersection P(A ∩ B ∩ C); aliases pABC, abc, triple, and intersection_abc work interchangeably. A successful response echoes the seven inputs and returns p_union (the IEEE double for the union), p_union_string for stable display, p_none and p_none_string for the complementary probability that none of the three events occurs, percent equal to one hundred times the union, and a formula string restating inclusion-exclusion. Any value outside [0, 1], a missing field, a pairwise joint outside its Fréchet interval, a triple that exceeds the smallest pairwise joint, or a combination whose union would leave [0, 1] fails with invalid_input naming the problem; those failures are not charged. Pricing is a flat $0.002 per successful request.

Where a three-event union API earns its keep

Pin p_union_string in tests when you need stable printed digits, and use the numeric field when you chain further arithmetic.

Classroom inclusion-exclusion checks

Give students P(A), P(B), P(C), the three pairwise joints, and the triple, then verify their union and complementary none-of-the-three answer against a deterministic API or free browser result.

What happens if a probability is outside 0 to 1?

The task fails with invalid_input naming the field. A number below 0 or above 1 is not a probability, so the call is rejected and is not billed.

What does the three-event probability calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →