MATLAB gets a least-squares polynomial with its polyfit command. When the numbers of points (the size of ) is greater than the degree plus one, the polynomial is the least squares fit.
>> x=[20.5 32.7 51.0 73.2 95.7 ];
>> y=[765 826 873 942 1032];
>> eq=polyfit(x,y,1)
eq= 3.3949 702.1721