Apple Numbers VARA: Sample Variance with Text and Logical Values
Calculate sample variance in Numbers, check mapped values and squared deviations, reproduce Apple’s sensor example and combine groups correctly.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =VARA(A2:A7) returns approximately 7.2 for the mixed entries below. It calculates sample variance after mapping referenced text and FALSE to zero, TRUE to one, and ignoring genuinely empty cells.
Availability and version history
- Introduced: Original release and introduction date are not established by the checked references.
- Availability: Currently documented in Apple’s Functions Help 15.4 documentation edition; no final supported-version endpoint is established.
- Scope: Shared iWork reference. Function-specific historical availability across Mac, iPad, iPhone and iCloud is unverified.
- Checked: October 14, 2026, against the official VARA reference. Independent typed-data and mathematical checks; no native Numbers test.
Syntax, sample size and included types
=VARA(value, value…)
The first value or collection is required; further values or collections are optional. Apple specifies at least two values, including for the population functions. One range argument can contain multiple values. Do not confuse the number of arguments with the number of included observations.
Text is allowed in a referenced cell but is not allowed as a directly entered string argument. For example, put pending in a cell instead of constructing =VARA(4,6,"pending"). The latter is outside the documented argument contract; this guide does not assign it an unverified error token.
Apple’s Notes explicitly say included date/time or duration values produce an error. Keep those types out of these numeric examples, even though the argument description also mentions a general same-type rule.
Use VARA when the included values represent a sample of a larger population. VARPA uses the population definition. Deciding which observations belong in that population is separate from choosing a formula.
Build a visible numeric reconstruction
Create a Numbers table named MixedDispersion, with eight columns A:H and ten rows, including one header row. Use Input, Type, Mapped value and Squared deviation as A1:D1. Enter:
| Row | A: Input | B: Type | C: Mapped value |
|---|---|---|---|
| 2 | 4 | Number | 4 |
| 3 | 6 | Number | 6 |
| 4 | pending | Text | 0 |
| 5 | =TRUE() |
Boolean | 1 |
| 6 | =FALSE() |
Boolean | 0 |
| 7 | leave empty | Empty | leave empty |
Enter pending without quote characters. Leave A7 and C7 truly empty, rather than typing the instruction or a formula that returns empty text. The five numbers in C2:C6 are a manual reconstruction, not a claim that a pending measurement really equals zero.
In E2 enter =AVERAGEA(C2:C6) for 2.2. In D2 enter =(C2-$E$2)^2, and fill down through D6. The five squared deviations are 3.24, 14.44, 4.84, 1.44 and 4.84. Put =SUM(D2:D6) in E3 for 28.8.
Use G2:G6 for the results:
| Cell | Formula | Expected result |
|---|---|---|
| G2 | =VARA(A2:A7) |
7.2 |
| G3 | =VARA(C2:C6) |
7.2 |
| G4 | =SUM(D2:D6)/4 |
7.2 |
| G5 | =VAR(A2:A3) |
2 |
| G6 | =STDEVA(A2:A7) |
2.6832815730 |
The reconstruction uses five included values, so its denominator is 4, or n−1. Variance has squared units. It is not a typical distance in the original measurement unit. G5 deliberately selects only the two original numbers, 4 and 6, to show a different data-selection policy. It does not silently treat all five mapped entries as measurements.
The printed decimals are rounded expected outputs. Keep unrounded formulas for later calculations; a display rounded to a few places should not become a replacement input.
Reproduce Apple’s missing-temperature example
Create SensorExample, with six columns and nine rows. In A1:C1 enter Day, High and Low. Use the following complete source data; enter the day labels as plain text and n/a as ordinary text without quotes, not a spreadsheet error value.
| Row | A: Day | B: High | C: Low |
|---|---|---|---|
| 2 | July 1 | 58 | 58 |
| 3 | July 2 | 84 | 61 |
| 4 | July 3 | 82 | 59 |
| 5 | July 4 | 78 | 55 |
| 6 | July 5 | n/a | n/a |
| 7 | July 6 | 81 | 57 |
| 8 | July 7 | 93 | 67 |
In E2 enter =VARA(B2:B8) for approximately 1011.6666666667. In E3 enter =VAR(B2:B8) for approximately 135.0666666667. These reproduce Apple’s stated comparison: the A-function includes the text marker as a seventh, zero-valued observation; the numeric-only calculation uses six recorded highs.
A missing temperature is not a measured 0 °F. The larger mixed-input result reflects that chosen conversion. Apple labels this an illustrative sample rather than a statistically justified sampling design. The arithmetic alone cannot establish representativeness.
Advanced: group variances cannot simply be averaged
Create CombinedGroups, with six columns and nine rows. Enter 2,4,6,8,10,12 in A2:A7. The first three values form one group, the last three another. All inputs here are genuine numbers.
| Cell | Formula | Expected result |
|---|---|---|
| C2 | =AVERAGEA(A2:A4) |
4 |
| C3 | =AVERAGEA(A5:A7) |
10 |
| C4 | =AVERAGEA(A2:A7) |
7 |
| D2 | =VARA(A2:A4) |
4 |
| D3 | =VARA(A5:A7) |
4 |
| D4 | =VARA(A2:A7) |
14 |
| F2 | =(D2+D3)/2 |
4 |
| F3 | =((3-1)*D2+(3-1)*D3+3*(C2-C4)^2+3*(C3-C4)^2)/(6-1) |
14 |
The two groups each have sample variance four, but their means differ by six. The combined squared-deviation total is 70: 16 from variation within the groups, plus 54 from their means’ separation. Dividing by five gives the combined sample variance fourteen.
F2 omits that separation. F3 reconstructs the variance of all six observations, rather than a within-group pooled-variance estimate. The counts of three are justified by this complete numeric fixture; do not reuse them after adding, removing or excluding entries.
Equal results do not certify clean data
Create ZeroControl, with three columns and six rows. Enter numeric 0 in A2:A3, text pending in A4 and =FALSE() in A5. Put =VARA(A2:A5) in C2 and =VAR(A2:A3) in C3; both return 0. Text and a Boolean are present even though the dispersions match.
A difference between an A-function and a numeric-only calculation can reveal an inclusion-policy difference, as in the sensor example. Equality does not prove that every input is numeric, complete or valid. Inspect types and collection rules before interpreting the statistic.
Limits and related functions
Empty cells, text markers, numeric zeros and error cells are distinct inputs. The checked references do not establish every imported numeric-string representation, formula-produced empty string, native error label or numerical limit. Keep those cases separate from the explicitly typed examples above.
VAR explains the corresponding numeric-only statistic. VARPA uses the other denominator choice. AVERAGEA explains the mapped mean, and SQRT connects variance to standard deviation.