STDEVPA Function (LibreOffice Calc)
Learn the STDEVPA function in LibreOffice Calc: Returns the standard deviation based on the entire population. Text is evaluated as zero.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in LibreOffice Calc. How formula examples are checked
Historical validation scope: Native observations refer to saved LibreOffice Calc 25.2.3.2 Linux evidence in the 12 October 2026, 21:07 UTC batch. This review verified artifact hashes and all 76 ODS/result pairs, and independently recalculated 52 numerical assertions plus five worked checks. Calc was not rerun. Error and type-handling diagnostics remain scoped to that saved environment.
Quick answer: when to use STDEVPA
STDEVPA calculates the population standard deviation: the typical dispersion of population observations around their mean, counting text values as zero. Its result is in the same units as the original observations, unlike variance, which uses squared units. Formally:
population standard deviation = SQRT(Ξ£(each counted observation β population mean)^2 / n)
Use the population method when your input is the entire population you intend to describe. When it is only a sample drawn from a larger population, use a sample standard deviation such as STDEVA if text=zero is truly intended, or an appropriate numeric-only sample function for measurement data. If n/a, missing, unconverted numeric strings, or status flags appear in a measurement column, STDEVPA can generate a plausible-looking but misleading number because text can enter as zero. Its text behavior, and its distinct population denominator, are documented by LibreOffice 26.8 Help (checked again 2026-10-13).
Official Calc syntax and argument rules
=STDEVPA(Argument1 [; Argument2 [; ... [; Argument255]]])
The brackets in the documented signature mark optional arguments. They are not typed in real formulas.
| Position | Required? | Type, order and purpose |
|---|---|---|
Argument1 |
Yes | First scalar number, text entry, cell reference or range of population observations. |
Argument2 through Argument255 |
Optional | Additional numbers, text, individual cells or ranges; the function combines them into one population. |
There are up to 255 argument positions per the official help, but a single rectangular range is one argument and may encompass many cells. STDEVPA does not take a separate sample/population switch or an ignore_text flag. No default argument is defined for an omitted Argument1. A genuinely empty range and no-argument call returned errors in native tests; a one-number population returned zero. This is a population calculation with denominator n rather than a sample estimate with nβ1.
Locale: This guide uses LibreOffice’s English function name and semicolons. Depending on the Calc Formula settings, localized names and comma argument separators may be active instead. The decimal mark also depends on the locale. These examples use the default Calc A1-style cross-sheet references such as Data.A2:A5; switching to Excel A1 syntax changes the sheet-reference notation. See LibreOffice Formula Options (checked again 2026-10-13).
Build a reproducible sample sheet
Create a sheet named Data and enter the following. For D4 and D5 enter the formulas exactly; for C4 leave the cell actually empty (not a space or formula). Type E4 as text, e.g. with an initial apostrophe '7, to keep it from becoming numeric.
| Row | A β numbers | B β missing label | C β blank | D β Boolean status | E β numeric-looking text |
|---|---|---|---|---|---|
| 2 | 2 |
2 |
2 |
2 |
2 |
| 3 | 4 |
4 |
4 |
4 |
4 |
| 4 | 6 |
n/a |
empty | =TRUE() |
'7 |
| 5 | 8 |
8 |
8 |
=FALSE() |
8 |
If the formula lives on Data itself, you can write A2:A5 instead of Data.A2:A5. The saved .ods native test file contains the actual input values.
Example 1: a complete population of four measurements
=STDEVPA(Data.A2:A5)
Native Calc observation: 2.23606797749979 (β5). Independent arithmetic agrees: mean = 5; squared deviations are 9 + 1 + 1 + 9 = 20; population variance = 20/4 = 5; standard deviation = β5. The equivalent literal formula =STDEVPA(2;4;6;8) returned the same result in native testing. If measuring temperatures in Β°C, the standard deviation is in Β°C, not squared Β°C.
Example 2: text n/a produces zero rather than omitting a case
=STDEVPA(Data.B2:B5)
Native Calc observation: 2.95803989154981 (β8.75). Calc 25.2.3.2 included the text n/a as 0, so the effective population was [2, 4, 0, 8]. Its population mean was 3.5; squared deviations sum to 35; 35/4 = 8.75 and β8.75 gives the observed answer. Replacing a missing measurement with zero could distort a statistical report and should only be done when zero has an intentional analytical meaning.
For numeric-only data, STDEVP excludes text in ranges according to LibreOffice’s documentation, producing a result based on the numeric observations alone. It is not a mere spelling alias with identical text rules.
Example 3: truly blank versus text-looking blank
=STDEVPA(Data.C2:C5)
Native Calc observation: 2.49443825784929 (β(56/9)). The actual observed input population was [2, 4, 8] (three values); the blank cell was ignored. Mean = 14/3; variance = 56/9; standard deviation β 2.494438258. In a separate native diagnostic, a cell containing ="" instead of being genuinely empty was counted as a text=zero entry in Calc 25.2.3.2, producing β8.75 β 2.958039892 for the analogous range. Formatting a cell to look empty does not establish that it has no value.
Example 4: logical flags and imported numeric strings
=STDEVPA(Data.D2:D5)
With D4 =TRUE() and D5 =FALSE(), the observed Calc result was 1.4790199457749, β2.1875. The effective population [2,4,1,0] arises from treating TRUE as 1 and FALSE as 0 in this particular native Calc version. Do not use a text-aware dispersion function to combine measurement magnitudes with status flags unless that encoding is deliberate and scientifically defensible.
=STDEVPA(Data.E2:E5)
With E4 containing the text '7, the observed result was 2.95803989154981, just like the n/a column. The visual digits 7 are irrelevant if the stored value is text and the function treats it as zero. Convert imported numeric strings to actual numbers before using a numeric statistic.
More advanced calculations
Verify the varianceβstandard deviation identity
=VARPA(Data.B2:B5)
=STDEVPA(Data.B2:B5)^2
=VARPA(Data.B2:B5)-STDEVPA(Data.B2:B5)^2
In the B example, the first result is 8.75, the second independently expected to be approximately 8.75, and the third 0 in the saved native test (within numerical precision). The subtractive cross-check was explicitly executed, not merely assumed. This identity is valid only when both functions operate on the same effective population, including identical handling of text, logical values, empty cells and ranges. See VARPA.
Combine a range with extra direct observations
=STDEVPA(Data.A2:A4;8)
Independently expected result: 2.23606797749979. The saved native test evaluated the difference between this expression and STDEVPA(Data.A2:A5) and returned zero. Do not average the standard deviations of several groups to get a valid pooled population SD: different group means can make the combined result much larger or smaller than that simple average.
Avoid silently converting missing labels into zero
=COUNT(Data.B2:B5)
=COUNTA(Data.B2:B5)
=IF(COUNT(Data.B2:B5)=COUNTA(Data.B2:B5);STDEVPA(Data.B2:B5);"Review nonnumeric entries")
For the B column, the independently expected first two results are 3 and 4, leading the guard to display Review nonnumeric entries. These specific COUNT/COUNTA/IF helper expressions were not part of this batch’s native assertion set; use them as a logical audit pattern rather than a claimed tested formula. COUNTA may count intentional status flags and formula-generated empty strings: that is useful for flagging them for review, not for proving data validity.
Compare whole population and sample dispersion
=STDEVPA(Data.A2:A5)
=STDEVA(Data.A2:A5)
For four numeric measurements [2,4,6,8], population SD is β5 β 2.2360679775, natively observed here. The sample counterpart uses denominator 3, giving β(20/3) β 2.5819888975, an independent mathematical expectation for STDEVA; this run did not assert that second formula. The population versus sample distinction matters more than function-name similarity when selecting an estimator.
Center and standardize a population value
Using the complete numeric A series, the z-score for the observation 8 is:
=(8-AVERAGE(Data.A2:A5))/STDEVPA(Data.A2:A5)
Independently expected: 3 / β5 β 1.3416407865. The denominator was natively asserted; the complete z-score expression was not separately executed. A zero standard deviation (such as all values 5) makes a z-score undefined; guard against a zero denominator in production spreadsheets.
Errors, edge cases and troubleshooting
| Situation | Observed/expected outcome and next step | Basis |
|---|---|---|
=STDEVPA() |
#DIV/0!, UNO code 532 in Calc 25.2.3.2. Supply observations. |
Native diagnostic |
=STDEVPA(Data.N2:N4) with genuinely empty N2:N4 |
#DIV/0!; confirm input cells are populated. |
Native diagnostic |
=STDEVPA(5) |
0: one valid observation has no population dispersion in this Calc version. |
Native diagnostic |
=STDEVPA(Data.I2:I4) with I2:I4 = 5, 5, 5 |
0: identical values have no spread. |
Native assertion |
=STDEVPA(1/0) |
#DIV/0! propagated from a failing argument in native Calc. |
Native diagnostic |
=STDEVPA("bad";2;4) |
1.63299316185545 (β(8/3)) from [0,2,4]. |
Native diagnostic |
=STDEVPA(TRUE();2;4) |
1.24721912892465 (β(14/9)) from [1,2,4]. |
Native diagnostic |
=STDEVPA("7";2;4) |
1.63299316185545 in tested Calc; quoted numeric-looking text did not become 7. |
Native diagnostic |
A formula returns an empty string ="" |
In tested range, contributes zero as text rather than behaving like a truly empty cell. | Native diagnostic |
| Numerical mismatch at many decimals | Compare at sensible floating-point tolerance and inspect cell number formatting. | Independent/native comparison |
The no-argument error, text coercion and logical coercion outcomes above are observed in Calc 25.2.3.2, not tested across the online 26.8 edition or every locale. A single text value also returned a numeric zero in native diagnostics, whereas an empty range returned an error; do not conflate the cases when debugging.
Application compatibility and names that look similar
| Function/application | Supported fact | Caution |
|---|---|---|
LibreOffice Calc STDEVPA |
26.8 Help gives whole-population SD and text=0, up to 255 arguments. Native Calc 25.2.3.2 tests passed. | Different from numeric-only STDEVP and sample STDEVA. |
LibreOffice Calc STDEVP |
Official Help documents population SD that ignores text in ranges. | Its output can differ if your input includes n/a. |
LibreOffice Calc STDEV.P |
Official Help lists a separate function with namespace COM.MICROSOFT.STDEV.P, available since LibreOffice 4.2. |
Do not assume identical text rules from a similar spelling. |
LibreOffice Calc STDEVA |
Official Help documents a sample SD, treating text as zero. | Uses the sample estimator rather than population denominator. |
| Microsoft Excel | A similarly named STDEVPA function exists in Excel. | Excel was not executed; do not generalize native Calc coercion and error codes. |
| Google Sheets | Its official STDEVPA help documents population SD and text=0, with comma-separated examples. | Google Help says #DIV/0! if fewer than two supplied values, while native Calc =STDEVPA(5) returned 0. Google was not executed. |
ODF name scope: the current LibreOffice Help applies COM.MICROSOFT.STDEV.P to the STDEV.P entry, not to STDEVPA. This guide makes no unsupported assertion about exact ODF namespace handling of STDEVPA and does not equate it with different function spellings. Files imported from Excel/Sheets should be checked for actual formulas and recalculation results.
Related Calc tutorials
- VARPA β population variance including text as zero
- VARP β population variance ignoring text
- VAR.P β separate modern variance function
- STDEVP β population standard deviation ignoring text
- STDEV.P β separate modern standard-deviation function
- STDEVA β sample standard deviation including text as zero
Validation and references
Executed natively: 26/26 STDEVPA numerical assertions passed on Calc 25.2.3.2 Linux, including numeric and mixed-type ranges, cross-sheet arguments, direct scalar values and zero cases. 12 additional native diagnostics were recorded as observations, not pass/fail assertions. Independently calculated: whole-population variance and square roots for the exact effective arrays, with 2Γ10β»β· absolute acceptance tolerance for the script’s assertions. Documentation-only: syntax, release/namespace notes for other separate Calc functions, locale configuration and Google Sheets compatibility warnings. A LibreOffice .ods workbook, full output and reproducible Python/UNO runner are included as evidence. No Excel or Google Sheets execution was performed.
Official sources (checked again 2026-10-13 UTC)
-
The Document Foundation, LibreOffice 26.8 Help, Statistical Functions Part Five, specifically STDEVPA, STDEVP, STDEV.P, STDEVA, VARPA β first-party documented signatures, distinctions, text rules and separate modern function namespace.
-
The Document Foundation, LibreOffice 26.8 Help, Formula Options, Use English function names / Separators β changing function names and syntax by locale/options.
-
Google Docs Editors Help, STDEVPA, Syntax / Notes β Sheets functionality and published fewer-than-two error rule; documentation-only.
-
Google Docs Editors Help, VARPA, Notes β cross-check of population variance/standard deviation relation; documentation-only.
-
Microsoft Excel STDEVPA β function existence checked on 13 October 2026; no Excel execution.