Google Sheets COVARIANCE.S Function: Syntax, Examples & Tips

The COVARIANCE.S function calculates the sample covariance between two data sets, indicating how they vary together.
Google Sheets
COVARIANCE.S(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 COVARIANCE.S?
  3. A Practical Example
  4. COVARIANCE.S Formula
  5. Result of the Formula
  6. Why Use COVARIANCE.S?
  7. Key Takeaways:
  8. Example use case

Parameters

data_y:
The range of cells that contains the dependent variable data for which you want to calculate the covariance.

data_x:
The range of cells that contains the independent variable data that you want to compare against the dependent variable data in data_y.

What is COVARIANCE.S?

The COVARIANCE.S function in Google Sheets is a statistical tool used to calculate the sample covariance between two sets of data. Covariance is a measure of how much two random variables change together, and it helps in understanding the relationship between the two variables. A positive covariance indicates that the two variables tend to increase or decrease together, while a negative covariance indicates that one variable tends to increase when the other decreases.

In simpler terms, COVARIANCE.S allows you to analyze the relationship between two datasets and see how they vary together.

A Practical Example

Imagine you are analyzing the relationship between the hours studied and the scores achieved by students in an exam:

Study Hours Table:

StudentIDHoursStudied
15
210
33
48
56

Exam Scores Table:

StudentIDExamScore
175
290
360
485
580

You want to find out if there is a relationship between the hours studied and the exam scores.

COVARIANCE.S Formula

To achieve this, you would use the COVARIANCE.S function as follows:

Google Sheets
=COVARIANCE.S(A2:A6, B2:B6)

In this formula:

  • A2:A6 is the range containing the HoursStudied data.
  • B2:B6 is the range containing the ExamScore data.

Result of the Formula

When you apply the COVARIANCE.S formula to the data, it will return a numerical value representing the covariance between the two datasets. A positive value indicates that as the hours studied increase, the exam scores tend to increase as well.

Why Use COVARIANCE.S?

COVARIANCE.S is beneficial because it provides insights into the relationship between two variables, which can be crucial for data analysis and decision-making. Understanding covariance can help in predicting outcomes and making informed choices based on historical data.

Key Takeaways:

  • COVARIANCE.S: A statistical function that calculates the sample covariance between two datasets.
  • Relationship Analysis: Helps in understanding how two variables change together.
  • Positive and Negative Values: Indicates the direction of the relationship between the datasets.
  • Common Use Cases: Ideal for analyzing relationships in finance, education, and any scenario where understanding variable interactions is necessary.

COVARIANCE.S is an essential function for anyone working with data analysis in Google Sheets, providing a powerful way to enhance your understanding of variable relationships.

Happy analyzing!

Example use case

You have a table with sales data in Column A (monthly sales) and Column B (monthly advertising spend). Use COVARIANCE.S to calculate the covariance between sales and advertising, helping you understand the relationship between marketing efforts and revenue.

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.