Linear Regression Calculator
Paste paired data, fit a least-squares line, inspect r and R², and estimate y for a chosen x without building the formulas yourself.
How It Works
Formula
Variables, symbols and units
- Observed x value in pair i
- Observed y value in pair i
- Mean of the x values
- Mean of the y values
- Least-squares slope of the fitted line
- Least-squares intercept of the fitted line
- Correlation coefficient for the linear association
- Share of y variation explained by the line
Calculation method explained
Linear regression fits one straight line to your paired data. The slope shows how much y tends to change when x increases by 1, and the intercept is the line value when x = 0.
Use this tool when you already have paired observations, such as study time vs quiz score or concentration vs response. A larger absolute r means a tighter linear pattern in the entered points, while R² tells you how much of the variation in y the line accounts for. A useful line can still have a weak fit, and a strong fit still does not prove causation.