# Google Sheets RSQ Function: Syntax, Examples & Tips

- URL: https://betteranalyst.com/google-sheets/rsq-function
- Author: Better Analyst

Formula Bot is now Better Analyst—same account, more powerful analysis.Formula Bot is now Better Analyst—same account and workflows, with more powerful analysis, dashboards, and automation.

[Learn what changed](https://betteranalyst.com/formula-bot-is-now-better-analyst)

The RSQ function calculates the square of the Pearson product-moment correlation coefficient for two data sets, indicating their linear relationship.

```
RSQ(data_y, data_x)
```

Generate FormulaExplain Formula

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

Describe the RSQ you need in plain EnglishGenerate Formula

## 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:

| Month | Advertising Spend ($) | Sales Revenue ($) |
| - | - | - |
| Jan | 2000 | 5000 |
| Feb | 3000 | 7000 |
| Mar | 4000 | 9000 |
| Apr | 5000 | 11000 |

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:

```
=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.

[Create Free Account](https://betteranalyst.com/signup)[Try Formula Generator](https://betteranalyst.com/excel-ai)

## Google Sheets how-to guides

- [How To Count Unique Values In Google Sheets](https://betteranalyst.com/google-sheets/how-to-count-unique-values-in-google-sheets)
- [How To Create A Pivot Table In Google Sheets](https://betteranalyst.com/google-sheets/how-to-create-a-pivot-table-in-google-sheets)
- [How To Divide In Google Sheets](https://betteranalyst.com/google-sheets/how-to-divide-in-google-sheets)
- [How To Enable Macros In Google Sheets](https://betteranalyst.com/google-sheets/how-to-enable-macros-in-google-sheets)
- [How To Filter In Google Sheets](https://betteranalyst.com/google-sheets/how-to-filter-in-google-sheets)
- [How To Find Circular References In Google Sheets](https://betteranalyst.com/google-sheets/how-to-find-circular-references-in-google-sheets)
- [How To Find Duplicates In Google Sheets](https://betteranalyst.com/google-sheets/how-to-find-duplicates-in-google-sheets)
- [How To Freeze A Row In Google Sheets](https://betteranalyst.com/google-sheets/how-to-freeze-a-row-in-google-sheets)

## 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.](https://chatgpt.com/?prompt=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
2. [02ClaudeOpen the same research prompt in Claude.](https://claude.ai/new?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)
3. [03PerplexityResearch the comparison with linked web sources.](https://www.perplexity.ai/search?q=Compare%20Better%20Analyst%20with%20using%20a%20general-purpose%20AI%20assistant%20for%20data%20analysis.%20Evaluate%20spreadsheet%20and%20document%20analysis%2C%20dashboards%2C%20repeatable%20reports%2C%20code%20transparency%2C%20data%20connections%2C%20pricing%2C%20and%20limitations.%20Use%20current%20public%20sources%2C%20distinguish%20verified%20facts%20from%20assumptions%2C%20and%20explain%20which%20types%20of%20users%20each%20option%20fits%20best.)

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