Code tool

Bayes Theorem Calculator

Enter a prior probability and the likelihood of evidence under each hypothesis; the result uses Bayes’ theorem with explicit inputs.

In-browser processingNo account requiredPrivacy details ↗

Enter values from 0 to 100. H and not H are treated as the only two hypotheses.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter P(H), the prior probability of the hypothesis.
  2. Enter P(E|H) and P(E|not H), the evidence likelihoods.
  3. Calculate the posterior and review the assumptions.

Explicit assumptions

The calculator treats H and not H as the only two mutually exclusive, exhaustive hypotheses. It treats E and not E as complementary evidence outcomes and uses only the probabilities you enter.

Bounded probabilities

Every input is a percentage from 0 to 100. The denominator must be positive; rounding is for display only.

GOOD TO KNOW

Common questions

Does it choose a prior for me?

No. Enter the prior probability that matches your context.

What does the second likelihood mean?

It is P(E|not H): the probability of seeing the same evidence when the hypothesis is false.

Can I enter percentages?

Yes. Enter values from 0 to 100; the calculator converts them to probabilities locally.