← All tools

Linear Regression Calculator

Fit a straight line y = mx + b to a set of points using ordinary least squares. Enter one (x, y) pair per line — separated by a comma or whitespace — and the calculator reports the slope, intercept, the fitted equation, the Pearson correlation coefficient r, the coefficient of determination R², and the sum of squared errors. It also predicts y for any x you choose. Degenerate cases (too few points, or all x values equal) are detected and reported. Everything runs locally in your browser.