Probability of Neither Event Calculator
The probability of neither event calculator finds the chance that event A does not occur and event B does not occur.
Run — free
Enter P(A), P(B), and their intersection P(A and B) as decimals from zero to one. The calculator first uses the general addition rule to find the probability that at least one event occurs, then takes its complement. It works whether the events overlap or are mutually exclusive, validates every supplied probability, and returns the union and neither-event probabilities alongside the formula used, making the result easy to check or pass into another calculation.
Understand what the probability of neither means
The phrase neither event describes outcomes outside both event A and event B. It does not mean that exactly one event fails; it means A fails and B fails together. On a Venn diagram, this is the region outside the two circles. The simplest route to that region is through the complement rule. First calculate the probability of the union, P(A or B), which covers every outcome where A occurs, B occurs, or both occur. Then subtract that union probability from one. The result is P(neither A nor B). Because the two event circles may overlap, adding P(A) and P(B) directly can count their shared region twice. The intersection P(A and B) corrects that double counting. The full expression is therefore P(neither) = 1 − P(A) − P(B) + P(A and B). This calculator applies that general expression, so it does not assume that the events are independent or mutually exclusive. Those are special relationships, and neither is required when the intersection is known.
Enter valid probabilities and read the result
Provide all three inputs as decimal probabilities on the closed interval from zero through one. For example, enter forty percent as 0.4, five percent as 0.05, an impossible event as 0, and a certain event as 1. P(A and B) must describe the chance that both named events occur in the same experiment, population, and time frame as P(A) and P(B). The calculator validates that each value is finite and within the probability range. It also rejects impossible combinations: an intersection cannot exceed either individual event, and the resulting union cannot exceed one. After validation, the response repeats the accepted inputs, reports P(A or B), reports P(neither), and includes the formula. Suppose P(A) is 0.4, P(B) is 0.3, and P(A and B) is 0.1. The union is 0.4 + 0.3 − 0.1 = 0.6, leaving a neither probability of 0.4. Multiply a decimal result by one hundred if you need a percentage for a report or presentation.
Avoid common assumptions about overlap
Do not replace the supplied intersection with zero unless the events truly cannot happen together. Setting it to zero treats A and B as mutually exclusive and can understate the probability of neither when overlap actually exists. Likewise, do not multiply P(A) by P(B) unless the events are known to be independent. Independence gives P(A and B) = P(A) × P(B), but many real events influence or share causes with one another. When a table, survey, experiment, or problem statement provides the intersection directly, use that value. The output can support risk analysis, quality control, survey summaries, classroom exercises, and automated decision rules, but its interpretation still depends on well-defined events. Check that A and B use the same sample space and that “and” means simultaneous membership rather than a sequence with changing conditions. Boundary answers are valid: a result of zero means at least one event always occurs, while a result of one means neither event ever occurs. For automated use, the API charge is $0.002 per request, and the deterministic calculation uses no external data or estimation.
What you can do with it
Complete a probability exercise
Apply the complement and addition rules without accidentally double-counting the intersection of two events.
Summarize survey responses
Find the share of respondents selecting neither option when the two option rates and their overlap are known.
Automate a risk calculation
Return the chance that neither of two monitored conditions occurs and reject invalid probability inputs before downstream use.
FAQ
What formula calculates the probability of neither event?
Use P(neither) = 1 − P(A) − P(B) + P(A and B). This is the complement of the general addition rule.
Why is P(A and B) added back?
Adding P(A) and P(B) counts their overlap twice. Subtracting the union from one therefore requires adding the intersection back once.
Do A and B have to be independent?
No. The calculator uses the intersection you provide and makes no independence assumption.
What happens when an input is outside zero to one?
The request returns an invalid input error because a probability cannot be below zero or above one.
What does an API calculation cost?
The API price is $0.002 per request.
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/stat/probability-neither \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"p_a":0.4,"p_b":0.3,"p_a_and_b":0.1}'const res = await fetch("https://api.kit.forhosting.com/stat/probability-neither", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"p_a": 0.4,
"p_b": 0.3,
"p_a_and_b": 0.1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/stat/probability-neither",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"p_a": 0.4,
"p_b": 0.3,
"p_a_and_b": 0.1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/stat/probability-neither", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"p_a":0.4,"p_b":0.3,"p_a_and_b":0.1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"p_a":0.4,"p_b":0.3,"p_a_and_b":0.1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/stat/probability-neither", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"p_a": 0.4,
"p_b": 0.3,
"p_a_and_b": 0.1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "stat.probability_neither",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |