How to Use Linest Function in Excel

The Linest function is one of the advantages of using Microsoft Excel. This function is mainly used to calculate statistics for a specific line and uses a method known as "least squares" when calculating a straight line that fits perfectly with the entered data, and then returns an array that successfully describes that line. This is because the Linest function returns values from an array, which causes data to be entered into the Linest formula.

Linest Formula Parameters

The Linest formula consists of four different components which are known_y's, known_x's, const, and stats.

Known_y's: This is a required part of the formula. The set of its values that are already known in the relation, meaning y = mx + b. If the term component happens to be a single column, then any column in the one in known_x's will be interpreted as a variable that is separated.

Known_x's: This is an optional part of the formula. There is a set of x values that you may already know are related, which means y = mx + b. This is a range that can contain one or more sets of different variables.

If only one variable is used, both known_y's and _x's can be any shape. But this only happens if they both have the same range. If it happens that more than one variable is used, known_y's must be viewed as a vector, but only if range is a row or column width.

If this element known_x's is omitted, it will be automatically created as an array with the same size as the previous component (known_x's).

Const: This is optional. This is a boolean value that will determine where or not to force the constant b to be 0. If set to true or omitted, b will be evaluated normally. If set to false then b will be set to 0, which will cause the values of m to be corrected to match the condition where y = mx.

Stats: This is optional. This is a Boolean value that will determine whether to return the statistic with additional regression. If set to true, linest will return this statistic. If set to false or even omitted, it will only return the coefficients m and the constant b.

Examples of Linest formulas

Example 1: Simple linest formula

We need to find statistics on the number of people that were available with the linest formula. This example is about the simplest linest formula.

Simple Linest Formula

Example 2: Advanced linest formula

I need statistics on the number of people broken down by age. This example gives you the opportunity to find a better answer. We will use the full linest formula to get the statistical information we are aiming for, and we will use the same data we used in the previous example.

Advance Linest Formula

Example 3: Simultaneous SUM and LINEST

The business goes to a certain level because we have completed a certain sale that we have already set for ourselves for the year. However, we want to make some adjustments to estimate how much sales we might achieve in the coming month. We have become more ambitious in our business, so we need to check whether the valuation is achievable. Our estimate is 15,000.

This is where the sum and linest formula is used to help us determine if the goal is achievable.

SUM and LINEST Formulas Simultaneously

Example 4: Linest formula with Text

In this example we have our data layout and it is very important that we use text instead of cells as we have already marked them appropriately.

Linest Formula with Text

Example 5: Average yield with the Linest formula 

This example is great for informing you that in circumstances where you have already set yourself an average goal that you should give every six weeks. We also need to use the mean formula in conjunction with the linest formula to get the statistical value of the mean performance.

Average Performance with Linest Formula

Example 6: Using both the XOR and the Linest formula

We have set a specific goal for the business and we want to know if it is true or false. Therefore, we use the formulas xor and linest at the same time to find out if it is true or false.

Using both XOR and Linest Formula

Example 7: Simultaneous MMULT and LINEST formulas

Usage in this example, we need a value and statistical value matrix for the output. To find the simultaneous value, we'll use both the MMULT formula and the linest formula.

MMULT and LINEST Formula Simultaneous Usage

Example 8: The usage of SUMPRODUCT & LINEST simultaneously

In this example, we're using the same data as the previous one, but this time we're using both sum and linear formulas to find the answer that we missed for a while.

This is something that will allow us to properly evaluate the input data and see the differences in the pattern.

SUMPRODUCT  LINEST Formula Simultaneously

Example 9: Linest in another spreadsheet

The example is to find a statistical value using a formula row that has been placed in another spreadsheet. This allows us to be more flexible in the details we provide in circumstances that may require some changes in the future.

Linest on Different Spreadsheet

Example 10: What about another document?

We will use the same data as the previous ones, but this time we will use it on a different document. The idea is to judge if it gives the same result as in the previous example and gives you the opportunity to see if it is very possible to use a linear formula using data from other data.

What about another Document