Linear Regression Calculator (Line of Best Fit)
Math ToolsSlope, intercept and R² from x and y pairs
Similar tools you may like
History
All history →Linear Regression Calculator (Line of Best Fit) — at a glance
Fit a straight line to your data and predict new values.
How to use it — step by step
One x, y pair per line, separated by a comma or space.
Add your text
Paste or type your input into the box. The Sample button fills in an example.
Choose the options
Pick the mode and settings you need. Results update when you run the tool again.
Press Fit Line
The result is made instantly inside your browser.
Copy the result
Use the Copy button, or send it to another tool.
Pro tips
Small things that make the result better.
Quick facts
Frequently Asked Questions
What is least squares?+
The line that makes the total of squared vertical distances to the points as small as possible.
What does R² mean?+
The share of the variation in y explained by x.
Is my data safe?+
Yes. Everything runs inside your own browser. Your text, files and images are never uploaded to any server.
Is this tool really free?+
Yes — completely free, no signup, no watermark and no usage limit.

