LeastSquares

WMA link


LeastSquares[m, b]

computes the least squares solution to m x = b, finding
an x that solves for b optimally.

Inverse
LinearModelFit