The TREND function is a Statistical function in Excel. In this article, we will show you how to use Excel’s TREND function with 3 examples.
Download Workbook
You can download the free practice Excel workbook from here.
Introduction to The TREND Function
The TREND function calculates the values of a given set of X and Y and returns additional Y-values by using the least square method based on a new set of X-values along with a linear trend line.
- Syntax
=TREND(known_y’s, [known_x’s], [new_x’s], [const])
- Arguments Description
Argument | Required/ Optional | Description |
---|---|---|
known_y’s | Required | A set of dependent y-values that is already known from the relationship of y = mx + b.
Here,
|
known_x’s | Optional | One or more sets of independent x-values that is already known from the relationship of y = mx + b.
|
new_x’s | Optional | One or more sets of new x-values for which the TREND function calculates the corresponding y-values.
|
const | Optional |
A logical value specifying how the constant value b from the equation of y = mx + b should be calculated,
|
- Return Value
Calculated Y-values along with a linear trend line.
3 Examples of Using TREND Function in Excel
In this section, we will show you how to utilize the TREND function to calculate certain values based on given values in Excel.
1. Calculating GPA from Exam Score with The TREND Function
In this section, we will learn how to estimate GPA for a new dataset based on previously given data. Consider the following example, where we will return the Predicted GPA of New Score in the right table based on the Exam Score and GPA given in the left table.
Steps:
- Pick a cell to store the result (in our case, it is Cell F5).
- In the cell write the following formula,
=TREND($C$5:$C$13,$B$5:$B$13,E5)
Here,
$C$5:$C$13 = known_y’s, dependent y-values.
$B$5:$B$13 = known_x’s, independent x-values.
E5 = new_x’s, new x-values to calculate the TREND value for.
- Press Enter.
You will get the estimated GPA for the new score you stored in your dataset based on a given set of arrays.
2. Predicting Future Value with TREND Function
Here we will predict future sales based on occurred monthly sales value.
Look at the following data. We have sales value from Jan-20 to Sep-20 and with the TREND function, we will predict the sales from Oct-20 to Dec-20.
Steps:
- Pick a cell to store the result (in our case, it is Cell F5).
- In the cell write the following formula,
=TREND($C$5:$C$13,$B$5:$B$13,$E$5:$E$7,TRUE)
Here,
$C$5:$C$13 = known_y’s, dependent y-values.
$B$5:$B$13 = known_x’s, independent x-values.
$E$5:$E$7 = new_x’s, new set of x-values to calculate the TREND value for.
TRUEÂ = logical value, to calculate normally.
- Press Enter.
You will get the predicted sales value of all the upcoming months that you provided in the formula at once.
Similar Readings
- How to Use VAR Function in Excel (4 Examples)
- Use PROB Function in Excel (3 Examples)
- How to Use Excel STDEV Function (3 Easy Examples)
- Use Excel GROWTH Function (4 Easy Methods)
- How to Use Excel FREQUENCY Function (6 Examples)
3. Utilizing Excel’s TREND Function for Multiple Sets of X-Values
Until now, we are learning how to utilize the TREND function only with one x-value. But this time, we will learn how to calculate TREND if there are multiple x-values.
Look at the following dataset. Here we have more than one x-values (Buyers and Other Cost in the first table). We also want to calculate the Estimated Sales based on two different x-values (New Buyers and New Cost in the right table).
Steps:
- Pick a cell to store the result (in our case, it is Cell I5).
- In the cell write the following formula,
=TREND($E$5:$E$13,$C$5:$D$13,$G$5:$H$7)
Here,
$E$5:$E$13 = known_y’s, dependent y-values.
$C$5:$D$13 = known_x’s, multiple sets of independent x-values.
$G$5:$H$7 = new_x’s, new set of multiple x-values to calculate the TREND value for.
- Press Enter.
You will get the estimated sales value based on multiple x-values that you provided in the formula at once.
Things to Remember
- The known values – known_x’s, known_y’s – need to be linear data. Otherwise, the predicted values could be inaccurate.
- When the given values of X, Y, and new X are non-numeric, and when the const argument is not a Boolean value (TRUE or FALSE), then the TREND function throws #VALUE! error.
- If the known X and Y values are different lengths, then the TREND function returns #REF error.
Conclusion
This article explained in detail how to use the TREND function in Excel with 3 examples. I hope this article has been very beneficial to you. Feel free to ask if you have any questions regarding the topic.