Regression and curve fitting
Paste your data in two columns (x and y), straight from a spreadsheet if you like. The tool compares several models and picks the one that fits best.
Result
Model linear
R²
- Points
- 7
- y(8)
- 17.064286
| Model | Equation | R² |
|---|---|---|
| cubic | y = 0.00555556x³ − 0.0333333x² + 2.01825x + 1.05714 | 0.998912 |
| quadratic | y = 0.0166667x² + 1.90714x + 1.09048 | 0.998853 |
| linear ★ | y = 2.00714x + 1.00714 | 0.998647 |
| exponential | y = 1.74718 · e^(0.380801x) | 0.805291 |
R² close to 1 means a good fit. Exponential and power models are fitted on logarithms.
Least-squares linear regression
The regression line is the line y = ax + b that minimises the sum of squared vertical distances from the points to the line. Parabolas and cubics are fitted the same way.
The coefficient of determination R²
R² says how much of the variation in y the model explains: 1 is a perfect fit and 0 is no better than the mean. A higher-degree polynomial always gives a slightly higher R², so the “best” model prefers simpler ones when the difference is negligible.
Common questions
How do I paste from Excel?
Select two adjacent columns (x and y), copy and paste. Each spreadsheet row becomes one point.