TREND()

SyntaxTREND(known_y’s;known_x’s;new_x’s;const)

Definition. This function returns values along a linear trend. TREND() fits a straight line (using the method of least squares) to the known_y’s and known_x’s arrays. The function returns the y-values along that line for the specified array of new_x’s.

Arguments

Note

You can use TREND() for polynomial curve fitting by regressing against the same variable raised to different powers. For example, suppose column A contains y-values and column B contains x-values. You can enter x2 in column C, x3 in column D, and so on, and then regress columns B through D against column A.

Formulas that return an array as a result have to be entered as array formulas.

When entering an array constant instead of an argument (such as known_x’s), use commas to separate values in the same row and colons to separate rows.

Background. If you know that different values are interdependent, you can make a prediction based on the known values.

Excel provides numerous statistical functions you can use to calculate trends. Statistical functions calculate a line or curve based on known values. If you extend the time axis, you can view the future values. The known values are analyzed and described with a formula that allows extrapolation of the values. However, the data set has to be sufficient to compensate for seasonal variation. Other unforeseeable factors that impact the trend can also cause problems.

For example, consider the case in which a competitor realizes huge sales with a new product in your region. Because the regression analysis assumes that the data can be approximated with a mathematical function, Excel provides many of these functions, including TREND().

Use the TREND() function to calculate a linear trend or to analyze known values. The values are entered into a formula and allow you to predict future trends.

The y-values and x-values are the values from y = mx + b where the intercept b indicates the intercept of the line with the y-axis and slope m indicates by how much the y-value changes if an x-value changes.

If values always change by a certain value, a linear trend exists.

Example. You are the marketing manager of a software company and analyze the company’s website. Recently the website visits as well as the online orders have increased significantly. Because you want to know the future trend of the two components, you use the TREND() function to calculate the future values to predict the estimated number of website visits and online orders.

The website visits and orders until June 2008 are shown in Figure 12-145.

Website visits and online orders until June 2008.

Figure 12-145. Website visits and online orders until June 2008.

You create a chart from the values generated so far to view the linear trend of the website visits and the online orders, including the equations and the value calculated for r2 (see Figure 12-146).

Chart of the website visits and online orders.

Figure 12-146. Chart of the website visits and online orders.

The linear trend line and the associated function indicate that the orders increase by 52.872 per month. This means about 53 new orders per month. Now you want to know the trend of the website visits and online orders from July 2008 through March 2009.

The TREND() function provides the following arguments to calculate the website visits in the next nine months:

Figure 12-147 shows the result.

Note

Remember, the TREND() function is an array function when it is calculating the values for cell range C33:C41. This means that the function immediately returns the result for all months. Therefore, you have the select cell range C33:C41, enter the formula, and press Ctrl+Shift+Enter.

You can recognize array functions by the braces in the formula bar (see Figure 12-147).

Calculating the future website visits using the TREND() function.

Figure 12-147. Calculating the future website visits using the TREND() function.

By using the same procedure, you can calculate the values for the online orders based on the calculated trend values for website visits. Figure 12-148 shows the result and the arguments of the TREND() function. With the TREND() function, Excel allows for a good prognosis of the website visits and online orders, assuming that the previous exponential trend continues.

Calculating the trend values for online orders.

Figure 12-148. Calculating the trend values for online orders.

See Also

FORECAST(), GROWTH(), LINEST(), LOGEST()