Excel VARPA function
The VARPA function calculates the variance based on the entire population.
VARPA function vs. VAR.P function
Both the VARPA function and VAR.P function can be used to estimate the variance based on the entire population. The difference between them is that the VARPA function evaluates text values and logical values in references, whereas VAR.P function does not include text values and logical values in references as a part of the calculation.
Excel variance functions
The following table lists all Excel variance functions and their usage notes, which can help you choose the one that best suits your needs.
|| Data type
|| Text and logicals in references
VARP(value1, [value2], ...)
- Value1 (required): The first number or reference used in the calculation.
- Value1, ... (required): The second and more numbers or references used in the calculation.
1. There can be up to 255 arguments at a time.
2. Arguments can be either of:
-- Range names, arrays or cell references that contain numbers.
3. The VARPA function takes the arguments as the entire population.
If the data you provided represents a sample of the population, it is recommended to use the VARA function
4. Logical values and text representations of numbers that you directly type in the arguments will be included in the calculation:
-- Logical values: TRUE (1) or FALSE (0);
-- Text representations of numbers: Numbers enclosed in double quotation marks such as “2”.
5.The VARAP function evaluates logical values and text values in references.
-- Logical values: TRUE is evaluated as 1, and FALSE is evaluated as 0.
-- Text value: is evaluated as 0.
Tips: If you don’t want to include logical values and text values in references as part of the calculation, it is recommended to use the VAR.P function.
6. Empty cells will be ignored in an array or cell reference.
7. The #VALUE! error occurs if any of the supplied arguments you typed directly in the function are text strings that cannot be interpreted as numbers by Excel.
8. The #DIV/0! error occurs if all supplied arguments are non-numeric.
9. The equation of the VARPA function is as follows:
-- x represents each value in the sample.
is the average of the sample.
-- n is the number of cells in the sample range.
It returns a numeric value.
The following table lists the monthly sales for 2021. Assuming that the monthly sales are the entire population. To calculate the variance of this entire population with the logical values and text value estimated by Excel, the VARPA function can help.
Select a cell (says F7 in this case), enter the formula below and press the Enter key to get the result.
1. Arguments in the formula above are supplied as a cell range.
1) The logical value “TRUE” in the reference is evaluated as 1.
2) The logical value “FALSE” and the text “Null” in the reference is evaluated as 0.
3) The formula can be changed to:
2. In this case, if you apply the VAR.P function to estimate the variance of the entire population in C6:C13, the logical values and the text in the reference will be ignored. See the following screenshot:
The Best Office Productivity Tools
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.