# Using LINEST() Function in Excel for Multivariate Regression

The LINEST() function calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, and returns an array that describes the line. Because this function returns an array of values, it must be entered as an array formula.

The equation for the line is y = mx + b or y = m1x1 + m2x2 + ... + b (if there are multiple ranges of x values) where the dependent y value is a function of the independent x values.

The LINEST() function returns an array, so you need to start by selecting a range and finish with CTRL+SHIFT+ENTER.

The following is a step by step tutorial of analyzing data and running a simple multivariate regression in Excel using LINEST.