Linear Regression Calculator
Fit an ordinary least-squares line, inspect residuals and R², predict Y values and reveal the calculation steps.
What Is the Linear Regression Calculator?
The Linear Regression Calculator fits the line that minimizes the sum of squared vertical residuals. It reports slope, intercept, Pearson r, R², residual standard error, a prediction for any X value and the observed-versus-predicted table.
How It Works
Paste paired X and Y values or load a paired CSV. Inspect the fitted line and residuals, enter an X value for a prediction, and turn on Show Work for the mean and deviation-sum steps.
When to Use It
Use it for education, exploratory modeling and transparent one-variable trend estimates.
Frequently Asked Questions
- Can I Predict Outside The Observed X Range?
- The calculator will evaluate the line, but extrapolation can be unreliable because the relationship may change beyond the data you observed.
- What Does R Squared Mean?
- For this one-predictor model, R² is the share of Y variation explained by the fitted linear relationship in the sample. It does not prove the model is causal or appropriate.
Found an issue? Send Feedback. See our data sources and update policy for tools that depend on changing information.