Probability calculator

The core probability identities, evaluated at once so you can see how they relate.

%
%
%
Probability of A or B
58.0000%
= Exact Probability of events
Probability of neither
42.0000 %
Probability of A given B
30.0000 %
Probability of B given A
40.0000 %
Probability of A but not B
18.0000 %
What both would be if independent
12.0000 %
Show the working
  1. Probability of A = 30
  2. Probability of B = 40
  3. Probability of both = 12
  4. a = 30 / 100 = 0.3
  5. b = 40 / 100 = 0.4
  6. both = 12 / 100 = 0.12
  7. Probability of A or B = (0.3 + 0.4 - 0.12) * 100 = 58
  8. Probability of neither = 100 - 58 = 42
  9. Probability of A given B = 0.4 > 0 ? 0.12/0.4*100 : 0 = 30
  10. Probability of B given A = 0.3 > 0 ? 0.12/0.3*100 : 0 = 40
  11. What both would be if independent = 0.3 * 0.4 * 100 = 12
  12. Probability of A but not B = (0.3 - 0.12) * 100 = 18

Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.

Scenarios & local history

Compare a saved scenario

Recent calculations

    The formula

    • P(A or B) = P(A) + P(B) - P(A and B)
    • P(A | B) = P(A and B) / P(B)
    • A and B are independent when P(A and B) = P(A) P(B)

    If the "both" figure equals the independent product, the two events are independent.

    Related calculators

    Settings

    Theme

    System follows your operating system and changes with it.

    Text size
    High contrast

    Maximises text and border contrast and removes the grid background.

    Graph-paper background

    Round to
    Notation
    Thousands separators
    Decimal mark
    Nearest fraction

    Shows the result as the nearest tape-measure fraction, with the error it costs.


    Accessibility & interaction
    Reduce motion Stops interface animations even when the operating system does not.
    Underline links Keeps links visually distinct without relying on colour.
    Larger touch targets Makes buttons and form controls easier to tap.
    Shorter reading lines Limits article width for easier scanning.
    Monochrome display Removes colour as an information cue.
    Always-visible focus Makes the keyboard focus ring persistent and stronger.
    Verbose screen-reader results Announces the complete conversion equation.
    Sticky action bars Keeps converter and calculator actions within reach.
    Select values on focus Replaces a value immediately when you start typing.
    Left-handed mobile layout Moves key mobile actions toward the left thumb.

    Your data

    Settings, recent conversions and favourites live in this browser only. Nothing is sent anywhere.

    Offline library