{
    "name": "Sample Size Calculator",
    "url": "https://calculators.geekmidst.com/calculators/sample-size-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/sample-size-calculator.md",
    "category": "Statistics & probability",
    "description": "Find how many responses a survey needs to estimate a proportion within a chosen margin of error and confidence level, with a finite population correction.",
    "summary": "Choose how confident you want to be and how close the estimate must be, and get the number of completed responses needed for a survey percentage.",
    "also_called": [
        "Survey sample size calculator"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "confidence",
            "label": "Confidence level",
            "type": "number",
            "default": "95",
            "unit": "%"
        },
        {
            "name": "margin",
            "label": "Margin of error (±)",
            "type": "number",
            "default": "5",
            "unit": "%"
        },
        {
            "name": "proportion",
            "label": "Expected proportion",
            "type": "number",
            "default": "50",
            "unit": "%"
        },
        {
            "name": "population",
            "label": "Population size (optional)",
            "type": "number",
            "default": "",
            "optional": true
        }
    ],
    "outputs": [
        {
            "key": "n",
            "label": "Responses needed",
            "format": "integer"
        },
        {
            "key": "n_infinite",
            "label": "Needed for an unlimited population",
            "format": "integer"
        },
        {
            "key": "z",
            "label": "z-score for the confidence level",
            "format": "decimal4"
        },
        {
            "key": "unrounded",
            "label": "Exact value before rounding up",
            "format": "number"
        }
    ],
    "formula": {
        "text": "n₀ = z² × p(1 − p) ÷ E²;  with population N: n = n₀ ÷ (1 + (n₀ − 1) ÷ N);  round up",
        "variables": {
            "z": "standard normal value for the two-sided confidence level (1.96 for 95%)",
            "p": "expected proportion",
            "E": "margin of error as a decimal",
            "N": "population size"
        }
    },
    "worked_example": {
        "inputs": {
            "confidence": "95",
            "margin": "5",
            "proportion": "50",
            "population": ""
        },
        "steps": [
            "For 95% confidence, z = 1.959964.",
            "n₀ = 1.959964² × 0.5 × 0.5 ÷ 0.05² = 3.841459 × 0.25 ÷ 0.0025 ≈ 384.15.",
            "Round up: 385 responses."
        ],
        "result": "To estimate a percentage within ±5 points with 95% confidence, you need 385 completed responses."
    },
    "interpretation": "This is the number of completed responses, not invitations. If you expect a 20% response rate, invite about five times as many people.",
    "assumptions": [
        "A simple random sample, estimating a single proportion, using the normal approximation to the binomial distribution."
    ],
    "limitations": [
        "Clustered or stratified designs need a design effect; comparing two groups or estimating a mean needs a different formula.",
        "A random sample only fixes random error, not bias from who chooses to respond."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "Why does a population of millions need only about 385 people?",
            "answer": "Precision depends mostly on the sample size, not the population. The population matters only when the sample is a sizeable share of it, which the finite population correction handles."
        },
        {
            "question": "Why use 50% for the expected proportion?",
            "answer": "p(1 − p) is largest at 50%, so it gives the most conservative (largest) sample. If you know the answer is near 10% or 90%, a smaller sample suffices."
        }
    ],
    "sources": [],
    "related": [
        {
            "name": "Statistics Calculator",
            "url": "https://calculators.geekmidst.com/calculators/statistics-calculator"
        },
        {
            "name": "Probability Calculator",
            "url": "https://calculators.geekmidst.com/calculators/probability-calculator"
        },
        {
            "name": "Standard Deviation Calculator",
            "url": "https://calculators.geekmidst.com/calculators/standard-deviation-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}