Math calculator

Credible Interval Calculator

Where the rate actually is.

Where the rate is

Thirty trials, no successes. The posterior is Beta(1, 31), which piles its mass against zero — and that is where the two interval types part company. The equal-tailed interval runs 0.00082 to 0.11219 because it insists on leaving 2.5% in each tail, including a lower tail containing the single most plausible value. The highest-density interval runs 0 to 0.09211: the same 95% of probability in 17.292% less width.

Beta(1.00, 1.00) + 0 of 30 → Beta(1.00, 31.00)

95% credible: 0.00000 to 0.09211

That is the highest-density interval — the shortest range holding 95% of the posterior. The equal-tailed version runs 0.00082 to 0.11219, which is 17.292% wider for the same probability. The posterior mean is 0.03125 against an observed 0.00000: the prior moved it by 3.125 percentage points and accounts for 6.25% of the evidence.

Posterior mean

0.03125

no interior mode

Highest density

0.0000 to 0.0921

width 0.09211

Equal tailed

0.0008 to 0.1122

17.29% wider

Prior weight

6.25%

moved the estimate 3.125pp

The two intervals differ by 17.29% here because the posterior is skewed. The equal-tailed version leaves exactly 2.5% in each tail whatever the shape, which on a posterior piled against a boundary means excluding the most plausible values in the distribution.

Against the frequentist intervals

The credible interval beside three frequentist confidence intervals
IntervalRangeWidthWhat it claims
Credible (HDI)0.00000 to 0.092110.09211the rate lies here with 95% probability
Jeffreys (Bayesian)0.00000 to 0.079680.07968the rate lies here with this probability
Wilson (frequentist)1.38778e-17 to 0.113510.11351intervals built this way cover the rate this often
Wald (frequentist)0.00000 to 0.000000.00000the same claim, from an approximation that fails near 0 and 1

The numbers are often close and the claims are not the same. A credible interval says where the rate is; a confidence interval says how often intervals built that way would cover it. Only the first supports the sentence most people write when they report either one.

What the prior contributed

The prior, the data and the posterior side by side
SourceSuccessesFailuresImplied rate
Prior1.001.000.50000
Data0300.00000
Posterior1.0031.000.03125

A Beta prior is exactly this readable: α behaves like α successes already seen and β like β failures. Adding the data is addition, which is why no integration is needed anywhere on this page.

Conjugate, no integration HDI and equal-tailed Prior weight reported A probability, not a coverage rate

What this tool shows

At zero successes in thirty, the equal-tailed interval runs 0.00082 to 0.11219 and the highest-density interval runs 0 to 0.09211 — 17.292% shorter for the same 95% of probability. The equal-tailed version insists on leaving 2.5% in each tail whatever the shape, which on a posterior piled against zero means excluding the most plausible value in the distribution. Both are computed here, along with how much of the answer came from the prior.

  • The Beta-Binomial conjugate posterior, with the arithmetic shown as addition
  • Both interval types — highest density and equal tailed — and the gap between them
  • How much of the estimate the prior contributed, in percentage points and as a share
  • Jeffreys, Wilson and Wald intervals on the same data, with what each one claims
  • A preset where the prior is a third of the evidence
  • Why a credible interval supports the sentence a confidence interval does not
Conjugate, exact HDI and equal-tailed Prior weight shown Frequentist contrast

The prior is part of the answer. This page reports how large a part.

Updated 13 September 2026 · Works in any browser, no installation

A credible interval is a range that contains the true rate with a stated probability, given the data and the prior. That is the sentence people write about confidence intervals and it is only true of this one. The cost is a prior: some statement about what was plausible before the data arrived. For a proportion the conjugate Beta makes that statement unusually legible — α behaves like α successes already observed, so its weight can simply be counted.

At a glance

Formula shown
A Beta(α, β) prior with x successes in n trials gives a Beta(α + x, β + n − x) posterior — the update is addition. Its mean is (α + x)/(α + β + n), which always lies between the prior mean and the observed rate. The equal-tailed interval takes the 2.5% and 97.5% quantiles; the highest-density interval instead finds the shortest range holding 95%, which is where the two endpoints share a density. On a symmetric posterior they coincide; on a skewed one they do not.
Scenario support
Reporting a conversion or defect rate with an interval that means what it sounds like, small-sample estimation where the normal approximation fails, combining prior knowledge with new data, and any situation where the question is “where is the rate” rather than “would this procedure cover it often enough”.
Educational estimate
Planning support from the values you enter — not professional advice.

Two ways to take 95%, and they are not the same

Any number of ranges hold 95% of a distribution. The two in common use pick different ones, and on a skewed posterior the difference is large.

The equal-tailed interval leaves 2.5% below and 2.5% above. Simple, standard, and indifferent to where the mass actually is.

The highest-density interval takes the shortest range holding 95%. Its endpoints sit at equal density, so nothing outside it is more plausible than anything inside it.

At 0 of 30 that is 0.00082–0.11219 against 0–0.09211 — 17.292% shorter. The equal-tailed version excludes a lower tail containing the single most plausible value, which is zero.

At 37 of 200 they differ by 0.285%. Which is why the distinction goes unnoticed: on a near-symmetric posterior the two coincide, and most posteriors are near-symmetric.

The prior is a number of observations

The usual objection to Bayesian intervals is that the prior is arbitrary. For a Beta prior it is at least countable, which makes the objection answerable.

Beta(α, β) behaves exactly like α successes and β failures already seen. Beta(1, 1) is two observations. Beta(30, 70) is a hundred.

So its influence is a share: α + β over α + β + n. On the fourth preset that is 33.33%, and it moves the estimate from 0.185 to 0.22333 — 3.833 percentage points.

On 200 trials a flat prior is 0.99% of the evidence and moves the estimate by 0.312 percentage points. On 30 trials it is 6.25%.

That share is printed here rather than left implicit, because “the prior barely mattered” is a claim with a number behind it and the number is usually not looked at.

A flat prior is not the absence of a prior

Beta(1, 1) is uniform on the rate and gets called uninformative. It is informative about something, and the something shows at the boundaries.

It pulls every estimate toward 0.5. Zero successes in thirty gives a posterior mean of 0.03125, not zero.

Which is often what you want — a rate of exactly zero is rarely a sensible estimate from thirty trials — and it is still a choice rather than a neutral default.

Jeffreys’ prior, Beta(0.5, 0.5), is the alternative for genuine ignorance: it is invariant to reparameterisation, which uniform is not, and it pulls less hard at the boundaries.

For a known domain, a weak informative prior beats both. Conversion rates near 5% are better served by something like Beta(2, 40) than by a prior that thinks 90% is as likely as 5%.

The sentence only one of them supports

The credible interval and the confidence interval on this page are often close in value and mean entirely different things.

A credible interval: the rate lies in this range with 95% probability. A statement about the rate, conditional on the data.

A confidence interval: intervals built this way contain the rate 95% of the time. A statement about the procedure, and it says nothing about this particular interval.

Nearly everyone writes the first sentence about the second object. That is the one claim a confidence interval cannot make, and it is the one almost every report makes.

The numbers are close here because a flat prior on a proportion is nearly non-committal — the Jeffreys interval in the table below is both a Bayesian interval and an excellent frequentist one, which is why it exists.

What happens at zero and at one

The boundaries are where interval methods separate, and where the standard approach fails completely.

The Wald interval at 0 of 30 has zero width. The estimated standard error is √(p(1−p)/n), which is zero when p is zero, so the interval is the single point 0.

The posterior does not collapse. Beta(1, 31) has mass spread from 0 to about 0.11, and the credible interval reports it.

The rule of three is the quick version: with no events in n trials the rate could be as high as about 3/n — 0.1 at n = 30, close to the 0.0921 the HDI gives.

This is the case that makes the Bayesian machinery worth the prior. Not because the frequentist answer is hard to fix, but because the standard one is wrong in a way that looks like an answer.

Why the posterior mean is not the observed rate

The posterior mean always sits between the prior mean and the data, and the distance is not a distortion.

On 2 of 50 with a flat prior the observed rate is 0.04 and the posterior mean is 0.05769. A pull of 1.769 percentage points.

The pull shrinks as data accumulates. At 37 of 200 it is 0.312 percentage points; at 370 of 2000 it would be 0.031.

It is exactly the regularisation that makes small-sample estimates usable. An observed rate of 0/5 is a terrible estimate of anything, and a posterior mean of 1/7 is a usable one.

The suite asserts the property directly: the posterior mean always lies between the prior mean and the observed rate, on 250 generated cases. It can never be outside both.

Reporting a credible interval

Four items, and the first is the one that separates a credible interval from an assertion.

State the prior. Beta(1, 1), Beta(0.5, 0.5) or something informative — and for an informative prior, where it came from.

Say which interval type. Equal-tailed and highest-density differ by 17% on a skewed posterior and by nothing on a symmetric one, so “95% credible interval” alone is ambiguous exactly when it matters.

Give the raw counts. Everything here follows from successes, trials and the prior, and nothing follows from the interval alone.

And if the prior is more than a few percent of the evidence, say so. A reader can then decide whether to accept your prior before deciding whether to accept your interval.

Sources and methodology

References for conjugate priors and interval choice.

Method. The posterior is the conjugate update, which is addition rather than integration: a Beta(α, β) prior and x of n give Beta(α + x, β + n − x), and the suite asserts that as an exact equality on 250 generated cases. It also asserts that applying the same data in two batches gives a bit-identical posterior, which is the property that makes sequential updating legitimate. The highest-density interval is found by moving the lower tail mass until both endpoints sit at equal density, with the boundary cases — where the mode is at 0 or 1 — handled separately rather than by the general search; the suite asserts on 200 generated posteriors that it is never wider than the equal-tailed interval and that it holds exactly the requested mass to 1e-6. Three frequentist intervals are computed on the same data and printed with what each one claims, since the numbers are often close and the claims are not. That engine is verified on every change against 106 assertions. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

Binomial Confidence IntervalWilson, Jeffreys and Wald intervals side by side, with the coverage each actually delivers computed exactly by enumeration.
Posterior ProbabilitySequential Bayesian updating with the posterior after every batch, the prior's weight reported, and grouping-independence demonstrated.
Bayesian A/B TestP(B beats A) from a closed form rather than sampling, with expected loss as the stopping rule and a margin of practical interest.
Beta DistributionTakes raw successes and failures and runs the conjugate update, so 5 out of 5 returns 6/7 rather than the 100% a plain proportion claims — with a credible interval that stays honest at zero.
Confidence IntervalIntervals for a mean or a proportion using t at every sample size and Wilson rather than the textbook Wald formula — with both methods shown, because Wald returns [0,0] at zero successes.
Bayes FactorBayes factors for a proportion in closed form with the exact binomial p-value beside them and Jeffreys' bands in both directions.

More in Math, or browse all calculators.

Educational use disclaimer

An educational tool. A credible interval depends on the prior as well as the data, and on small samples the prior is a visible share of the answer — this page reports that share rather than leaving it implicit. A flat Beta(1, 1) prior is a choice, not the absence of one: it pulls every estimate toward 50%, which is why zero successes in thirty gives a posterior mean of 0.031 rather than zero.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (5 updates)

Published 13 September 2026

  1. Launched Beta-Binomial credible intervals with both the highest-density and equal-tailed versions computed.
  2. Shipped a preset at 0 of 30 where the HDI is 17.292% shorter than the equal-tailed interval for the same 95% of probability.
  3. Reported the prior weight as a share of the total evidence and its effect in percentage points, rather than leaving either implicit.
  4. Added Jeffreys, Wilson and Wald intervals beside the credible one with what each of them actually claims.
  5. Asserted the conjugate update as an exact equality and the HDI as never wider than the equal-tailed interval, on 250 and 200 generated cases.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.