{
  "category": "Statistical functions",
  "display_name": "STDEV.P",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.STDEV.P",
  "implementation_state": {
    "answer_bank": {
      "excel_builds": [
        "20430",
        "20527"
      ],
      "larger_numeric": 0,
      "last_bit": 0,
      "matched": 1221,
      "other_mismatch": 0,
      "refused": 0,
      "rows": 1221,
      "unread": 0,
      "worst_ulp": 0
    },
    "detail": "Recorded: 1,221 in the answer bank and 113 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 1,334 recorded answers",
    "workbook_corpus": {
      "cells": 113,
      "matched": 113
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/statistics.rs#L323-L325"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/statistics::all",
        "catalogue/statistics::variance",
        "ported/excel_numeric::excel_sqrt_staged",
        "ported/variance_common::variance_from_values",
        "ported/variance_common::stdev_from_values"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/statistics.rs#L323-L325",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 1,334 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.STDEV.P.json",
  "name": "STDEV.P",
  "notes": [
    {
      "basis": "All 14,679 recorded rows of the twelve functions match: VAR.S, VAR.P, VAR, VARP, VARA, VARPA, STDEV.S, STDEV.P, STDEV, STDEVP, STDEVA and STDEVPA. Six of those rows separate the stored steps from plain binary64. 910 fresh scalar variance readings (Excel build 20527) replay exactly in rational arithmetic. Four cancellation edges were bisected to adjacent inputs; sixteen triples chosen to separate the stored ratio from 0.99*Q and from a division by 0.99 all agree with the ratio, where 0.99*Q misses all 16 and the division 14. Seven of eight magnitude brackets reach adjacent inputs, and sixteen chosen roots all need the 64-bit root followed by a store.",
      "documentation": null,
      "evidence": [
        {
          "commit": "9c23b24e8d0a6bc913f16bc169f46f80d4e6bb18",
          "locator": "variance_from_values",
          "note": "the rules in the product; the commit message carries the row counts",
          "path": "crates/calc-func/src/ported/variance_common.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "9c23b24e8d0a6bc913f16bc169f46f80d4e6bb18",
          "locator": "variance_cancellation_guard_stores_the_ratio",
          "note": "recorded answers pinned",
          "path": "crates/calc-func/tests/f1_stats.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "af74247e1ed54f0b535143f1305261b98d80d18e",
          "locator": null,
          "note": "rows matched per function",
          "path": "crates/calc-func/witness-status.tsv",
          "repository": "DnaCalc"
        },
        {
          "commit": "a547d79ed61948cfd5f5d49f8c5a2a071ad37635",
          "locator": null,
          "note": "the 14,679 rows before and after",
          "path": "evidence/round25/variance-published-canonical-scope-receipt.json",
          "repository": "DnaCalc-Research"
        }
      ],
      "functions": [
        "FUNC.STDEV",
        "FUNC.STDEV.P",
        "FUNC.STDEV.S",
        "FUNC.STDEVA",
        "FUNC.STDEVP",
        "FUNC.STDEVPA",
        "FUNC.VAR",
        "FUNC.VAR.P",
        "FUNC.VAR.S",
        "FUNC.VARA",
        "FUNC.VARP",
        "FUNC.VARPA"
      ],
      "inferred": "These tests were located with scalar arguments in separate cells; that the same edges hold for ranges and arrays is inferred, and their readings have not been taken. RN(variance*1000) <= |mean| is not separated from the rearrangement variance <= |mean|/1000. That a raw moment which overflows also takes the centered sum is inferred from recorded answers that stay finite.",
      "kind": "excel-differs-from-math",
      "note_id": "FN-VAR.S-001",
      "open": [
        "Whether the two tests keep the same edges for ranges and arrays."
      ],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "VAR.S(0.8769085090206681, 1, 1.123091490979332)",
          "correct": null,
          "excel": {
            "bits": "0x3f8f07c1f07c1e94",
            "display": "0.01515151515151495",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number1",
              "value": {
                "bits": "0x3fec0fa26efa7e14",
                "display": "0.8769085090206681",
                "kind": "number"
              }
            },
            {
              "name": "number2",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            },
            {
              "name": "number3",
              "value": {
                "bits": "0x3ff1f82ec882c0f6",
                "display": "1.123091490979332",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading",
          "source": {
            "commit": "9c23b24e8d0a6bc913f16bc169f46f80d4e6bb18",
            "locator": "variance_cancellation_guard_keeps_the_observed_edge",
            "note": null,
            "path": "crates/calc-func/tests/f1_stats.rs",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "VAR.S(0.8769085090206679, 1, 1.1230914909793321)",
          "correct": {
            "bits": "0x3f8f07c1f07c1eb4",
            "display": "0.015151515151515006",
            "how": "Exact rational variance of the binary64 inputs, correctly rounded.",
            "kind": "number"
          },
          "excel": {
            "bits": "0x3f8f07c1f07c1f00",
            "display": "0.015151515151515138",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number1",
              "value": {
                "bits": "0x3fec0fa26efa7e12",
                "display": "0.8769085090206679",
                "kind": "number"
              }
            },
            {
              "name": "number2",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            },
            {
              "name": "number3",
              "value": {
                "bits": "0x3ff1f82ec882c0f7",
                "display": "1.1230914909793321",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading",
          "source": {
            "commit": "9c23b24e8d0a6bc913f16bc169f46f80d4e6bb18",
            "locator": "variance_cancellation_guard_keeps_the_observed_edge",
            "note": null,
            "path": "crates/calc-func/tests/f1_stats.rs",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "VAR.S(3.244042371786199e-10, 0.00034050419142641947)",
          "correct": null,
          "excel": {
            "bits": "0x3e6f1f88c6bbc51a",
            "display": "5.797144172853e-08",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number1",
              "value": {
                "bits": "0x3df64afacd3a935a",
                "display": "3.244042371786199e-10",
                "kind": "number"
              }
            },
            {
              "name": "number2",
              "value": {
                "bits": "0x3f3650b65dc7a1d6",
                "display": "0.00034050419142641947",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading",
          "source": {
            "commit": "9c23b24e8d0a6bc913f16bc169f46f80d4e6bb18",
            "locator": "variance_centered_guard_uses_the_absolute_mean",
            "note": null,
            "path": "crates/calc-func/tests/f1_stats.rs",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "VAR.S(1.2976169487144796e-09, 0.0013620167657056779)",
          "correct": {
            "bits": "0x3eaf1f88c6bbc51a",
            "display": "9.2754306765648e-07",
            "how": "Exact rational variance of the binary64 inputs, correctly rounded.",
            "kind": "number"
          },
          "excel": {
            "bits": "0x3eaf1f88c6bbc519",
            "display": "9.275430676564799e-07",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number1",
              "value": {
                "bits": "0x3e164afacd3a935a",
                "display": "1.2976169487144796e-09",
                "kind": "number"
              }
            },
            {
              "name": "number2",
              "value": {
                "bits": "0x3f5650b65dc7a1d6",
                "display": "0.0013620167657056779",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading",
          "source": {
            "commit": "9c23b24e8d0a6bc913f16bc169f46f80d4e6bb18",
            "locator": "variance_centered_guard_uses_the_absolute_mean",
            "note": null,
            "path": "crates/calc-func/tests/f1_stats.rs",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VAR.S({157,376.82,189.207,12.38,12.473,483,306.24,324.1852,482.235,78})",
          "correct": {
            "bits": "0x40df28debfbf8a7f",
            "display": "31907.480453381777",
            "how": "Exact rational variance of the binary64 inputs, correctly rounded.",
            "kind": "number"
          },
          "excel": {
            "bits": "0x40df28debfbf8a84",
            "display": "31907.480453381795",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "c9f9d354165d2c20b9455c32582ea50baac7ba73",
            "locator": "sheet dcj9k_statistics, row 3, column 4",
            "note": null,
            "path": "crates/calc-func/tests/captures/catalogue/sections/dcj9k_statistics.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "STDEV.S(0, 1, 1.031052478719249)",
          "correct": null,
          "excel": {
            "bits": "0x3fe2c4c55ae2d85e",
            "display": "0.5865198874587454",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "number1",
              "value": {
                "bits": "0x0000000000000000",
                "display": "0",
                "kind": "number"
              }
            },
            {
              "name": "number2",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            },
            {
              "name": "number3",
              "value": {
                "bits": "0x3ff07f30e248f14c",
                "display": "1.031052478719249",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading",
          "source": {
            "commit": "9c23b24e8d0a6bc913f16bc169f46f80d4e6bb18",
            "locator": "stdev_stores_the_extended_square_root",
            "note": null,
            "path": "crates/calc-func/tests/f1_stats.rs",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "With RN(v) meaning v rounded to 64 bits on the x87 unit and then stored to binary64, S the running RN sum of the n values and Q the running RN sum of RN(x*x), the sample variance is RN(RN(Q - RN(RN(S*S)/n))/(n-1)) and the population variance RN(RN(RN(n*Q) - RN(S*S))/RN(n*n)). Excel then uses a centered sum instead, adding RN(d*d) with d = RN(x - mean) and dividing by n-1 or n, when either of two stored tests holds: RN(RN(RN(S*S)/n)/Q) > 0.99, or RN(variance*1000) <= |RN(S/n)|. The STDEV functions are the root of this, rounded to 64 bits and then stored. So the answer depends on which path a call takes: the first two VAR.S calls below differ by a few input steps in two arguments, the first passes the 0.99 test and is correctly rounded, and the second takes the raw moments and lands 76 units high. The next pair shows the size test: scaling the inputs by 4 leaves the first path.",
      "status": "measured",
      "title": "The variance family uses raw moments with stored steps, and two tests switch it to a centered sum"
    }
  ],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\nUse [STDEV.S](FUNC.STDEV.S.md) when the observations are a sample. [VAR.P](FUNC.VAR.P.md) keeps the population variance in squared units. [STDEVPA](FUNC.STDEVPA.md) includes logical values and referenced text.\n\n\n\n\n",
    "how-to-implement": "\nApply the collection rules above, then use the [stored variance recipe](FUNC.VAR.S.md#how-to-implement). This function uses the **population** branch, with final divisor `n` and the staged square root.\n\nFor the three values `-2,0,2`, the stored totals are `S=0`, `Q=8`, `T=0`. The population numerator is `3*8-0=24` and the stored divisor is `3*3=9`. Take the staged square root of the resulting variance. Do not replace the population operation tree by the sample tree with a changed final divisor.\n\nThe same two guards can redirect this call to the centered pass. For `1000,1001,1002`, that pass sums `1+0+1=2` and divides by `3`. The result then takes the staged square root. The exact scalar guard edges are measured; their transfer to references and arrays remains open. Nonfinite raw-moment fallback is inferred. No Handbook vector suite is published for this function.\n\n\n",
    "quirks": "\nNumbers in references and arrays count, including zero; referenced text, logical values and empty cells do not. Direct logical values and numeric text can count, so moving a constant into a cell can change the admitted data set. An empty numeric set gives `#DIV/0!`; a one-value population has zero spread. A centered mathematical formula alone does not reproduce the observed numerical path.\n\n\n",
    "sources": "\n- [Microsoft: STDEV.P function](https://support.microsoft.com/en-us/office/stdev-p-function-6e917c05-31a0-496f-ade7-4f4e7462f285), opened 6 November 2026; syntax, documented argument rules and errors.\n- [DnaCalc implementation](https://github.com/DnaCalc/DnaCalc/blob/da3ecc4fb19a3a5529708c311d0e8f05688ac165/crates/calc-func/src/ported/variance_common.rs); implementation steps and the limits identified in the text.\n- [FN-VAR.S-001](../notes/FN-VAR.S-001.json): guard bisections, stored arithmetic and unresolved scope.\n\n",
    "try-it": "\n`=STDEV.P(-2,0,2)` returns approximately `1.63299316185545`. The mean is zero and the squared deviations total eight. Divide by three and then take the square root.\n\n\n",
    "version-differences": "The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.\n\n| Excel 16.0 build | Platform and CPU | Captured inputs |\n|---|---|---:|\n| 20430 | Windows, 64-bit, CPU not recorded | 1,211 |\n\nThe record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.\n\n[Recorded environments and comparison details](https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.STDEV.P.json).\n\nRetained controls from the indexed captures:\n\n| Build and recorded CPU | Captured call or arguments | Excel result |\n|---|---|---|\n| 20430, CPU not recorded | [`STDEV.P(1,2)`](https://github.com/DnaCalc/CalcFunc-Evidence/blob/4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2/cache/w111-broad-regenerated-20260929/answers-stdev.p.json.gz) | `0.5` (`0x3fe0000000000000`) |\n\nThese are earlier recorded answers, not new Excel runs or an additional cross-build comparison. The function JSON retains each source locator, exact argument bits where available, and input-route status. Call notation does not imply that captured binary64 values were entered as decimal formula literals.",
    "what-it-does": "\n`STDEV.P(number1, [number2], ...)` measures population standard deviation. It reports spread in the original units by taking the square root of variance. The divisor is `n`: use this when the observations constitute the whole population.\n\n\n"
  },
  "signature": {
    "display": "STDEV.P(number1, [number2], ...)",
    "parameters": [
      {
        "description": null,
        "name": "number1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "number2",
        "optional": true,
        "repeats": true
      }
    ],
    "trailing_repeats": true
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 255,
        "min": 1
      },
      "category": "Statistical functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "AggregateDirectAndRangeDualPolicy",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "NumsToNum",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Standard deviation of a whole population",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Calculates standard deviation based on the entire population",
        "microsoft_url": "https://support.microsoft.com/en-us/office/stdev-p-function-6e917c05-31a0-496f-ade7-4f4e7462f285"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "STDEV.P"
        },
        {
          "locale": "bg-BG",
          "name": "STDEV.P"
        },
        {
          "locale": "cs-CZ",
          "name": "STDEV.P"
        },
        {
          "locale": "da-DK",
          "name": "STDAFV.P"
        },
        {
          "locale": "de-DE",
          "name": "STDEV.P"
        },
        {
          "locale": "el-GR",
          "name": "STDEV.P"
        },
        {
          "locale": "en-AU",
          "name": "STDEV.P"
        },
        {
          "locale": "en-GB",
          "name": "STDEV.P"
        },
        {
          "locale": "en-US",
          "name": "STDEV.P"
        },
        {
          "locale": "es-ES",
          "name": "DESVEST.P"
        },
        {
          "locale": "et-EE",
          "name": "STDEV.P"
        },
        {
          "locale": "fi-FI",
          "name": "KESKIHAJONTA.P"
        },
        {
          "locale": "fr-FR",
          "name": "ECARTYPE.PEARSON*"
        },
        {
          "locale": "he-IL",
          "name": "STDEV.P"
        },
        {
          "locale": "hr-HR",
          "name": "STDEV.P"
        },
        {
          "locale": "hu-HU",
          "name": "SZÓR.S"
        },
        {
          "locale": "id-ID",
          "name": "STDEV.P"
        },
        {
          "locale": "it-IT",
          "name": "STDEV.P"
        },
        {
          "locale": "ja-JP",
          "name": "STDEV.P"
        },
        {
          "locale": "ko-KR",
          "name": "STDEV.P"
        },
        {
          "locale": "lt-LT",
          "name": "STDEV.P"
        },
        {
          "locale": "lv-LV",
          "name": "STDEV.P"
        },
        {
          "locale": "nb-NO",
          "name": "STDEV.P"
        },
        {
          "locale": "nl-NL",
          "name": "STDEV.P"
        },
        {
          "locale": "pl-PL",
          "name": "ODCH.STAND.POPUL"
        },
        {
          "locale": "pt-BR",
          "name": "STDEV.P"
        },
        {
          "locale": "pt-PT",
          "name": "DESVPAD.P"
        },
        {
          "locale": "ro-RO",
          "name": "STDEV.P"
        },
        {
          "locale": "ru-RU",
          "name": "СТАНДОТКЛОН.Г"
        },
        {
          "locale": "sk-SK",
          "name": "STDEV.P"
        },
        {
          "locale": "sl-SI",
          "name": "STDEV.P"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "STDEV.P"
        },
        {
          "locale": "sv-SE",
          "name": "STDAV.P"
        },
        {
          "locale": "th-TH",
          "name": "STDEV.P"
        },
        {
          "locale": "tr-TR",
          "name": "STDSAPMA.P"
        },
        {
          "locale": "uk-UA",
          "name": "STDEV.P"
        },
        {
          "locale": "vi-VN",
          "name": "STDEV.P"
        },
        {
          "locale": "zh-CN",
          "name": "STDEV.P"
        },
        {
          "locale": "zh-HK",
          "name": "STDEV.P"
        },
        {
          "locale": "zh-TW",
          "name": "STDEV.P"
        }
      ],
      "signature": {
        "display": "STDEV.P(number1, [number2], ...)",
        "parameters": [
          {
            "description": null,
            "name": "number1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "number2",
            "optional": true,
            "repeats": true
          }
        ],
        "trailing_repeats": true
      },
      "surface_name": "STDEV.P",
      "version_marker": null,
      "xlcall": {
        "code": "511",
        "symbol": "xlfStdev_p"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/stdev-p-function-6e917c05-31a0-496f-ade7-4f4e7462f285"
  },
  "try_it": {
    "formula": "=STDEV.P(-2,0,2)"
  },
  "url": "https://handbook.dnacalc.com/functions/STDEV.P.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "1,211 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build. Retained control STDEV.P(1,2) returned 0.5 (0x3fe0000000000000). The capture specifies exact-double bulk Value2 cell input.",
      "excel_build": "16.0 build 20430",
      "observations": [
        {
          "call": "STDEV.P(1,2)",
          "excel": {
            "bits": "0x3fe0000000000000",
            "display": "0.5",
            "kind": "number"
          },
          "input_route": "cell-value2",
          "inputs": [
            {
              "name": "argument1",
              "value": {
                "bits": "0x3ff0000000000000",
                "display": "1",
                "kind": "number"
              }
            },
            {
              "name": "argument2",
              "value": {
                "bits": "0x4000000000000000",
                "display": "2",
                "kind": "number"
              }
            }
          ],
          "recorded_in": "Excel 16.0 build 20430, Windows, 64-bit, CPU not recorded.",
          "source": {
            "commit": "4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2",
            "locator": "w111broad-20260929-STDEV.P-00003",
            "path": "cache/w111-broad-regenerated-20260929/answers-stdev.p.json.gz",
            "repository": "CalcFunc-Evidence"
          }
        }
      ],
      "platform": "Windows, 64-bit, CPU not recorded",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/5dc75391aa5125ccc5abdb095da85950980d6fd8/content/evidence/environments/FUNC.STDEV.P.json",
        "https://github.com/DnaCalc/CalcFunc-Evidence/blob/4287ba192d2e3a7fd54671ea1cee1c34cb2e84e2/cache/w111-broad-regenerated-20260929/answers-stdev.p.json.gz"
      ]
    }
  ]
}