VAR.P in ONLYOFFICE: Population Variance and Squared Units
Use VAR.P and legacy VARP in ONLYOFFICE with worked examples, CSV data, migration checks, and documented input-rule caveats.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: The original introduction version and date are not established by the official sources checked.
- Availability: Documented in the current ONLYOFFICE Spreadsheet Editor help; no final working-version endpoint is established.
- Scope: Docs and Desktop Editors release separately. This unversioned help does not establish availability in every older build, mobile client or deployment.
- Checked: October 19, 2026, against the official function reference. Documentation and independently calculated examples; no native test of these cases.
Quick answer
Use VAR.P in ONLYOFFICE to calculate the variance of a complete population, dividing the sum of squared deviations by n. The working example below describes delivery lead times; its result is measured in squared hours. The official reference supports the function’s identity and purpose.
This guide also covers the older spelling VARP. The two names share a calculation implementation in the inspected official source; the legacy examples and compatibility checks below explain how to review existing workbooks using the older name.
Syntax and arguments
=VAR.P(number1, [number2], ...)
Numeric inputs: individual numbers or cell ranges holding the observations. One range can contain many observations; a header is not a measurement.
Additional inputs: optional extra numeric values or ranges. The reference lists up to 255 numeric arguments. Omit the square brackets when entering a formula. A range supplies its observations without turning each cell into a separate function argument.
When this calculation is useful
Use population variance to describe the spread of every observation in a specifically defined population. It gives equal weight to each included numeric observation. A row containing a subtotal is not interchangeable with a row containing an individual observation; mixing those two levels changes the question.
Variance is in squared units. It becomes one hundred times larger when every observation is multiplied by ten, even though the underlying pattern is unchanged. This makes it useful in calculations but easy to mislabel in a dashboard. Use a matching standard deviation measure when readers need a spread expressed in the original units.
Set up the practice data
A team delivery register with one row per completed shipment provides the scenario. Enter the following numeric observations into A2:A9, one per row, with a header in A1. Use H2:H4 for the three result formulas, outside the input and CSV fields.
| Cell | Hours |
|---|---|
| A2 | 14 |
| A3 | 18 |
| A4 | 22 |
| A5 | 18 |
| A6 | 26 |
| A7 | 30 |
| A8 | 10 |
| A9 | 22 |
Download the ONLYOFFICE VAR.P practice data (CSV). Import it into a new, blank sheet starting at A1, with a comma as the file delimiter and the header row retained. The CSV contains input values only, not formulas or native test results. The extra test values occupy F2:F5. The CSV also contains record IDs in B and an unused RequestedPosition field in D; these are not observations and must not be included in the statistical range. Keep observations numeric rather than importing them as text.
Three worked examples
Example 1: Measure spread in the working register
Enter in H2:
=VAR.P(A2:A9)
Expected result: 36.
The numeric count is 8, the mean is 20, and the sum of squared deviations is 288. Divide by 8 (n); the result is a variance in squared measurement units.
Example 2: Check the denominator with three known numbers
Enter in H3:
=VAR.P(2,4,6)
Expected result: 2.666667 (displayed to six decimal places).
The mean is 4 and the squared deviations are 4, 0 and 4, for a total of 8. The population denominator is 3. Keep the fractional result during later calculations rather than rounding the input values.
Example 3: Check squared units when values are rescaled
For this check, use F2:F5 containing 0, 0, 80, 80, in that order. These values are included in the practice file.
Enter in H4:
=VAR.P(F2:F5)
Expected result: 1600.
These four observations have mean 40 and squared deviations totalling 6400. They are ten times the numbers 0, 0, 8, 8, so their variance is one hundred times as large. Both zeros still count as observations.
Advanced: expose every deviation without changing the data
Keep the imported or manually entered data intact. Use J1:L1 for Observation, Deviation and Squared deviation. In N2 enter =AVERAGE(A2:A9); expect 20. Enter J2 =A2, K2 =J2-$N$2 and L2 =K2^2, then fill J2:L2 through row 9.
| Row | Expected K | Expected L |
|---|---|---|
| 2 | -6 | 36 |
| 3 | -2 | 4 |
| 4 | 2 | 4 |
| 5 | -2 | 4 |
| 6 | 6 | 36 |
| 7 | 10 | 100 |
| 8 | -10 | 100 |
| 9 | 2 | 4 |
In N3 enter =SUM(L2:L9); expect 288. Put 8 in N4, the number of observations in this complete fixture. Enter =N3/(N4) in N5. The independently expected result is approximately 36, matching H2 before display rounding.
The fixed count of eight is a check for this specific dataset, not an automatic missing-data rule. If you change the observations, update the count and inspect the included numeric cells. Do not count the CSV’s record IDs, requested-position field or labels as extra measurements.
For the sample comparison, enter =VAR.S(A2:A9) in N7 and =N5*8/7 in N8. Both targets are approximately 41.1428571429. This adjustment applies to the same eight observations; it does not combine variances from different groups.
Check the mathematics and interpretation
Subtract the mean from each observation and square each difference. Add the squared differences and divide by n. Do not take a square root when reporting variance; its units remain squared. This mathematical definition is used to check the numbers in the examples, independently of the spreadsheet software. Keep stored results at full available precision and round only the final presentation when a report requires it. The displayed expectations above are rounded where necessary; a different number of displayed decimal places is not by itself a calculation error.
Common mistakes and troubleshooting
The output is labelled with ordinary units. A variance of 16 from data in minutes is 16 minutes squared. Its square root, 4, is the population standard deviation in minutes.
The result changes after rescaling the data. That is expected: multiplying each input by a factor multiplies variance by the square of that factor. Merely changing display formatting, without changing stored values, is a different operation.
The range includes summary rows or missing-value replacements. A subtotal introduces an extra observation, and replacing an unknown value with zero invents a measurement. Define the inclusion rule and inspect the data before relying on the resulting variance.
ONLYOFFICE input rules and compatibility
The official entry distinguishes array inputs from direct arguments. It says empty, logical, text and error entries in an array are ignored, while directly supplied logical values and text representations of numbers are interpreted numerically. These are documentation statements, not new native coercion tests, and the pinned implementation differs on both array errors and direct numeric text; see the legacy compatibility section below. Keep source errors visible and investigate them rather than relying on an ignored error as a cleanup strategy.
Use consistent definitions and units for the delivery times. Transit-only hours and total order-to-delivery hours are different variables. Keep summary rows and commentary outside the measured range.
The short reference does not enumerate every exact error label, single-value population case, extreme-precision boundary or workbook-conversion behavior. Sample calculations need at least two usable observations; population calculations need a nonempty population mathematically. This guide does not assign an undocumented native error token. English examples use commas between arguments; follow the separator accepted by your configured editor.
For the same statistical question in other programs, see VAR.P in Microsoft Excel, VAR.P in Google Sheets, VAR.P in SoftMaker PlanMaker. These links identify corresponding measures, not a guarantee that names, mixed-data rules, error codes or file conversions are identical.
Legacy VARP: read and check an existing workbook
VARP is the older spelling covered here for population variance. The official legacy reference lists this syntax:
=VARP(number1, [number2], ...)
number1 is required; subsequent arguments are optional, with up to 255 arguments documented. An omitted optional argument adds no observation; it is not a default zero. There is no sample/population switch: the function name selects the measure. Do not type the square brackets, and do not use an empty argument as a substitute for intentionally missing data.
How the older and newer names relate
In ONLYOFFICE’s pinned formula source, VAR.P inherits the VARP implementation. This explains why both names calculate the same statistical measure in that source revision. It is not evidence that every historical release or file format handles them identically. The source identifies newer dotted names separately for file-format handling, so this relationship is not a blanket promise about round-trip workbook compatibility. The first release introducing either name remains unestablished.
Three legacy checks using the existing practice data
Leave the original H2:H4 formulas and the input values intact. In P1 enter Legacy result; in Q1 enter Modern minus legacy. Enter:
| Cell | Formula | Independently expected result |
|---|---|---|
| P2 | =VARP(A2:A9) |
36 |
| P3 | =VARP(2,4,6) |
2.666667 |
| P4 | =VARP(F2:F5) |
1600 |
| Q2 | =H2-P2 |
0 |
| Q3 | =H3-P3 |
0 |
| Q4 | =H4-P4 |
0 |
These are independently calculated expectations and source-supported equivalence checks, not captured ONLYOFFICE results. Format P2:P4 to six decimal places if desired; keep stored precision unchanged. The first example uses eight measurements, mean 20 and squared deviations totalling 288, with denominator n. The second makes the denominator visible with a three-number fixture. The third uses the F2:F5 practice values above and retains real zeros.
A zero in Q2:Q4 supports equality for those exact numeric cases in your editor. It does not test mixed text, booleans, errors, extreme values, older versions or another spreadsheet application. Save a copy before changing inherited formulas, and compare the reopened file in each application that actually receives it.
Documentation and source disagree on mixed inputs
The VARP and VAR.P help notes describe ignored array errors and numeric interpretation of directly supplied numeric text. The inspected shared source instead returns encountered errors from arrays/references and adds zero for a direct string argument. Those claims must not be collapsed into a single verified rule. The official help and the pinned source concern different evidence surfaces; neither is a native test of your installed build.
For a diagnostic, compare VARP(2,“4”,6) with VAR.P(2,“4”,6) in a disposable sheet. Interpreting “4” numerically gives the independent target 2.666667. Replacing the direct string with zero, as the inspected source branch does, gives 6.222222 for 2, 0, 6. Record the editor/build and observed result before using mixed-input behavior in a production calculation. Keep errors visible and fix their cause rather than depending on an error being ignored.
Evidence boundary
The legacy and dotted help pages were checked on October 19, 2026. Source inspection uses sdkjs commit 72b0421c0bbf9d01eed9cf14834ae47eb2df1b50. The source revision has not been mapped to your installed editor, and these examples have not been run in a native ONLYOFFICE session. Version introductions remain unknown. All worked numerical targets are mathematical checks, using the input-only CSV linked above.