Skip to content

Regression Confidence Interval Calculator

Estimate the average response at a specific x value, with a confidence interval around that mean.

What this answers

This calculator answers "how precisely do I know the true average response at this specific x value?" It is not about predicting one new individual outcome, which carries additional individual-level variability; it is about how confidently the fitted line's estimate of the mean response itself can be trusted, given your sample size and how far this x value sits from your data's average.

How it is calculated

The estimated mean response comes from the fitted regression line at your chosen x value. The confidence interval's width uses the residual standard error and a leverage term that accounts for sample size and distance from the mean x, using a t distribution with n minus 2 degrees of freedom. This interval is always narrower than the corresponding individual prediction interval at the same x value, since it only needs to capture uncertainty about the average, not about any single new observation.

Worked example

For a near-linear dataset (x from 1 to 5, y approximately 2 plus 3 times x) evaluated at x=3.5: the estimated mean response sits close to the fitted line's value there, with a confidence interval meaningfully narrower than the corresponding prediction interval for one new observation at the same x.

Assumption audit

Calculated from your data: the fitted line's estimate at your chosen x, and whether that x value falls inside or outside your observed data range.
Evidence to review: check the linear model's actual fit to your data before trusting this interval; a poorly fitting line undermines the mean-response estimate this interval is built around.
You must verify: that estimating a mean response at your chosen x is the right question for your situation, not a single new prediction, which uses a wider, different interval.

What this result does not mean

This interval describes uncertainty about the average response, not the range where one new individual observation is likely to fall. Using this narrower interval to describe an individual prediction understates the true uncertainty of that single case.

Limitations

This interval assumes the same linear relationship and constant residual variance observed in your data continues to hold at the chosen x value, an assumption that weakens the further that x sits from your observed data.