{
    "name": "Probability Calculator",
    "url": "https://calculators.geekmidst.com/calculators/probability-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/probability-calculator.md",
    "category": "Statistics & probability",
    "description": "Find the probability of A and B, A or B, exactly one, neither, and of A happening at least once in several tries, for independent events.",
    "summary": "Enter the chances of two independent events as decimals, fractions or percentages to combine them, and see how likely A is over repeated tries.",
    "also_called": [
        "Independent events calculator"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "pa",
            "label": "Probability of A, P(A)",
            "type": "text",
            "default": "1/6"
        },
        {
            "name": "pb",
            "label": "Probability of B, P(B)",
            "type": "text",
            "default": "1/6"
        },
        {
            "name": "trials",
            "label": "Number of tries for A",
            "type": "number",
            "default": "4"
        }
    ],
    "outputs": [
        {
            "key": "both",
            "label": "A and B both happen",
            "format": "percent"
        },
        {
            "key": "either",
            "label": "A or B (at least one)",
            "format": "percent"
        },
        {
            "key": "exactly_one",
            "label": "Exactly one of A and B",
            "format": "percent"
        },
        {
            "key": "neither",
            "label": "Neither happens",
            "format": "percent"
        },
        {
            "key": "not_a",
            "label": "A does not happen",
            "format": "percent"
        },
        {
            "key": "not_b",
            "label": "B does not happen",
            "format": "percent"
        },
        {
            "key": "a_at_least_once",
            "label": "A at least once in the tries",
            "format": "percent"
        },
        {
            "key": "a_every_time",
            "label": "A on every try",
            "format": "percent"
        }
    ],
    "formula": {
        "text": "P(A and B) = P(A)·P(B);  P(A or B) = P(A) + P(B) − P(A)·P(B);  P(neither) = (1 − P(A))(1 − P(B));  P(A at least once in n) = 1 − (1 − P(A))ⁿ",
        "variables": {
            "P(A), P(B)": "probabilities of the two independent events",
            "n": "number of independent tries"
        }
    },
    "worked_example": {
        "inputs": {
            "pa": "1/6",
            "pb": "1/6",
            "trials": "4"
        },
        "steps": [
            "Two dice both showing six: 1/6 × 1/6 = 1/36 ≈ 2.78%.",
            "At least one six on two dice: 1/6 + 1/6 − 1/36 = 11/36 ≈ 30.56%.",
            "At least one six in 4 rolls: 1 − (5/6)⁴ = 1 − 625/1296 ≈ 51.77%."
        ],
        "result": "Rolling at least one six in four throws is slightly better than even, at about 51.8%."
    },
    "interpretation": "Small chances add up over repeated tries: an event with a 1% chance each time has about a 63% chance of happening at least once in 100 independent tries.",
    "assumptions": [
        "A and B are independent: one happening does not change the chance of the other. Repeated tries are independent too."
    ],
    "limitations": [
        "For dependent events (drawing cards without replacement, for example), P(A and B) = P(A) × P(B given A), which this calculator does not model."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "Why do I subtract P(A and B) for “A or B”?",
            "answer": "Adding P(A) and P(B) counts the cases where both happen twice, so one copy is removed."
        },
        {
            "question": "Is this the famous de Méré problem?",
            "answer": "Yes: the 17th-century gambler Chevalier de Méré noticed that “at least one six in four rolls” wins slightly more than half the time, which this example confirms at 51.77%."
        }
    ],
    "sources": [],
    "related": [
        {
            "name": "Permutation and Combination Calculator",
            "url": "https://calculators.geekmidst.com/calculators/permutation-and-combination-calculator"
        },
        {
            "name": "Random Number Generator",
            "url": "https://calculators.geekmidst.com/calculators/random-number-generator"
        },
        {
            "name": "Percentage Calculator",
            "url": "https://calculators.geekmidst.com/calculators/percentage-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}