NumberPath
Preparing offline
Applied analysisFree calculatorPreparing offline

Linear Regression Calculator

Fit ordinary least squares with one or two predictors and inspect residuals.

Your inputs

Simple 3–500 rows, two-predictor 4–500 rows. Exact singular designs rejected. Intervals only for simple regression and rely on stated OLS error assumptions; extrapolation flagged.

Your calculation

Result

—

Enter your inputs to see the result and working.

No account. Inputs stay in your browser.

How to use this calculator

Enter paired rows for simple regression or x1,x2,y rows for two predictors.

Formula and method

OLS minimizes Σ(y−ŷ)². Simple slope=Sxy/Sxx. Mean CI ŷ±t*s√(1/n+(x−x̄)²/Sxx); prediction interval adds 1 under square root.

Worked example

For (1,2),(2,4),(3,6), slope 2, intercept 0, and predicted y at x=4 is 8.

Assumptions and supported scope

Simple 3–500 rows, two-predictor 4–500 rows. Exact singular designs rejected. Intervals only for simple regression and rely on stated OLS error assumptions; extrapolation flagged.

Method references

Method and worked example checked against the calculator implementation. About our methods · Report a correction

Keep exploring

Try another calculator with clear working.

Curve Fitting and Interpolation Calculator →

Saved calculations

Stored in this browser on this device. Browser data removal also removes these saves.

Keep NumberPath handy

Open this website in a browser that supports installation. If an install option is available, use its address-bar or browser-menu control.

iPhone or iPad: open the Share menu and choose Add to Home Screen. Installation options depend on your browser.

When the header says Offline ready, the app shell has been cached. Calculators you open online are saved for offline use until the next app update. Saved inputs remain in this browser. Installation varies by browser; it has not been tested on every device.