The COVAR function in Google Sheets calculates the covariance between two sets of data. Covariance indicates how two variables change together—whether they have a positive relationship, negative relationship, or no relationship at all. It's particularly useful in statistics and financial analysis for understanding relationships between data points.
How it Works:
The COVAR function measures how two datasets vary together, identifying positive, negative, or no relationships.
- Compares paired values in two datasets.
- Returns a positive value if both datasets increase or decrease together.
- Returns a negative value if one dataset increases while the other decreases.
- A result near zero indicates no significant relationship between the datasets.
Google Sheets COVAR Function Syntax:
Here is the syntax of the Google Sheets COVAR statement:
COVAR(data_y, data_x) - data_y: The range of numeric values for the first dataset.
- data_x: The range of numeric values for the second dataset
How to Use COVAR Function in Google Sheets
To use the COVARIANCE function in Google Sheets and calculate the covariance between two datasets, follow these simple steps.
Step 1: Prepare Your Data
Ensure you have two sets of numerical data in two separate columns in your Google Sheets.
Step 2: Select the Cell for the Result
Click on the cell where you want the covariance result to appear.

Step 3: Enter the COVAR Formula
Type the formula in the selected cell, replacing range_y and range_x with the actual data ranges. For example: =COVAR(A2:A6, B2:B6)
=COVAR(range_y, range_x)

Step 4: Press Enter
Hit Enter to get the covariance value, which will show how the two datasets vary together.
