<< Go back to all functions

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 to TRUE, the intercept will be forced to 0. If set to FALSE or omitted, the intercept will be determined by the dataset.

Step-by-Step Tutorial

  1. 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.
  2. 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.
  3. 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].

Use Cases and Scenarios

  1. Sales Forecasting: Predict future sales based on existing sales data.
  2. Financial Analysis: Estimate future trends in financial data.
  3. 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.

Related Articles