ForHosting KIT · Developer Utilities

Clopper-Pearson Exact Confidence Interval Calculator

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.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

It uses exact binomial tail inversion rather than a normal approximation, so it remains meaningful for small samples and results near zero or one. 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

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. The lower and upper fields are the endpoints of the equal-tailed Clopper-Pearson interval. They are proportions between zero and one, not percentages. Multiply them by one hundred only when presenting the result as a percentage. If successes exceeds size, the request is rejected because that observation cannot arise from a binomial sample.

Understand what exact means in this calculation

The interval is obtained by inverting two binomial tail tests. 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. 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.

Interpret and report the endpoints responsibly

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. In a report, state the success count, sample size, confidence level, observed proportion, method name, and both endpoints. Keeping those inputs beside the interval makes the calculation auditable. The browser calculation is free, while an automated API request uses the published base price of $0.002. The algorithm is deterministic and does not send data to any external service.

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.

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.

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.

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.

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/clopper-pearson

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/clopper-pearson \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"successes":7,"size":10,"confidence":0.95}'
{
  "successes": 7,
  "size": 10,
  "confidence": 0.95
}
{
  "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.

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 →