Academic calculator · runs in your browser

Simple Linear Regression & Prediction Calculator

Fit y = a + bx to paired observations, inspect correlation and optionally calculate a point prediction with extrapolation clearly flagged.

Calculate

Fits the least-squares line y = a + bx. A prediction outside the observed X range is flagged as extrapolation.

Separate interpolation from extrapolation when using the fitted line

The optional prediction field substitutes an X value into the fitted least-squares equation. Lynara also reports the observed X range so it can mark a requested point outside that range as extrapolation rather than presenting every prediction as equally supported by the data.

A point prediction from the line is not a prediction interval and does not represent individual uncertainty. The slope, r and r² summarize a linear pattern in the entered pairs; they do not by themselves justify causal interpretation.

Privacy: calculator inputs are processed in your browser; Lynara does not need to upload these values to calculate the result.

Formula

slope b = cross-deviation sum ÷ SSx; intercept a = ȳ − b x̄; predicted ŷ = a + bx

Example

For X = 1, 2, 3 and Y = 2, 4, 6, the line is y = 2x; entering X = 4 predicts Y = 8 and is flagged as extrapolation.

Useful for

Questions

How does the prediction work?

The entered X value is substituted into the fitted line. Lynara flags it when X lies outside the observed X range.

Can regression be calculated if every X value is identical?

No. With zero X variance, a unique slope cannot be estimated.

Supporting guides

Related tools