Sample size calculator

Working backwards from the margin of error you can live with gives the sample size you have to collect.

%
%

Leave at zero for an effectively infinite population.

Sample size needed
1068
= Exact Sample size
Before the population correction
1067.1
Share of the population
0.000 %
Show the working
  1. Target margin of error = 3
  2. Expected proportion = 50
  3. Confidence level = 1.959 96
  4. Population size = 0
  5. prop = 50 / 100 = 0.5
  6. err = 3 / 100 = 0.03
  7. Before the population correction = 1.959 96^2 * 0.5 * (1 - 0.5) / 0.03^2 = 1067.07
  8. adjusted = 0 > 0 ? 1067.07 / (1 + (1067.07 - 1)/0) : 1067.07 = 1067.07
  9. Sample size needed = ceil(1067.07) = 1068
  10. Share of the population = 0 > 0 ? 1068 / 0 * 100 : 0 = 0

Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.

Scenarios & local history

Compare a saved scenario

Recent calculations

    The formula

    • n = z^2 p(1-p) / e^2
    • adjusted n = n / (1 + (n - 1)/N) for a finite population

    Assuming a 50/50 split gives the largest, safest sample size. If you genuinely expect a lopsided result you can use fewer.

    A 3% margin at 95% confidence needs 1068 responses, whether the population is a city or a country.

    Related calculators

    Settings

    Theme

    System follows your operating system and changes with it.

    Text size
    High contrast

    Maximises text and border contrast and removes the grid background.

    Graph-paper background

    Round to
    Notation
    Thousands separators
    Decimal mark
    Nearest fraction

    Shows the result as the nearest tape-measure fraction, with the error it costs.


    Accessibility & interaction
    Reduce motion Stops interface animations even when the operating system does not.
    Underline links Keeps links visually distinct without relying on colour.
    Larger touch targets Makes buttons and form controls easier to tap.
    Shorter reading lines Limits article width for easier scanning.
    Monochrome display Removes colour as an information cue.
    Always-visible focus Makes the keyboard focus ring persistent and stronger.
    Verbose screen-reader results Announces the complete conversion equation.
    Sticky action bars Keeps converter and calculator actions within reach.
    Select values on focus Replaces a value immediately when you start typing.
    Left-handed mobile layout Moves key mobile actions toward the left thumb.

    Your data

    Settings, recent conversions and favourites live in this browser only. Nothing is sent anywhere.

    Offline library