Skip to content
UniKit

Probability calculator

Exact fraction-based probability: union by inclusion–exclusion, intersection, conditional probability, complements, at-least-once and exactly-once, plus independence and mutual exclusivity checks, dice and urn scenarios.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Result

Union P(A ∪ B) (inclusion–exclusion)2/3 (66.6667%)
Intersection P(A ∩ B) (multiplication rule)1/6 (16.6667%)
Conditional P(A | B)1/2 (50.0000%)
Conditional P(B | A)1/3 (33.3333%)
Complement P(¬A)1/2 (50.0000%)
Complement P(¬B)2/3 (66.6667%)
A only1/3 (33.3333%)
B only1/6 (16.6667%)
Exactly one of them1/2 (50.0000%)
Neither1/3 (33.3333%)
Independent?Yes
Mutually exclusive?No

What this tool does

  • Answer “at least once” questions directly: enter the single-trial probability and read off 1 − (1 − p)ⁿ, for example rolling at least one 6 in four throws.
  • Check conditional probabilities: given P(A), P(B) and P(A ∩ B) you get P(A|B), P(B|A), the complements and “exactly one” without rearranging formulas by hand.
  • Decide how two events relate: whether P(A ∩ B) equals P(A)·P(B) decides independence, and whether it is 0 decides mutual exclusivity.
  • Sampling problems with dice or an urn: the with- and without-replacement models give at-least-once and exactly-once probabilities side by side.

Example

Input

P(A) = 1/2, P(B) = 1/3, P(A ∩ B) = 1/6

Output

P(A ∪ B) = 2/3 (66.6667%), P(A | B) = 1/2 (50.0000%), exactly one = 1/2 (50.0000%), neither = 1/3 (33.3333%), independent: yes, mutually exclusive: no

Inputs accept fractions, decimals and percentages — 1/6, 0.25 and 25% all mean the same probability.

Frequently asked questions

Why fractions instead of decimals?

Probabilities are rational, so fractions stay exact: 1/3 + 1/6 is exactly 1/2, while the decimal route gives 0.49999999999999994. The tool keeps reduced BigInt fractions throughout and only converts for display.

Are independent and mutually exclusive the same thing?

No, and for events with non-zero probability they cannot both hold. Mutually exclusive means P(A ∩ B) = 0, so they never happen together. Independent means P(A ∩ B) = P(A)·P(B), which requires a non-zero intersection.

Why not just add up the per-trial probabilities for “at least once”?

Adding double-counts the cases where the event happens more than once. The correct route is the complement: compute the chance of never hitting, (1 − p)ⁿ, and subtract it from 1.

What is the difference between with and without replacement?

With replacement every draw is independent, which is the binomial model. Without replacement the remaining balls change each time, so the hypergeometric model applies; the tool evaluates C(N−K, n)/C(N, n) exactly. A raffle drawn without replacement is slightly more likely to hit than one drawn with replacement.

What if I enter P(A ∩ B) larger than P(A)?

That is impossible — an intersection can never be larger than either event — so the tool reports the inconsistency instead of returning a number. Leave the field empty and it assumes independence, using P(A) × P(B) as the intersection.

Keywords:probabilityconditional probabilityunionintersectionindependent eventsmutually exclusiveat least oncedice probability概率条件概率容斥原理互斥独立事件至少一次

Related tools