Google Sheets RSQ Function: Syntax, Examples & Tips

The RSQ function calculates the square of the Pearson product-moment correlation coefficient for two data sets, indicating their linear relationship.
Google Sheets
RSQ(data_y, data_x)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is an RSQ Formula?
  3. A Practical Example
  4. RSQ Formula
  5. Result of the Formula
  6. Why Use RSQ?
  7. Key Takeaways:
  8. Example use case

Parameters

data_y:
The range of dependent data points (y-values) that you want to analyze.

data_x:
The range of independent data points (x-values) that correspond to the y-values in data_y.

What is an RSQ Formula?

The RSQ function in Google Sheets is a statistical tool used to calculate the square of the Pearson product-moment correlation coefficient, which measures the strength and direction of a linear relationship between two datasets. The RSQ function returns a value between 0 and 1, where 0 indicates no correlation and 1 indicates a perfect positive correlation. This function is particularly useful in regression analysis and helps in understanding how well the data fits a linear model.

In simpler terms, RSQ allows you to quantify how closely two sets of data are related to each other.

A Practical Example

Imagine you are analyzing the relationship between advertising spend and sales revenue for a business:

Advertising Spend Table:

MonthAdvertising Spend ($)Sales Revenue ($)
Jan20005000
Feb30007000
Mar40009000
Apr500011000

You want to determine how well the advertising spend correlates with sales revenue.

RSQ Formula

To achieve this, you would use the RSQ function as follows:

Google Sheets
=RSQ(B2:B5, C2:C5)

In this formula:

  • B2:B5 is the range containing the Advertising Spend data.
  • C2:C5 is the range containing the Sales Revenue data.

Result of the Formula

When you apply the RSQ formula to the data, the output will be a single value that indicates the correlation between advertising spend and sales revenue. For example, if the result is 0.99, it suggests a very strong positive correlation, meaning that as advertising spend increases, sales revenue tends to increase as well.

Why Use RSQ?

RSQ is beneficial because it provides a quick and easy way to assess the strength of a relationship between two variables. It helps in making informed decisions based on data analysis, especially in fields like marketing, finance, and research. Understanding the correlation can guide strategies for resource allocation and forecasting.

Key Takeaways:

  • RSQ: A statistical function that measures the strength of a linear relationship between two datasets.
  • Correlation Coefficient: Returns a value between 0 and 1, indicating the degree of correlation.
  • Data Analysis: Useful in regression analysis and for making data-driven decisions.
  • Common Use Cases: Ideal for marketing analysis, financial forecasting, and any scenario where understanding relationships between variables is necessary.

RSQ is an essential function for anyone working with data in Google Sheets, providing a powerful way to enhance data analysis and reporting capabilities.

Happy spreadsheeting!

Example use case

You have a dataset with sales figures in Column A and corresponding advertising spend in Column B. Use the RSQ formula to calculate the correlation between advertising spend and sales, helping to determine the effectiveness of marketing strategies.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.