{
  "id": "standard-error",
  "version": "0a3af42b1773",
  "status": "published",
  "name": "Standard Error Calculator",
  "question": "What is the standard error?",
  "summary": "Computes the standard error of the mean from a list of numbers or from the sample standard deviation and sample size, or the standard error of a sample proportion, with a 95% confidence interval.",
  "category": "statistics",
  "subcategory": "descriptive",
  "url": "https://www.acalculator.org/statistics/standard-error-calculator",
  "markdown": "https://www.acalculator.org/statistics/standard-error-calculator.md",
  "kind": "function",
  "method": "SE of the mean = s ÷ √n, with s = √(Σ(x − x̄)² ÷ (n − 1)); 95% interval = x̄ ± t(0.975, n − 1) × SE. SE of a proportion = √(p(1 − p) ÷ n); 95% interval = p ± z × SE, z = 1.959964 (rounded).",
  "assumptions": [
    "The sample is a simple random sample, and the values are independent.",
    "The standard deviation is the sample standard deviation (divide by n − 1).",
    "The confidence interval for a mean uses Student’s t with n − 1 degrees of freedom, which assumes roughly normal data or a large sample.",
    "The interval for a proportion is the normal approximation (Wald interval); it is poor when n × p or n × (1 − p) is below about 5.",
    "No finite population correction: the population is taken as much larger than the sample."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "mode": {
        "title": "What do you have?",
        "description": "A list of numbers, the sample standard deviation and sample size, or a sample proportion and sample size.",
        "type": "string",
        "enum": [
          "data",
          "summary",
          "proportion"
        ]
      },
      "data": {
        "title": "Your numbers",
        "description": "The sample, separated by commas, spaces, semicolons, or new lines.",
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "sd": {
        "title": "Sample standard deviation (s)",
        "description": "The sample standard deviation, computed with n − 1.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "mean": {
        "title": "Sample mean (optional)",
        "description": "The sample mean. With it, the page also gives the 95% confidence interval for the mean.",
        "type": "number",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "p": {
        "title": "Sample proportion",
        "description": "The share of the sample with the trait, as a percent (45 means 45%).",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      },
      "n": {
        "title": "Sample size (n)",
        "description": "How many values or people are in the sample.",
        "type": "integer",
        "minimum": 2,
        "maximum": 1000000000
      }
    }
  },
  "outputs": {
    "se": {
      "label": "Standard error",
      "description": "The standard error: s ÷ √n for a mean, √(p × (1 − p) ÷ n) for a proportion (a decimal, 0.025 = 2.5 points).",
      "format": "number"
    },
    "xbar": {
      "label": "Mean",
      "description": "The sample mean: the sum divided by n.",
      "format": "number"
    },
    "sd": {
      "label": "Sample standard deviation",
      "description": "The square root of the sum of squared differences from the mean divided by n − 1.",
      "format": "number"
    },
    "n": {
      "label": "Sample size (n)",
      "description": "How many values are in the sample.",
      "format": "integer"
    },
    "t": {
      "label": "t value (95%)",
      "description": "The Student t value with n − 1 degrees of freedom that leaves 2.5% in each tail.",
      "format": "number"
    },
    "margin": {
      "label": "Margin of error (95%)",
      "description": "For a mean: t × standard error. For a proportion: z × standard error, z = 1.959964 rounded (normal approximation), as a decimal (0.05 = 5 points).",
      "format": "number"
    },
    "low": {
      "label": "95% interval, low end",
      "description": "The estimate minus the margin of error; for a proportion, a decimal (0.40 = 40%).",
      "format": "number"
    },
    "high": {
      "label": "95% interval, high end",
      "description": "The estimate plus the margin of error; for a proportion, a decimal (0.40 = 40%).",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "mode": "data",
      "data": "12, 15, 9, 14, 10",
      "sd": 6,
      "p": 45,
      "n": 36
    },
    "outputs": {
      "se": 1.1401754250991378,
      "xbar": 12,
      "sd": 2.5495097567963922,
      "n": 5,
      "t": 2.7764451051977956,
      "margin": 3.165634478083317,
      "low": 8.834365521916682,
      "high": 15.165634478083318
    },
    "text": "The standard error is 1.14018."
  },
  "examples": [
    {
      "given": {
        "mode": "data",
        "data": [
          12,
          15,
          9,
          14,
          10
        ]
      },
      "expect": {
        "se": 1.1401754250991378,
        "mean": 12,
        "sd": 2.5495097567963922,
        "t": 2.7764451051977943,
        "low": 8.834365521916684,
        "high": 15.165634478083316
      },
      "source": "NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.2, Confidence Limits for the Mean (https://www.itl.nist.gov/div898/handbook/eda/section3/eda352.htm); hand calculation in content.mdx: SS = 26, s = √(26 ÷ 4) = 2.5495, SE = s ÷ √5 = 1.1402, t(0.975, 4) = 2.776; Python 3 statistics.stdev and a t quantile by bisection",
      "tolerance": 1e-9
    },
    {
      "given": {
        "mode": "summary",
        "sd": 6,
        "n": 36,
        "mean": 50
      },
      "expect": {
        "se": 1,
        "t": 2.030107928250346,
        "margin": 2.030107928250346,
        "low": 47.969892071749655,
        "high": 52.030107928250345
      },
      "source": "NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.2, Confidence Limits for the Mean (https://www.itl.nist.gov/div898/handbook/eda/section3/eda352.htm); hand calculation in content.mdx: 6 ÷ √36 = 1",
      "tolerance": 1e-9
    },
    {
      "given": {
        "mode": "proportion",
        "p": 45,
        "n": 400
      },
      "expect": {
        "se": 0.0248746859276655,
        "margin": 0.04875348854496967,
        "low": 0.4012465114550303,
        "high": 0.4987534885449697
      },
      "source": "NIST/SEMATECH e-Handbook of Statistical Methods, section 7.2.4.1, Confidence intervals for a proportion (https://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm); hand calculation in content.mdx: √(0.45 × 0.55 ÷ 400) = 0.0248747",
      "tolerance": 1e-9
    }
  ],
  "sources": [
    "NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.2, Confidence Limits for the Mean (s ÷ √N and the t interval), retrieved 2026-10-01. https://www.itl.nist.gov/div898/handbook/eda/section3/eda352.htm",
    "NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.6, Measures of Scale (sample standard deviation), retrieved 2026-10-01. https://www.itl.nist.gov/div898/handbook/eda/section3/eda356.htm",
    "NIST/SEMATECH e-Handbook of Statistical Methods, section 7.2.4.1, Confidence intervals for a proportion (normal approximation), retrieved 2026-10-01. https://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm"
  ],
  "related": [
    "standard-deviation",
    "confidence-interval",
    "sample-size",
    "variance"
  ],
  "changelog": []
}
