Hypothesis Tests
Slovin's Formula Calculator
Slovin's formula turns a known population and a margin of error into a sample size, then rounds that size up to the next whole person.
Worksheet
Press Calculate to see the result.
Slovin's formula turns a known population and a margin of error into a sample size, then rounds that size up to the next whole person.
What this calculator answers
Survey teams reach for Slovin's formula when the frame has a known headcount and the margin they can live with is a proportion, while the yes-or-no rate itself is still unknown. This worksheet either builds the sample size from that population and margin or runs the equation backward to the margin a chosen sample would buy. A fractional respondent is rounded up, because the field team has to hire a whole interviewer slot. The algebra is the finite-population size that appears when the unknown rate is treated as one half and the normal cutoff is taken near 2.
The page reports the unrounded quotient and the next whole person at or above it. Response rate and design effect stay off this worksheet. Supporting counts and intermediate terms sit under the headline so a reader can see what was divided by what. When a checkbox or a tail setting changes the divisor or the rejection region, that choice appears in the steps rather than vanishing into a silent default.
The formula, written out
Slovin's sample size uses this relationship.
n = N / (1 + N e^2), and the inverse e = sqrt((N - n) / (n N))
- N. Population size, a whole count of the frame.
- e. Margin of error as a proportion, so 0.05 means 5 percent.
- n. Sample size before or after rounding up.
- e^2. The squared margin that sits in the denominator.
Start from a finite-population proportion sample with p set to one half, so p(1-p) is 0.25, and with a normal cutoff whose square times 0.25 equals 1. Clearing the algebra leaves N divided by 1 plus N times e squared. The inverse isolates e by rearranging that same identity, which is why the two modes cannot disagree. The algebra is the named textbook identity for this worksheet. Intermediate products and quotients appear in order so a calculator and a pencil can agree to the displayed rounding. If a neighbouring page uses a different divisor or a continuity correction, that page says so on its own ticket.
A full worked example
Example loaded in the worksheet
The loaded plan uses a population of 1000 and a margin of 0.05, which is 5 percent.
The population N is 1,000 and the margin e is 0.05, a proportion rather than a percent. Square the margin: 0.05 times 0.05 equals 0.0025. The denominator is 1 plus N times that square: 1 + 1,000 times 0.0025 equals 3.5.
Divide the population by the denominator: 1,000 divided by 3.5 equals 285.7143. The next whole person at or above 285.7143 is 286, which is the sample size to plan. The product p times (1 minus p) is largest at p equal to 0.5, where it equals 0.25, and this formula is the finite-population size for that bound with a cutoff near 2.
A response rate and a design effect are not multiplied in. Both adjustments are on Yamane's page, and here they stay at 1. The sample-size box is unused in this mode because the unknown being solved is n itself.
| Sample size | 286 |
|---|---|
| Unrounded n | 285.7143 |
| Margin e | 0.05 |
A second situation
Same population of 1000, solving the margin that a sample of 286 would buy
The population N is 1,000 and the sample size n is 286. Rearrange n = N / (1 + N e squared) so that e squared equals (N minus n) divided by (n times N). The numerator N minus n is 714 and the denominator n times N is 286,000.
Their ratio is 0.002497, and the positive square root is the margin 0.05. As a percent, that margin is 5 percent. This is the same identity as the sample-size mode, with e as the unknown instead of n.
The half-and-half bound is still in force: the margin describes a plan that assumed p equal to 0.5. No z cutoff was typed, and none was invented. Cochran's page is the one that asks for z.
| Margin e | 0.05 |
|---|---|
| Margin in percent | 5% |
| Sample size n | 286 |
Solving for the margin with N equal to 1000 and n equal to 286 walks back to a margin near 0.05, the partner of the loaded sample-size example. The equation is unchanged. Only the unknown swapped sides. The second example changes the feature that this formula is sensitive to, and the ticket shows the new figure beside the same definition. That contrast is the fastest way to see which input owns the movement.
What moves when the input moves
The margin tightened from 0.05 to 0.03. The population stayed at 1000. The headline result went from 286 to 527.
The nudged inputs
The population N is 1,000 and the margin e is 0.03, a proportion rather than a percent. Square the margin: 0.03 times 0.03 equals 0.0009. The denominator is 1 plus N times that square: 1 + 1,000 times 0.0009 equals 1.9.
Divide the population by the denominator: 1,000 divided by 1.9 equals 526.3158. The next whole person at or above 526.3158 is 527, which is the sample size to plan. The product p times (1 minus p) is largest at p equal to 0.5, where it equals 0.25, and this formula is the finite-population size for that bound with a cutoff near 2.
A response rate and a design effect are not multiplied in. Both adjustments are on Yamane's page, and here they stay at 1. The sample-size box is unused in this mode because the unknown being solved is n itself.
| Sample size | 527 |
|---|---|
| Unrounded n | 526.3158 |
| Margin e | 0.03 |
How to read the result
Read the rounded sample size as the number of completed interviews the margin requires under the half-and-half bound. Read the solved margin as the half-width that sample would claim on a yes-or-no rate, still under that bound. Say the unit, the sample size or contract terms, and the formula name in the same sentence as the figure. A number without those three pieces invites a later reader to invent a definition that this page never used.
Name N, e, and the rounded n in one sentence, and say the half-and-half bound was used. A sample size without the margin cannot be compared with another plan. Write the result with its unit, the inputs that produced it, and the name of the formula. If the ticket shows a decision sentence, quote the alpha and the tail with it. If the ticket shows a money or dose figure, quote the rate and the schedule that produced it.
Assumptions that have to stay true
- The population count includes every unit you might have sampled.
- The margin is a proportion between 0 and 1, not a percent typed as 5.
- A simple random sample is the working design, so no cluster penalty is hiding in the number.
- The unknown rate can be as awkward as one half. A rate you already know belongs on Cochran's page.
If an assumption above is false, do not average the discomfort away. Change the worksheet or change the question. A correct arithmetic step on the wrong model is still the wrong answer for the decision you are trying to make.
Mistakes that change the answer
- Typing 5 when the margin is 5 percent. The box wants 0.05.
- Rounding the quotient to the nearest person and dropping a fraction. This page rounds up.
- Dividing again by a response rate. That uplift is Yamane's worksheet.
- Multiplying by a design effect. That multiplier is also kept off this page.
Where a different calculator is the honest choice
Move to Cochran's formula calculator when you have a z cutoff and a guessed proportion or a numeric sigma. Move to Yamane's formula calculator when nonresponse or a design effect has to inflate the same base. Related links under the essay open pages that keep their own formulas instead of hiding a mode switch inside this ticket.
When the job changes, move to a page built for that job: Cochran's Formula Calculator, Yamane's Formula Calculator, Confidence Interval Calculator.
Check yourself
A town has 1000 households and the margin is 0.05. What sample size does Slovin's formula round up to?
The quotient is 285.7143, and the rounded sample size is 286 households.
Using the result in a sentence
A student council poll of a known student body, or a warehouse count of a known lot, is the usual setting. Once interviews start coming back, switch to a confidence interval on the rate you actually observed. Keep the count, the unit, and the assumption list beside any copy of the number that leaves this browser tab.
The number is a planning size, not a confidence interval for a rate you have already measured. It also ignores nonresponse, so the field count can come up short of 286 completed forms. Pair the headline with the steps before you staff a route, set a grade boundary, or compare two contracts from a single number.
Questions people ask next
01What definition does the Slovin's Formula Calculator commit to?
This page uses Slovin's sample size: n = N / (1 + N e^2), and the inverse e = sqrt((N - n) / (n N)). Start from a finite-population proportion sample with p set to one half, so p(1-p) is 0.25, and with a normal cutoff whose square times 0.25 equals 1. Clearing the algebra leaves N divided by 1 plus N times e squared. The inverse isolates e by rearranging that same identity, which is why the two modes cannot disagree. If a textbook uses a different divisor, a different continuity correction, or a different rounding rule, the last digits can move, so the definition is printed above the result. The worksheet asks for What to solve, Population N, Margin e, Sample size n, and it refuses a blank that the formula cannot interpret. Keep that printed definition in the sentence you write next to the figure so a later reader can rebuild the arithmetic without guessing which convention you chose.
02How should the worked example be read out loud?
In the loaded example the sample size is 286. Read the rounded sample size as the number of completed interviews the margin requires under the half-and-half bound. Read the solved margin as the half-width that sample would claim on a yes-or-no rate, still under that bound. Say the unit and the count before you say whether the number is large or small. Read the steps in order rather than jumping to the headline, because the intermediate terms are where a swapped percent and proportion usually hide. If the ticket shows both a primary figure and a comparison figure, name which one you are quoting.
03What is the fastest way to get a misleading result?
Typing 5 when the margin is 5 percent. The box wants 0.05. The number is a planning size, not a confidence interval for a rate you have already measured. It also ignores nonresponse, so the field count can come up short of 286 completed forms. A second common failure is leaving a checkbox or tail setting in the wrong state and then treating the number as if the default had matched your plan. Reset the example, change one input, and confirm the ticket moves in the direction the formula predicts before you trust a live run.
04When should I leave this page for a different calculator?
Move to Cochran's formula calculator when you have a z cutoff and a guessed proportion or a numeric sigma. Move to Yamane's formula calculator when nonresponse or a design effect has to inflate the same base. The related links under the essay go to those worksheets, which keep their own formulas instead of hiding them in a mode switch. If the question changed from a summary to a test, from a payment to a refinance, or from a raw score to a percentile, switch pages rather than forcing this ticket to answer a job it was not built for.
05What belongs in the sentence next to the number?
The quotient is 285.7143, and the rounded sample size is 286 households. Name N, e, and the rounded n in one sentence, and say the half-and-half bound was used. A sample size without the margin cannot be compared with another plan. A bare number without those three pieces cannot be audited when a score, a rate, or a lab value is challenged later. Store the inputs beside the result whenever the figure will travel into a report.