Clopper-Pearson Exact Confidence Interval Calculator
Seven successes out of 10 give an estimate of 0.7 and an exact 95 percent interval stretching from just over a third to above nine tenths. Exact binomial tails replace the normal approximation, so small samples stay meaningful. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Successes
- 7
- Size
- 10
- Confidence
- 0.95
- Estimate
- 0.7
- Lower
- 0.3475471499
- Upper
- 0.9332604888
The Clopper-Pearson exact interval calculator finds a two-sided confidence interval for a binomial proportion from the observed number of successes, the total sample size, and a chosen confidence level. It uses exact binomial tail inversion rather than a normal approximation, so it remains meaningful for small samples and results near zero or one.
Enter the binomial result and confidence level
Provide successes as the count of observations that meet your chosen condition and size as the total number of independent Bernoulli trials. Successes must be an integer from zero through the sample size, while size must be a positive integer. Enter confidence as a decimal strictly between zero and one; for example, use 0.95 for a 95 percent interval.
The definition of success must be fixed before interpreting the output. A passed inspection, a response to a campaign, or a detected event can each be a success, provided every trial uses the same rule. The returned estimate is successes divided by size.
They are proportions between zero and one, not percentages. Multiply them by one hundred only when presenting the result as a percentage.
Understand what exact means in this calculation
The interval is obtained by inverting two binomial tail tests. The word exact refers to coverage under the binomial model, not to an assertion that the unknown proportion must lie inside this particular interval. Clopper-Pearson intervals are usually conservative: their actual long-run coverage can exceed the requested confidence because discrete binomial outcomes do not permit every coverage value exactly.
That extra coverage commonly makes the interval wider than Wilson, Jeffreys, or likelihood-based alternatives. Use the method when guaranteed minimum coverage is more important than obtaining the narrowest interval.
How to read and report the interval
Read the result as a procedure with a long-run coverage property. If the same sampling process were repeated and a new interval calculated each time, at least the stated confidence proportion of those intervals would cover the fixed underlying success probability under the binomial assumptions. Do not say that the returned interval assigns that probability to the parameter after observing the data; that is a Bayesian interpretation and requires a prior distribution.
Also check whether the trials are genuinely comparable and sufficiently independent. Clustered observations, repeated measurements on the same subject, changing test conditions, or selection bias can invalidate a binomial interval even when the arithmetic is flawless. Keeping those inputs beside the interval makes the calculation auditable.
The algorithm is deterministic and does not send data to any external service.
What you can do with it
Quality-control pass rate
Report an exact interval around the proportion of inspected items that passed a fixed acceptance test.
Clinical response summary
Describe uncertainty around a binary response count when the cohort is small or the observed rate is near a boundary.
Experiment conversion rate
Create a conservative interval for conversions out of eligible trials without relying on a normal approximation.
FAQ
Can successes exceed size?
No. The capability returns an invalid-input error because a success count cannot be larger than the total number of trials.
How should I enter 95 percent confidence?
Enter 0.95. Confidence must be a finite decimal strictly between zero and one.
Why is the Clopper-Pearson interval wider than Wilson or Jeffreys?
Because it is conservative: its long-run coverage can exceed the confidence you ask for, since discrete binomial outcomes cannot hit every coverage value exactly. Choose it when a guaranteed minimum coverage matters more than the narrowest interval.
What happens with zero successes or with every trial a success?
With no successes the lower bound is exactly zero, and when every trial succeeds the upper bound is exactly one. The method handles both edges without the problems a bell-curve approximation has there.
Does a 95 percent interval mean a 95 percent chance the true proportion is inside?
No. It describes the procedure: if the sampling were repeated, at least that share of intervals would cover the fixed true proportion. Giving the parameter a probability after seeing the data is a Bayesian reading that needs a prior.
Related tools
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/clopper-pearson \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"successes":7,"size":10,"confidence":0.95}'const res = await fetch("https://api.kit.forhosting.com/stat/clopper-pearson", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"successes": 7,
"size": 10,
"confidence": 0.95
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/stat/clopper-pearson",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"successes": 7,
"size": 10,
"confidence": 0.95
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/stat/clopper-pearson", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"successes":7,"size":10,"confidence":0.95}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"successes":7,"size":10,"confidence":0.95}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/stat/clopper-pearson", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"successes": 7,
"size": 10,
"confidence": 0.95
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "stat.clopper_pearson",
"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. |
Technical notes
The response includes the observed proportion and both interval endpoints in a compact, reusable form for reports, validation workflows, experiments, and quality-control decisions.
Enter the binomial result and confidence level
The lower and upper fields are the endpoints of the equal-tailed Clopper-Pearson interval. If successes exceeds size, the request is rejected because that observation cannot arise from a binomial sample.
Understand what exact means in this calculation
For an interior result, the lower endpoint is a beta-distribution quantile with shape parameters based on the success and failure counts, and the upper endpoint uses the complementary pair of shapes. When there are no successes, the lower endpoint is exactly zero. When every trial succeeds, the upper endpoint is exactly one. This construction does not rely on the bell-curve approximation that can behave poorly with limited data or an estimated proportion near a boundary.
Interpret and report the endpoints responsibly
In a report, state the success count, sample size, confidence level, observed proportion, method name, and both endpoints. The browser calculation is free, while an automated API request uses the published base price of $0.002.
Technical questions
What does the calculator return?
It returns the observed proportion and the lower and upper endpoints of a two-sided, equal-tailed Clopper-Pearson exact confidence interval.
Can successes be zero or equal the sample size?
Yes. With zero successes the lower endpoint is zero, and with all successes the upper endpoint is one.
What does an API calculation cost?
Each API request uses the base price $0.002; the same deterministic calculation is available free in the browser.