DVARP Function (Gnumeric)
Use DVARP in Gnumeric to calculate population variance for a criteria-selected numeric field. Includes criteria examples, expected results and compatibility notes.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Gnumeric. How formula examples are checked
Quick answer
Use DVARP in Gnumeric to calculate population variance for a criteria-selected numeric field. With the data and Team 1 criteria below, =DVARP($A$1:$F$7,"Score",H1:H2) has an independently checked expected result of 218.75 squared score points.
Use DVARP to describe the complete selected group when variance, rather than standard deviation, is needed. The population is the group defined by your question; it need not be every record in the entire source table. The official Gnumeric reference documents this database function. Here, “database” means a rectangular worksheet range with a header row; it does not require a database server.
Exact syntax and parameters
=DVARP(database,field,criteria)
Database: include the headers as well as the data, for example $A$1:$F$7. One row represents one record. Do not start at row 2 and accidentally treat the first record as the header.
Field: identify the column to calculate, such as "Score". A column number is counted from the left edge of the database, starting at 1; it is not a worksheet column letter. The field being calculated can differ from the field used to filter records.
Criteria: supply a separate cell range containing matching column headings and the conditions below them. Conditions on the same row mean AND; separate condition rows mean OR. A record satisfying more than one alternative is still one selected record. The examples always provide all three arguments and do not depend on omitted-field behaviour.
Gnumeric’s manual uses comma-separated arguments in English notation. Localized names and separators may differ; follow your installed Function Wizard or formula editor. The examples deliberately use numeric Team/Class codes to avoid assuming identical text-pattern settings between programs.
Practice data and layout
Open a blank worksheet. Enter the six headers ID, Team, Class, Score, Factor, Note in A1:F1, then enter the records below in A2:F7. F3 must be truly empty: do not type the words “leave empty.” Place criteria to the right of the database and results in column K, so no result overwrites an input.
| Row | A: ID | B: Team | C: Class | D: Score | E: Factor | F: Note |
|---|---|---|---|---|---|---|
| 2 | 101 | 1 | 1 | 10 | 2 | Ready |
| 3 | 102 | 1 | 2 | 20 | 3 | leave empty |
| 4 | 103 | 2 | 1 | 30 | 4 | Hold |
| 5 | 104 | 1 | 1 | 40 | 5 | Ready |
| 6 | 105 | 2 | 2 | 50 | 6 | Ready |
| 7 | 106 | 1 | 2 | 0 | 1 | Hold |
Download the input CSV. This CSV contains the six-column input table only, not formulas or prefilled criteria. Import at A1 and keep the empty Note field empty. The same fixture is used in the companion program guide to make cross-software comparisons reproducible.
Worked examples: one condition, AND and OR
Example 1 — select Team 1
Put Team in H1 and the number 1 in H2. In K2 enter:
=DVARP($A$1:$F$7,"Score",H1:H2)
Expected result: 218.75. The selected IDs are 101, 102, 104, 106. The Team 1 squared deviations total 875 around a mean of 17.5. The population calculation divides by all four observations: 875 / 4 = 218.75 squared points.
Example 2 — Team 1 AND Class 1
Enter H5=Team, I5=Class, H6=1, I6=1. Both tests are in the same criteria row, so a record must pass both. Enter in K6:
=DVARP($A$1:$F$7,"Score",H5:I6)
Expected result: 225. Only IDs 101 and 104 match. Compare those two source records with the result, rather than counting every Team 1 record or every Class 1 record independently.
Example 3 — Team 2 OR Score at least 40
Enter H9=Team, I9=Score, H10=2, leave I10 and H11 empty, and type >=40 in I11. These are two alternative criteria rows. In K10 enter:
=DVARP($A$1:$F$7,"Score",H9:I11)
Expected result: 66.666666667. The selected IDs are 103, 104 and 105. Record 105 meets both alternatives but is included only once. This is why adding two separate aggregates can give a different answer when their conditions overlap.
Advanced example — two bounds on the same field
Use the header Score twice, in H14 and I14. Type >=20 in H15 and <=40 in I15. Repeated headings let you express a lower and upper bound on one field within the same AND row. In K15 enter:
=DVARP($A$1:$F$7,"Score",H14:I15)
Expected result: 66.666666667. The selected IDs are 102, 103 and 104. The bounds are inclusive. Putting the two bounds on different rows would express OR and would select a different set of records.
Interpret the result correctly
Do not interchange DVAR and DVARP without considering the denominator. With four selected observations, dividing by 3 rather than 4 changes the answer appreciably. Keep the population definition with the formula, not just in a report author’s memory.
DVARP is the square of DSTDEVP for the same numeric subset, apart from rounding. It is nonnegative mathematically and uses squared measurement units. Check for at least one numeric observation before interpreting a population variance; missing data should not silently become zero observations.
Troubleshooting and scope
If a result looks wrong, check the selected record IDs before changing the arithmetic. A heading typed differently from the database header, a criteria range lacking its header, or a condition placed on the wrong row changes the selection. Keep criteria ranges tight: accidentally including an entirely empty alternatives row can undermine the intended restriction.
Inspect numeric inputs as numbers, not imported text with currency symbols or hidden spaces. These examples use valid numbers and one genuinely empty Note cell. They do not establish how every blank, formula-generated empty string, boolean, error cell or numeric-looking text is coerced in every release.
Gnumeric’s function manual documents header text or an integer field selector. This guide uses explicit, populated fields; it does not claim that omitted-field conventions or numeric conversion of text match another spreadsheet. For large or changing data, expand the database range deliberately to include new rows. Absolute references such as $A$1:$F$7 prevent copying from shifting the range, but they do not make the range grow automatically.
Compatibility and related functions
The Apache OpenOffice Calc DVARP guide uses the same input data and record-selection examples. The two official references document the same broad purpose and three-part database/field/criteria structure. That is not proof of identical error tokens, text matching, numeric coercion or file-format round trips. Start with these ordinary numeric cases, then test your actual workbook in each destination program.
Related Gnumeric functions: DVAR, DSTDEVP, DCOUNT, DAVERAGE. Choose a different aggregate when the question changes rather than interpreting every numeric output as a total or a count.
How this guide was checked
Official references reviewed on 2026-10-12: Gnumeric database-function documentation and the companion program’s documentation. Argument order, header-based selection and the function’s purpose were checked against those references. The worked dataset, selected IDs and arithmetic are original examples, independently evaluated with a small Python model.
No native application run: these are expected results, not outputs observed in an installed Gnumeric application. No claim is made about the earliest release supporting the function or every platform. The documentation checked is English desktop-function documentation, not a mobile compatibility guarantee. Example-check record · Editorial standards.