{
  "id": "z-score",
  "version": "3db15853a718",
  "status": "published",
  "name": "Z Score Calculator",
  "question": "What is the z-score?",
  "summary": "Computes the z-score of a value from the mean and standard deviation, or any one of the four from the other three, with the percentile and tail probabilities of the standard normal distribution.",
  "category": "statistics",
  "subcategory": "distributions",
  "url": "https://www.acalculator.org/statistics/z-score-calculator",
  "markdown": "https://www.acalculator.org/statistics/z-score-calculator.md",
  "kind": "formulas",
  "method": "z = (x − μ) ÷ σ; Φ(z) is the standard normal cumulative distribution function.",
  "assumptions": [
    "The mean and standard deviation are those of the population the value comes from.",
    "The percentile and the probabilities assume the values follow a normal distribution. The z-score itself does not.",
    "The standard deviation must be more than 0."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "x": {
        "title": "Value (x)",
        "description": "The raw score or measurement.",
        "type": "number"
      },
      "mean": {
        "title": "Mean (μ)",
        "description": "The mean of the population.",
        "type": "number"
      },
      "sd": {
        "title": "Standard deviation (σ)",
        "description": "The standard deviation of the population, more than 0.",
        "type": "number",
        "exclusiveMinimum": 0
      },
      "z": {
        "title": "Z-score",
        "description": "How many standard deviations the value is above (+) or below (−) the mean.",
        "type": "number"
      }
    }
  },
  "solve": {
    "fillAny": 3,
    "variables": [
      "x",
      "mean",
      "sd",
      "z"
    ],
    "inputsOnly": []
  },
  "outputs": {
    "x": {
      "label": "Value (x)",
      "description": "The raw score or measurement.",
      "format": "number"
    },
    "mu": {
      "label": "Mean (μ)",
      "description": "The mean of the population.",
      "format": "number"
    },
    "sigma": {
      "label": "Standard deviation (σ)",
      "description": "The standard deviation of the population, more than 0.",
      "format": "number"
    },
    "z": {
      "label": "Z-score",
      "description": "How many standard deviations the value is above (+) or below (−) the mean: (x − μ) ÷ σ.",
      "format": "number"
    },
    "percentile": {
      "label": "Percentile",
      "description": "The percent of a normal population below this z-score: 100 × Φ(z).",
      "format": "percent"
    },
    "pBelow": {
      "label": "P(Z < z), area to the left",
      "description": "The probability that a standard normal value is below z: Φ(z).",
      "format": "number"
    },
    "pAbove": {
      "label": "P(Z > z), area to the right",
      "description": "The probability that a standard normal value is above z: 1 − Φ(z).",
      "format": "number"
    },
    "pBetween": {
      "label": "P(−|z| < Z < |z|), area between",
      "description": "The probability that a standard normal value lies within |z| of 0.",
      "format": "number"
    },
    "pOutside": {
      "label": "P(|Z| > |z|), two-tailed",
      "description": "The probability that a standard normal value lies further than |z| from 0, in either tail.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "x": 85,
      "mean": 70,
      "sd": 10
    },
    "outputs": {
      "z": 1.5,
      "percentile": 93.31927987311421,
      "pBelow": 0.9331927987311421,
      "pAbove": 0.06680720126885786,
      "pBetween": 0.8663855974622843,
      "pOutside": 0.13361440253771573
    },
    "text": "A value of 85 with mean 70 and standard deviation 10 has a z-score of 1.5; 93.32% of a normal population is below it."
  },
  "examples": [
    {
      "given": {
        "x": 85,
        "mean": 70,
        "sd": 10
      },
      "expect": {
        "z": 1.5,
        "pBelow": 0.9331927987311419,
        "pAbove": 0.06680720126885809,
        "percentile": 93.3192798731142,
        "pOutside": 0.13361440253771617
      },
      "source": "hand calculation in content.mdx: (85 − 70) ÷ 10 = 1.5; NIST e-Handbook 1.3.6.7.1 table, 0.5 + 0.43319 = 0.93319; Python NormalDist().cdf(1.5)"
    },
    {
      "given": {
        "z": -2,
        "mean": 100,
        "sd": 15
      },
      "expect": {
        "x": 70,
        "pBelow": 0.022750131948179216,
        "pBetween": 0.9544997361036416
      },
      "source": "hand calculation in content.mdx: 100 + (−2) × 15 = 70; NIST e-Handbook 1.3.6.7.1 table, 0.5 − 0.47725 = 0.02275; Python NormalDist().cdf(-2)"
    },
    {
      "given": {
        "x": 130,
        "mean": 100,
        "z": 2
      },
      "expect": {
        "sd": 15
      },
      "source": "hand calculation in content.mdx: (130 − 100) ÷ 2 = 15"
    },
    {
      "given": {
        "x": 60,
        "z": -1,
        "sd": 5
      },
      "expect": {
        "mean": 65,
        "pBetween": 0.6826894921370859
      },
      "source": "hand calculation in content.mdx: 60 − (−1) × 5 = 65; NIST e-Handbook 1.3.6.7.1 table, 2 × 0.34134 = 0.68268; Python 1 − 2 × NormalDist().cdf(-1)"
    },
    {
      "given": {
        "x": 70,
        "mean": 70,
        "sd": 12
      },
      "expect": {
        "z": 0,
        "pBelow": 0.5,
        "pAbove": 0.5,
        "pOutside": 1,
        "pBetween": 0
      },
      "source": "hand calculation in content.mdx: (70 − 70) ÷ 12 = 0, and Φ(0) = 0.5 by symmetry"
    }
  ],
  "sources": [
    "NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.6.6.1, Normal Distribution. https://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm",
    "NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.6.7.1, Cumulative Distribution Function of the Standard Normal Distribution (table). https://www.itl.nist.gov/div898/handbook/eda/section3/eda3671.htm"
  ],
  "related": [
    "standard-deviation",
    "average"
  ],
  "changelog": []
}
