Regression Calculator
Fit a simple linear regression line from x-y pairs. Calculate slope, intercept, correlation, coefficient of determination, and optional predicted y.
This page fits a simple linear model:
y = a + bx
| Metric | Value |
|---|
Privacy: calculations run locally in your browser. No inputs are stored or transmitted.
How it works
This tool calculates a least-squares regression line, slope b, intercept a, correlation r, and r².
Examples
- 1,2
- 2,3
- 3,5
- 4,4
FAQ
- What does this regression calculator compute?
It computes a simple linear regression line, including slope, intercept, Pearson correlation r, and coefficient of determination r².
- How should I enter the data?
Enter one x,y pair per line, separated by a comma.
- Can I predict y for a given x?
Yes. You can optionally enter an x value to calculate the predicted y from the fitted regression line.
- How many points are required?
At least 2 valid points are required, and the x values must not all be identical.
- Are calculations stored?
No. Everything runs locally in your browser.