Sample size calculator
Open Sample size calculator on Happytails.ai. This view has the same page content and links, with explicit tool capabilities. Read the processing notes before using a tool.
Tool capabilities
{
"id": "sample-size-calculator",
"category": "calculators",
"built": true,
"requirements": "Normal-approximation precision planning, not a power analysis. Confidence 50–99.99%; finite populations up to one billion. Expected proportions must be strictly between 0 and 100%. A low expected event count triggers a warning. Invitations can exceed the available population and are flagged.",
"implementation": {
"fields": [
{
"key": "method",
"label": "Plan an estimate of",
"value": "Proportion",
"type": "select",
"values": [
"Proportion",
"Mean (known planning SD)"
]
},
{
"key": "confidence",
"label": "Confidence level (%)",
"value": 95,
"type": "number",
"min": 50,
"max": 99.99,
"step": "any"
},
{
"key": "margin",
"label": "Margin of error",
"value": 5,
"type": "number",
"min": 1e-08,
"max": 1000000000000,
"step": "any",
"help": "For a proportion, use percentage points: 5 means ±5 points. For a mean, use the measurement units."
},
{
"key": "proportion",
"label": "Expected proportion (%)",
"value": 50,
"type": "number",
"min": 0.001,
"max": 99.999,
"step": "any",
"help": "Use 50% when unsure. Very rare outcomes may make normal-approximation planning unreliable.",
"showWhen": {
"method": [
"Proportion"
]
}
},
{
"key": "sd",
"label": "Planning standard deviation",
"value": 10,
"type": "number",
"min": 1e-12,
"max": 1000000000000,
"step": "any",
"showWhen": {
"method": [
"Mean (known planning SD)"
]
}
},
{
"key": "population",
"label": "Finite population (optional)",
"value": "",
"type": "number",
"min": 2,
"max": 1000000000,
"step": 1,
"required": false
},
{
"key": "designEffect",
"label": "Design effect",
"value": 1,
"type": "number",
"min": 0.01,
"max": 1000,
"step": "any"
},
{
"key": "responseRate",
"label": "Expected response rate (%)",
"value": 100,
"type": "number",
"min": 0.01,
"max": 100,
"step": "any"
}
],
"note": "Estimate required completed responses for precision, not hypothesis-test power. Population correction assumes random sampling without replacement. Response-rate planning does not guarantee enough responses.",
"input": false,
"live": true,
"presentation": "metrics",
"background": false,
"inputMaxLength": 1000000,
"inputErrorCode": "STAT_SIZE",
"experience": {
"automatic": true,
"single": false,
"inputMaxLength": 1000000,
"inputMode": "text",
"label": "Your text",
"placeholder": "Type or paste your input…",
"help": "Change the input or settings to update your result. Results update as you type. Up to 1,000,000 characters.",
"helpParts": [
"Change the input or settings to update your result.",
"Results update as you type.",
"Up to 1,000,000 characters."
],
"action": null
},
"mode": "automatic",
"interactive": false
},
"execution": "Browser interface",
"api": null,
"browser_agent": {
"supported": true,
"name": "run_current_tool",
"discovery": "WebMCP on the human page in a supporting browser",
"verification": "See audit/API-AUDIT.md; availability is not verification"
}
}Page guide
Plan completed responses and invitations for a proportion or mean, with stated confidence, precision and population assumptions.
How to use Sample size calculator
- Enter the observations or summary values.
- Choose the method and check its assumptions.
- Review the result and download the calculation.
Useful next steps
Choose the model before reading the result
Plan completed responses and invitations for a proportion or mean, with stated confidence, precision and population assumptions.
Check the assumptions
Normal-approximation precision planning, not a power analysis. Confidence 50–99.99%; finite populations up to one billion. Expected proportions must be strictly between 0 and 100%. A low expected event count triggers a warning. Invitations can exceed the available population and are flagged.
Keep the calculation
Download the JSON for unrounded results and settings, CSV for the table, and the separate assumptions note. The calculation runs in your browser.