Drag the points, watch the least-squares line move

Drag any point. The fitted line and the sum of squared residuals update as you go. Click a point to see its deviations from the means.

Point movement

Every point

Pointxyx − xy − ȳ(y − ȳ)(x − x)(x − x)²ŷy − ŷ(y − ŷ)²
Edit data sets

One data set per group: a # Name line, then x: and y: lines of numbers. Optional xrange: and yrange: lines fix the axes. Changes made here last only in this browser. To make them permanent for everyone, copy the text into the data block at the top of the page's HTML file.