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.

Inputs

Result

Model lineary = 2.00714x + 1.00714
R²0.998647
Points
7
y(8)
17.064286
05101502468datalinearxy
Models compared
ModelEquationR²
cubicy = 0.00555556x³ − 0.0333333x² + 2.01825x + 1.057140.998912
quadraticy = 0.0166667x² + 1.90714x + 1.090480.998853
linear ★y = 2.00714x + 1.007140.998647
exponentialy = 1.74718 · e^(0.380801x)0.805291

R² close to 1 means a good fit. Exponential and power models are fitted on logarithms.

Embed on your site

Paste this code into your page’s HTML. The tool sets its own height, and the link to Kalkio has to stay visible.

Calculator by Kalkio · kalkio.app

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.