VARPA function
Returns the variance of an entire population, counting text as 0 and TRUE as 1 instead of ignoring them.
Available in All versions of Excel, including Microsoft 365 and Excel for the web
In every Excel versionWorks in Google Sheets
Syntax
VARPA(value1, [value2], ...)| Argument | What it means | |
|---|---|---|
value1 | Required | A value, reference or range. |
value2, ... | Optional | Up to 254 more values. |
Returns: The population variance (divides by n) including text and logical values.
How VARPA works
VARPA is the population counterpart of VARA: it divides by n, like VAR.P, and in referenced ranges counts TRUE as 1 and FALSE or text as 0. Empty cells are ignored.
A neat use is the variance of a yes/no outcome across a complete group. For a column of TRUE/FALSE flags, VARPA returns p × (1 − p), where p is the share of TRUE values. That is the variance of a Bernoulli variable, the building block of proportion statistics.
Examples
1On-time deliveries for the whole month
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Delivery | On time | ||
| 2 | D1 | TRUE | 0.2041 | |
| 3 | D2 | TRUE | ||
| 4 | D3 | FALSE | ||
| 5 | D4 | TRUE | ||
| 6 | D5 | FALSE | ||
| 7 | D6 | TRUE | ||
| 8 | D7 | TRUE |
Result: 0.2041
Five of seven deliveries were on time (p = 5/7). The variance is p × (1 − p) = 0.204082 (shown to 4 decimals).
2A text entry as zero
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Store | Returns | ||
| 2 | North | 4 | 5 | |
| 3 | South | none | ||
| 4 | East | 2 | ||
| 5 | West | 6 |
Result: 5
Values 4, 0, 2, 6 give a population variance of 5. VAR.P would ignore "none" and return 2.6667.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#DIV/0! | No values. | Check the range. |
#VALUE! | A typed argument is text that cannot be read as a number. | Use references. |
Tips
- The standard deviation version is STDEVPA.
- Use VAR.P when text should be ignored rather than counted as 0.
Google Sheets
VARPA also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
VARPA in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | VARIANSPV |
| German | VARIANZENA |
| Italian | VAR.POP.VALORI |
| Norwegian (Bokmål) | VARIANSPA |
| Polish | WARIANCJA.POPUL.A |
| Russian | ДИСПРА |
| Turkish | VARSA |