The VAR function in Google Sheets is used to calculate the variance based on a sample. It is a statistical tool that helps analyze and interpret data. Learn how to use the VAR function effectively with our comprehensive guide.
Parameters
value1: The first value or range to consider for the variance calculation.value2, ...: [Optional] Additional numbers or ranges to consider.
Step-by-Step Tutorial
-
Using
VARwith individual numbers:- Example:
=VAR(1, 2, 3, 4, 5) - Result:
2.5
- Example:
-
Using
VARwith a range of cells:- Example: If
A1:A5has the values1, 2, 3, 4, 5, then=VAR(A1:A5)will return2.5.
- Example: If
Working with a Single Value, a List, and a Range
VAR accepts numbers one at a time, as a comma-separated list, or as a range — mix and match freely, as long as at least two numeric values are supplied.
- Single value:
=VAR(A1)— not meaningful on its own;VARneeds at least two data points and returns a#DIV/0!error with just one. - List of values:
=VAR(A1, A2, A3)— treats each cell as one data point in the sample. - Range:
=VAR(A1:A10)— treats every cell in the range as part of the sample. - Mixed:
=VAR(A1, A3:A6, 10)— combine single cells, ranges, and literal numbers into one sample.
Use Cases and Scenarios
- Data Analysis: Calculate the variance of a dataset to understand its spread.
- Quality Control: Determine the variability in product measurements or test results.
- Financial Analysis: Analyze the volatility of stock prices.
Related Functions
STDEV: Calculate the standard deviation based on a sample.COVAR: Calculate the covariance between two sets of values.