Skip to content

Linear Regression Calculator

Fit a straight line to x and y data with least squares and get the equation, slope, intercept, correlation coefficient r, R², standard error and p-value of the slope. Paste one x, y pair per line and optionally predict y for a new x.

Reset

Frequently asked questions

How do I enter data?

One pair per line, x first, separated by a comma, space, tab or semicolon. A header line at the top, such as x,y, is skipped. You can paste two columns from a spreadsheet.

What do r and R² mean?

r, the Pearson correlation coefficient, runs from -1 to 1 and measures how closely the points follow a straight line and in which direction. R² is its square: the share of the variation in y that the line explains.

What is the p-value?

The probability of seeing a slope at least this far from zero if x and y were unrelated, from a t-test with n - 2 degrees of freedom. Small values, such as below 0.05, suggest a real linear relationship.

What is the standard error?

The typical distance of the data points from the fitted line, in units of y.

How does prediction work?

Enter an x value and the tool returns the y the line predicts for it. Predictions far outside the range of your data are unreliable.

How many points can I enter?

Up to 10,000. You need at least two different x values, and three or more for the standard error and p-value.

About OneClick Pro

OneClick Pro is a free collection of more than 150 web tools for everyday work: converting images and units, formatting and validating code, checking domains and SEO, and working with text, dates and numbers. Every tool runs without registration or subscription, and what you enter is only used to calculate your result and is never stored. Use it as a quick toolbox for one-off tasks, or bookmark the tools you rely on every day.