What is a linear regression calculator?
Simple linear regression fits a straight line that minimizes the sum of squared vertical residuals. The slope describes the fitted change in y for a one-unit increase in x.
Use this page for a transparent calculation, then compare the result with the Correlation Calculator when a different view of the same data would be useful.
How does this linear regression calculator work?
The calculator uses ordinary least squares to compute slope and intercept, then reports the fitted equation and R² when the response variable has nonzero variation.
Before interpreting spread or position, it can help to check the center with the Coefficient of Variation Calculator. Every tool states its assumptions so results can be reproduced.
How to use this calculator
- Enter the requested numbers in the labeled fields.
- Review unit, sample, confidence, or test choices when shown.
- Select Calculate Linear Regression.
- Read the main result, supporting facts, and method note.
- Use Copy, Download, or Print when you need to keep the result; select Reset to start over.
If you edit any input after calculating, the old result is marked stale and hidden until you calculate again.
How should you interpret the result?
The intercept is the fitted y-value at x = 0, which may or may not be meaningful. R² summarizes fit to the observed data but does not validate the model assumptions.
For another useful perspective, open the Confidence Interval Calculator; it answers a related question without changing the values you entered here.
Assumptions and limitations
Outliers, nonlinearity, unequal residual spread, dependence, and extrapolation can undermine a fitted line. Regression alone cannot prove cause and effect.
Consider the Standard Deviation Calculator for a complementary summary and the Average Calculator when your question involves another statistical property. No single statistic describes every important feature of a data set.
Frequently asked questions
Sources and methodology
The formulas and cautions on this page are documented so the calculation can be checked against authoritative statistical guidance.