Scientific Converters Precise unit conversions for science & engineering.

    Loading…

    Bayes’ Theorem Calculator

    Bayes’ theorem updates a prior with evidence: a positive result from a 95 %-sensitive test for a 1 % disease means only 0.161016949153 chance of having it.

    Hypotheses:

    e.g. disease prevalence

    e.g. test sensitivity

    e.g. false-positive rate (1 − specificity)

    P(A | B) =

    0.161016949152542

    Full answer, then cut to fewer decimals (not rounded):

    • 0.161016949152542
    • 0.16101694915254
    • 0.1610169491525
    • 0.161016949152
    • 0.16101694915
    • 0.1610169491
    • 0.161016949
    • 0.16101694
    • 0.1610169
    • 0.161016
    • 0.16101
    • 0.1610
    • 0.161
    • 0.16
    • 0.1
    P(B) (total probability)
    0.059
    P(not A | B)
    0.8389830508
    Bayes table
    HypothesisPriorLikelihoodPrior × likelihoodPosterior
    A0.010.950.00950.16101695
    not A0.990.050.04950.83898305
    Step-by-step solution
    1. P(B) = Σ P(Hᵢ)·P(B|Hᵢ) = 0.059
    2. P(H₁|B) = P(H₁)·P(B|H₁) ÷ P(B) = 0.0095 ÷ 0.059 = 0.16101695

    Bayes’ Theorem Formula

    P(A|B) = P(A)·P(B|A) ÷ P(B)

    P(B) = Σ P(Hᵢ)·P(B|Hᵢ) (total probability)

    Worked Example

    A disease with 1 % prevalence and a test with 95 % sensitivity and 5 % false positives:

    1. P(B) = Σ P(Hᵢ)·P(B|Hᵢ) = 0.059
    2. P(H₁|B) = P(H₁)·P(B|H₁) ÷ P(B) = 0.0095 ÷ 0.059 = 0.16101695

    P(not A | B): 0.8389830508

    Bayes table
    HypothesisPriorLikelihoodPrior × likelihoodPosterior
    A0.010.950.00950.16101695
    not A0.990.050.04950.83898305

    GATE tip

    The “three machines produce 50 %, 30 % and 20 % of items with 2 %, 3 % and 5 % defects” question is the classic GATE Bayes problem; use the table mode with those numbers.

    More Probability and Complex Variables Calculators

    Frequently asked questions

    Why is the posterior so low for a rare disease?

    Most positives come from the many healthy people: 5 % of 99 % is far more than 95 % of 1 %, so P(disease | positive) is only about 16 %.

    How does the total probability theorem fit in?

    It gives the denominator: P(B) = Σ P(Hᵢ)P(B|Hᵢ), the probability of the evidence across all hypotheses.

    Sources

    Last reviewed: . Factors are stored exactly and computed with 50-digit decimal arithmetic. See how we verify conversion factors.

    Cite this page

    APA

    Scientific Converters. (2026, October 15). Bayes’ Theorem Calculator. Retrieved October 25, 2026, from https://scientificconverters.com/calculators/bayes-theorem-calculator/

    IEEE

    Scientific Converters, "Bayes’ Theorem Calculator," scientificconverters.com. Accessed: Oct. 25, 2026. [Online]. Available: https://scientificconverters.com/calculators/bayes-theorem-calculator/

    Send feedback

    Found a wrong value, a missing unit or an idea? Tell us. We read every message.

    What is it about?

    We store your message, the page you were on and your email if given. See the privacy policy.