TREND
The TREND
function in Google Sheets is a powerful tool for fitting an ideal linear trend to a set of known data points. It utilizes the least squares method to estimate the relationship between two sets of data and can also predict further values based on the trend. Explore our comprehensive guide to learn how to effectively use the TREND
function.
Function Syntax and Parameters
Syntax: TREND(known_data_y, [known_data_x], [new_data_x], [b])
Parameters:
known_data_y
: The known y-values or dependent variable data points.known_data_x
(optional): The known x-values or independent variable data points.new_data_x
(optional): The new x-values for which the function will estimate corresponding y-values.b
(optional): A logical value that indicates whether to force the intercept to be 0. If set toTRUE
, the intercept will be forced to 0. If set toFALSE
or omitted, the intercept will be determined by the dataset.
Step-by-Step Tutorial
-
Using
TREND
with only known y-values:- Example:
=TREND({2, 5, 9, 10}, )
- Result: Returns an array of approximate y-values corresponding to the trend line.
- Example:
-
Using
TREND
with known x and y-values:- Example:
=TREND({2, 5, 9, 10}, {1, 2, 3, 4})
- Result: Returns an array of approximate y-values corresponding to the trend line based on the known data points.
- Example:
-
Using
TREND
to predict new y-values:- Example:
=TREND({2, 5, 9, 10}, {1, 2, 3, 4}, {5, 6})
- Result: Returns an array of approximate y-values corresponding to the trend line for the new x-values [56].
- Example:
Use Cases and Scenarios
- Sales Forecasting: Predict future sales based on existing sales data.
- Financial Analysis: Estimate future trends in financial data.
- Scientific Research: Fit a linear trend to experimental data for analysis and predictions.
Related Functions
SLOPE
: Calculate the slope of a linear regression line.INTERCEPT
: Calculate the y-intercept of a linear regression line.FORECAST
: Predict future values based on existing linear data.