ForHosting KIT · Developer Utilities

Probability Exactly One Event Calculator

The probability exactly one event calculator finds the chance that event A occurs without event B, or event B occurs without event A.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter P(A), P(B), and their intersection P(A and B) as decimal probabilities from zero to one. The calculator removes the shared outcomes from both event probabilities, returns each exclusive part, and adds them to produce the final result. It works for dependent, independent, overlapping, or mutually exclusive events because it uses the intersection you supply instead of assuming a relationship.

Understand what exactly one event means

Exactly one event means A occurs and B does not, or B occurs and A does not. It excludes outcomes where neither event occurs and outcomes where both occur together. On a Venn diagram, the desired region consists of the two nonoverlapping crescents, not the shared center. Start with P(A), but remove P(A and B) to obtain P(A only). Do the same with P(B) to obtain P(B only). Because those two exclusive regions cannot overlap, their probabilities can then be added. Combining the steps gives P(exactly one) = P(A) + P(B) − 2 × P(A and B). The intersection is subtracted twice because it appeared once inside each marginal probability, while it must appear zero times in the answer. This differs from the probability of at least one event, where the intersection is subtracted only once and remains included. It also differs from an exclusive-or statement written casually in everyday language, where the intended treatment of both events may be unclear. This calculator uses the strict probability definition: one event occurs, and only one.

Enter valid probabilities and interpret the output

Provide all three inputs as finite decimal numbers in the closed interval from zero to one. Write sixty percent as 0.6 and five percent as 0.05; do not enter a percent sign or a whole-number percentage. The intersection must describe both events occurring in the same experiment, population, and time period used for the two marginal probabilities. A valid intersection cannot exceed P(A) or P(B), because shared outcomes are contained within each event. It also cannot be so small that P(A or B) would exceed one. The calculator checks these probability rules rather than returning a plausible-looking number from an impossible combination. The response repeats the accepted inputs and reports P(A only), P(B only), and P(exactly one), followed by the formula. For example, if P(A) is 0.6, P(B) is 0.5, and P(A and B) is 0.2, then P(A only) is 0.4 and P(B only) is 0.3. Adding the exclusive parts gives 0.7. Boundary values are valid: an answer of zero means there are no outcomes belonging to only one event, while an answer of one means exactly one of the events always occurs.

Use the supplied intersection without hidden assumptions

The calculation does not require A and B to be independent. Independence is a specific relationship that would let you derive the intersection as P(A) × P(B), but this capability deliberately accepts P(A and B) directly. Use the intersection stated by your table, experiment, survey, model, or exercise. Likewise, do not set the intersection to zero unless the events truly are mutually exclusive. Doing so when overlap exists inflates the exactly-one probability because shared outcomes are incorrectly assigned to both exclusive regions. Before automating a calculation, confirm that all three values use the same denominator and event definitions. A monthly risk and an annual risk, or proportions taken from different populations, do not form a meaningful set merely because each number is individually between zero and one. The result can support survey segmentation, reliability studies, medical test summaries, quality-control rules, and probability coursework, but it describes only the events you define. It does not infer causation or dependence. The deterministic calculation uses no outside data, network calls, randomness, or estimation. Browser use is free, while an automated API request costs $0.002; repeated identical inputs therefore always produce the same output.

Segment survey respondents

Find the share who selected exactly one of two options when both individual rates and their overlap are known.

Calculate exclusive risk

Measure the chance that exactly one of two monitored conditions occurs without assuming the conditions are independent.

Check probability coursework

Apply the exclusive-event formula and inspect the separate A-only and B-only components of the answer.

What is the formula for exactly one of two events?

Use P(exactly one) = P(A) + P(B) − 2 × P(A and B).

Why is the intersection subtracted twice?

The intersection is included once in P(A) and once in P(B), but outcomes where both events occur must be excluded completely.

Do A and B need to be independent?

No. The calculator uses the intersection you provide and makes no independence assumption.

What happens when a probability is outside zero to one?

The request returns an invalid input error because a probability cannot be below zero or above one.

How much does the API calculation cost?

The API price is $0.002 per request.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/stat/probability-exactly-one

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/stat/probability-exactly-one \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"p_a":0.6,"p_b":0.5,"p_a_and_b":0.2}'
{
  "p_a": 0.6,
  "p_b": 0.5,
  "p_a_and_b": 0.2
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "stat.probability_exactly_one",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →