Standard error of a proportion calculator
A yes share of 0.4 from 100 answers has a sampling variance of 0.0024, and its square root is the standard error: the typical wobble of that share between samples. Enter the observed proportion and the sample size to get both, plus the complement. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Proportion
- 0.4
- Sample size
- 100
- Q
- 0.6
- Sampling variance
- 0.0024
- Standard error
- 0.0489897949
This standard error of a proportion calculator reports how precisely a sample proportion estimates an unknown population share. You enter a sample proportion p-hat between zero and one and a sample size n of at least one observation; the engine returns the binomial sampling variance p-hat times one minus p-hat over n, the standard error as the positive square root of that variance, and the complement q equals one minus p-hat so you can check your arithmetic against textbooks and spreadsheets. Classic checks include forty percent success in one hundred trials, which yields a standard error near four point nine percent after the product of point four and point six is divided by one hundred and square-rooted. The path is pure deterministic floating-point arithmetic: no network calls, no bootstrap resampling, and no date-dependent shortcuts.
What it measures and what you get back
The standard error of a sample proportion answers a different question from the raw sample percentage alone. A reported forty percent yes-vote is a point estimate; the standard error describes how much that percentage would be expected to wobble if you drew many independent samples of the same size from the same Bernoulli process.
Under independent identical trials with success probability p, the sampling variance of the sample proportion is p times one minus p divided by n, so an estimated standard error plugs in the observed p-hat for p and takes the positive square root. The size-below-one rule is intentional: a non-positive sample size is not a valid Bernoulli trial count for the classical formula.
If you need the standard error of a numeric mean rather than a share, use the dedicated standard error of the mean tool; if you need confidence intervals or hypothesis tests for proportions, combine this SE with your chosen critical value or p-value workflow separately.
Where SE of a proportion fits in study, surveys, product work, and reporting
Students meet the standard error of a proportion when a textbook builds confidence intervals for a share, when a lab asks for uncertainty on a conversion rate, or when they need a clean check against a calculator that only shows p-hat and leaves the square root of p times one minus p over n to the reader.
Teachers can pre-generate answer keys for modest sample sizes without trusting opaque apps that round intermediate products differently or hide whether they used the plug-in p-hat formula versus a hypothesized p zero under the null. Developers call the same contract from scripts to seed deterministic test vectors, to validate analytics pipelines that plot a conversion rate plus or minus SE, or to satisfy data-quality gates that flag proportions whose SE collapses when n is large but p-hat is not near the extremes.
Analysts use this SE when reporting poll shares, A/B test conversion rates, defect rates, or survey yes fractions so readers see precision of the estimated share rather than only the raw percentage. Product and operations teams watch SE of churn, click-through, and error rates as sample sizes change, because a proportion that looks stable can still have a large SE when n is small or when p-hat sits near one half where binomial variance peaks.
Pair it with mean SEM tools when your outcome is continuous rather than binary, and with z-score or probability tools when you standardize or complement probabilities rather than summarize the precision of a sample share.
What you can do with it
Homework and poll precision
Compute SE for textbook binomial samples and poll write-ups so reported percentages include √(p(1−p)/n) uncertainty.
Conversion and defect reporting
Attach standard error to conversion rates, defect rates, and survey yes fractions so readers see precision of the share, not only the raw percentage.
FAQ
What does the standard error of a proportion calculator cost?
It is free in your browser on this page.
How is SE of a proportion different from SEM of a mean?
SEM uses the sample standard deviation of continuous values divided by √n. SE of a proportion uses the binomial plug-in formula √(p̂(1−p̂)/n) for a binary share.
Why must the proportion be between 0 and 1?
A sample proportion is a fraction of successes in n trials and lives in the closed unit interval.
Is the result exact for every input?
Results are deterministic for the same input; ordinary double-precision limits still apply.
How do I turn the standard error into a confidence interval?
Multiply the standard error by the critical value you have chosen and add and subtract it from your sample proportion. The calculator gives you the standard error only; the interval or test is a separate step you do with it.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/stat/se-proportion \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"proportion":0.4,"sample_size":100}'const res = await fetch("https://api.kit.forhosting.com/stat/se-proportion", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"proportion": 0.4,
"sample_size": 100
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/stat/se-proportion",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"proportion": 0.4,
"sample_size": 100
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/stat/se-proportion", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"proportion":0.4,"sample_size":100}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"proportion":0.4,"sample_size":100}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/stat/se-proportion", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"proportion": 0.4,
"sample_size": 100
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "stat.se_proportion",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What the standard error of a proportion measures and what the response contains
This calculator always uses that plug-in formula: sampling_variance equals proportion times q over sample_size, and standard_error equals the square root of sampling_variance, with q returned as one minus the proportion for transparent checking. The response also echoes the cleaned proportion and sample_size and a short formula string naming SE equals the square root of p times one minus p over n. There is no approximate Monte Carlo path presented as truth and no silent clipping of out-of-range inputs into zeros: the engine either finishes the analytic square root inside the unit interval and size rules or rejects the input with invalid_input. Rejected cases include a missing proportion or sample size, non-finite numbers such as Infinity or NaN, a proportion strictly below zero or above one, and a sample size below one.
How inputs are read and how the analytic SE algorithm stays stable
Each value is parsed as a finite decimal; optional leading signs and scientific notation are allowed, while empty tokens, bare letters, and non-numeric objects fail with a clear field name in the message so a bad cell does not become a silent zero. After parsing, the engine enforces the closed unit interval for the proportion and requires sample size greater than or equal to one. Computation is a single product and division followed by a positive square root: sampling variance is proportion times one minus proportion divided by sample size, and the standard error is the square root of that variance. Boundary cases are intentional and useful: when the proportion is zero or one the product vanishes and the standard error is exactly zero, which matches the classical formula even though real-world intervals may need continuity corrections elsewhere. The preferred fields are proportion and sample_size, but aliases p, p_hat, and phat map to the proportion, while n and size map to the sample size, so spreadsheets, query strings, and typed forms can reuse the same contract without renaming columns. Providing more than one alias for the same role at once is rejected to avoid ambiguous precedence. Pair the free browser run on this page with the priced API when you need the identical descriptive result inside an automated pipeline without re-implementing the square-root formula yourself.
Where SE of a proportion fits in study, surveys, product work, and reporting
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result.
Integration use cases
Deterministic CI fixtures
Generate reproducible proportion, variance, and SE values for unit tests and data-quality gates without hand-maintaining tables.
Technical questions
Why must sample size be at least one?
The classical formula divides by n. A sample size below one is not a valid trial count for this SE; those inputs fail with invalid_input.