Underleaf Logo
Underleaf
UniversitiesAccessibilityBlogPricing
Log InTry Free
All tools

Statistics

Statistics

Sample Size Calculator

Estimate the sample size you need for a survey, RCT, or observational study, with finite-population correction.

Input

Study parameters

How close your estimate must be to the true population value. 5% is the survey-research default.

Use 50% if you have no prior estimate, gives the largest, most conservative N.

If known, applies the finite-population correction (lower N).

Output

Required sample size

Minimum n
385
participants for 95% confidence, ±5% margin
Critical z
1.960
Infinite-pop n
385

Formula: n = z²·p·(1-p)/e². With finite-population correction: n' = n / (1 + (n-1)/N).

When to use what

• Standard survey: 95%, ±5%, p=50% → n ≈ 385

• High-stakes survey: 99%, ±3% → n ≈ 1843

• Pilot study: 90%, ±10% → n ≈ 68

• Tight margin: 95%, ±2% → n ≈ 2401

Write up your methods section in Underleaf

Underleaf is an AI-powered LaTeX editor with inline writing help and a citation finder, useful when you're drafting the rationale behind your sample size.

Try Underleaf free

What this calculator does, and doesn't, cover

This is the standard proportion-based sample-size formula. It answers: "How many participants do I need to estimate a single proportion (e.g. a yes/no question, a presence/absence marker) within a given margin of error at a chosen confidence level?" That covers most survey research and many observational studies.

For comparing two groups (RCT, A/B test, between-subjects experiment), you also need an effect size and power target , that's a power analysis, distinct from this calculator. For time-to-event analysis or hierarchical/nested designs, consult a statistician.

Related tools

p-value calculatorConfidence interval calculatorCSV viewer

Explore More Tools

Image to LaTeX

Convert images of notes, equations, or tables to LaTeX code.

Equation to LaTeX

Convert equations to LaTeX code from text or images.

Table to LaTeX

Convert tables to LaTeX code from text or images.

Excel to LaTeX

Convert Excel spreadsheet data to LaTeX tables.

Try more tools for free

Create an account to unlock all features

More file conversions

AI writing tools

PDF preview

100% free to try

Get started for free
Underleaf Logo
Underleaf

Empowering students and researchers with AI-powered tools for academic writing.

Go to appContact us

Company

PricingBlogTutorialsAffiliate Program

Free Tools

Image to LaTeXExcel to LaTeXArXiv to LaTeXTikZ GeneratorThesis GeneratorChrome ExtensionAll Tools

© 2026 Underleaf. All rights reserved.