VAR and VARIANCE in Calligra Sheets: Sample Variance
Calculate Calligra VAR or VARIANCE from numeric observations. Audit n−1, compare pooled estimates, and check text exclusions and engine error precedence.
Verification status: 22 selected VARIANCE expressions ran through the Calligra Sheets 25.04.2 engine library, including one direct VAR comparison. Preserved worksheets are independent mathematical recipes. Version 26.08.2 was source-checked only; no GUI-cell or import claim. How formula examples are checked
Quick answer: VAR estimates sample variance from numeric observations, using the divisor n−1. For the eight observations below, the independent result is 32/7≈4.571428571429. VARIANCE is an active alias of the same implementation.
Input distinction: In the selected engine cases, VARIANCE excludes strings and Boolean values, including numeric-looking text. This differs from a full-value conversion function such as VARA. A formula can contain several arguments yet retain fewer than two numeric observations.
Availability and version history
- Introduced: First release not established; VAR is present in Calligra 2.4.0 source. Alias history is described below.
- Supported in: Calligra Sheets 26.08.2; no retirement is established for either spelling.
- Scope: Desktop Sheets with the Statistical module. Examples use English semicolon-separated formulas.
- Checked: October 14, 2026. 22 selected VARIANCE expressions ran through the 25.04.2 engine library, including one direct VAR comparison. Preserved worksheets are independent mathematical references. 26.08.2 was source-checked only; no GUI-cell or import verification.
Syntax and the VARIANCE alias
=VAR(value1[;value2;...])
=VARIANCE(value1[;value2;...])
Supply one or more values, ranges or arrays containing at least two numeric observations. Brackets mark optional arguments and are not typed. There is no population/sample flag: VARP is the separate population-variance function.
The 26.08.2 registrations give VAR and VARIANCE the same one-or-more argument bounds, array acceptance and complete callback. VARIANCE is already present in 2.4.0 source; its first introduction is unknown, and the inspected source does not label it deprecated or removed. The formula is Σ(x−mean)²/(n−1), and the result has squared input units.
Reproducible eight-observation worksheet
Put Sample measurement in A1 and enter these numbers into A2:A9. Keep the result formulas in column H, outside the input range. These cell-reference examples are independent mathematical recipes, separate from the alias engine expressions later in the guide.
| A cell | Number | A cell | Number |
|---|---|---|---|
| A2 | 2 | A6 | 5 |
| A3 | 4 | A7 | 5 |
| A4 | 4 | A8 | 7 |
| A5 | 4 | A9 | 9 |
| Enter in | Formula | Independently expected result | Teaching point |
|---|---|---|---|
| H2 | =VAR(A2:A9) |
4.571428571429 | Sample variance = 32/7. |
| H3 | =VARP(A2:A9) |
4 | Population variance = 32/8. |
| H4 | =AVERAGE(A2:A9) |
5 | Mean for a manual audit. |
| H5 | =VARIANCE(A2:A9) |
4.571428571429 | Exact implementation synonym. |
| H6 | =STDEV(A2:A9)^2 |
4.571428571429 | The square of sample SD equals sample variance (rounding aside). |
| H7 | =VAR(12;5;7) |
13 | Official KDE numeric example. |
| H8 | =VAR(6;7;8) |
1 | Official KDE numeric example. |
| H9 | =VAR(15;80;3) |
1716.333333333333 | Wide-spread sample. |
| H10 | =VAR(5;5) |
0 | Repeated observations, no spread. |
| H11 | =VAR(-2;0;2) |
4 | Negative values are valid numeric data. |
| H12 | =COUNT(A2:A9) |
8 | Numeric observation count in this dataset. |
The mean is 5. Deviations are −3,−1,−1,−1,0,0,2,4 and their squares sum to 32. Sample variance divides by 7; population variance divides by 8 and equals 4. This distinction is intentional, not a rounding error.
Audit the denominator with fixed references
In B1 enter Squared deviation. In B2 enter =(A2-$H$4)^2 and fill through B9. Expected values are 9,1,1,1,0,0,4,16. The fixed $H$4 reference keeps the mean from shifting as the formula is copied.
In H13 enter =SUM(B2:B9), with expected result 32. In H14 enter =H13/(H12-1), giving 4.571428571429; in H15 enter =H13/H12, giving 4. COUNT in H12 measures the eight numeric observations, rather than the number of formula arguments used to pass their range.
Compare two groups without confusing the estimators
On a separate worksheet, enter D2:D5=2,4,4,4 and E2:E5=5,5,7,9. =VAR(D2:D5) and =VAR(E2:E5) have independent results 1 and 3.666666666667. If a shared within-group variance is a justified modeling assumption, use:
=((COUNT(D2:D5)-1)*VAR(D2:D5)+(COUNT(E2:E5)-1)*VAR(E2:E5))/(COUNT(D2:D5)+COUNT(E2:E5)-2)
The independent pooled result is 2.333333333333. It differs from the variance of all eight observations because it excludes the between-group mean difference. State the model assumption rather than treating the two formulas as interchangeable.
VARIANCE engine examples
The following results retain the exact alias spelling used in 25.04.2 engine-library execution. Semicolons within inline arrays separate columns and vertical bars separate rows. These are formula values, not imported worksheet cells. Engine values and independent mathematical references are separate columns rounded for presentation.
| Formula | Engine result | Independent mathematical reference |
|---|---|---|
=VARIANCE(1;2;3) |
1 |
1 |
=VARIANCE(2;4;6) |
4 |
4 |
=VARIANCE(-2;0;2) |
4 |
4 |
=VARIANCE(5;5;5) |
0 |
0 |
=VARIANCE(1;3;5;TRUE();FALSE();"8";"pending") |
4 |
4 |
=VARIANCE({1;2;3}) |
1 |
1 |
=VARIANCE(1;2;3;4;10) |
12.5 |
12.5 |
=VARIANCE({1;2|3;4}) |
1.666666666667 |
1.666666666667 |
For 1,2,3 the squared deviations sum to 2 and n−1=2, giving 1. Adding a constant to every numeric observation preserves variance; multiplying every observation by 2 multiplies variance by 4. The tested identity =VARIANCE(1;2;3)-VAR(1;2;3) returned 0.
Boundaries, exclusions and error precedence
Fewer than two retained numeric observations gives #VALUE!; booleans and numeric text do not rescue a singleton. VARIANCE(1;1/0) hits that count guard, while VARIANCE(1;2;1/0) propagates #DIV/0!. Error precedence is therefore not identical to always returning the first error argument. Constant numeric lists give zero.
| Formula | Engine result |
|---|---|
=VARIANCE() |
#VALUE! |
=VARIANCE(1) |
#VALUE! |
=VARIANCE("") |
#VALUE! |
=VARIANCE("abc") |
#VALUE! |
=VARIANCE(TRUE()) |
#VALUE! |
=VARIANCE(1;TRUE();FALSE()) |
#VALUE! |
=VARIANCE(1;2;"9") |
0.5 |
=VARIANCE(1;2;"abc") |
0.5 |
=VARIANCE(1;2;1/0) |
#DIV/0! |
=VARIANCE(1;1/0) |
#VALUE! |
=VARIANCE({1;"9";3}) |
2 |
=VARIANCE({TRUE();FALSE();"pending"}) |
#VALUE! |
=VARIANCE(1;2;3;"") |
1 |
=VARIANCE(1;2;"9") uses only 1 and 2, giving 0.5. =VARIANCE({1;"9";3}) uses 1 and 3, giving 2. Changing the function to include text or Boolean values changes the data model as well as the count; decide on the intended conversions explicitly.
The count guard precedes the deviation calculation, explaining why a singleton plus an error gives a value error while two numbers plus the same error propagate division by zero. This is more specific than a universal “return the first error argument” rule. The observed tokens belong to the engine expressions; genuine blank-cell ranges, localized input, GUI display and import spelling were not tested here.
Official sources and checking scope
- Function-specific implementation
- Versioned function help
- Defaults helper
- Aggregation helper
- Average helper
- Deviations helper
- Array Parser helper
The inspected statistical module and value helpers are byte-identical between 25.04.2 and 26.08.2 source. Only the named 25.04.2 engine expressions were executed. The preserved worksheets and pooled estimator were independently calculated, with no GUI-cell or newer-version execution claim.