Skip to main content
Math & statisticsLocal in browser — nothing is uploaded

Linear regression & correlation

Compute ordinary least squares (y = mx + b) slope, intercept, Pearson correlation r, coefficient of determination R², RMSE, and preview a clean scatter plot locally.

OLS Fit Preview

Regression Equation
y = 1.991429x + 0.046667
Pearson r
0.99923
R²
0.99846
RMSE
0.133571

Processing runs inside your browser without accounts or server uploads. Modular TypeScript domain logic tested locally.

Report a problem with this tool

Ordinary Least Squares (OLS)

Vertical residual minimization: Calculates exact closed-form slope Σ(x−x̄)(y−ȳ) / Σ(x−x̄)² with no iterative approximation error.

Frequently asked questions

How do I format coordinate pairs?
Enter one x, y pair per line separated by a comma, space, tab, or semicolon.
What does R² represent?
R² indicates the proportion of variance in y explained linearly by x (from 0 to 1).