Initializing CalcuStats…

Sample Size Calculation + Statistical Analysis

Determine your optimal sample size using a comprehensive suite of validated statistical formulas, instantly export your results, generate publication-ready flowcharts, and analyze your data using descriptive and inferential statistics.

⊕

Proportional Allocation

Distribute your sample proportionally across population strata, with full non-response rate adjustment.

∑

Taro Yamane

Classic finite population formula for survey sampling. Fast, reliable, and universally recognized.

%

Cochran

Precision calculation for population proportions. Supports finite population correction and flexible input formats.

∫

Other Formulas

Single Population Proportion.

χ

Descriptive Statistics

Mean, median, mode, variance, standard deviation, range, quartiles, and summary statistics for your data.

⚙

Inferential Statistics

t-tests (one-sample, two sample, paired), ANOVA (One-Way, Two-way,ANCOVA, MANOVA), regression (linear, logistic, poisson), chi-square/fisher's exact, Kruskal-Wallis, Mann-Whitney, and others — with estimates, CIs, p-values, and effect size.

4
Sample Size (Formula Types)
∞
Strata Support (Unlimited)
0
Ads / Tracking
100%
Free Forever
19
Inferential Tests
⊕

Proportional Allocation

Allocate sample sizes proportionally across population strata. Ensures each group is represented in proportion to its size in the total population.

Parameters
Formula
n_i = (N_i / N) × n
n_i = stratum sample size  ·  N_i = stratum population  ·  N = total population  ·  n = total sample
Major Strata (e.g., Hospitals)
Advanced Mode — Add Sub-strata
Results
⊕

Ready to calculate

Fill in the parameters and click Calculate to see the allocation breakdown.

∑

Taro Yamane's Formula

Compute the required sample size for finite populations. Simple, widely cited, and assumes a 95% confidence level.

Parameters
Formula
n = N / (1 + N × e²)
N = population size  ·  e = margin of error  ·  Assumes 95% confidence (Z = 1.96)
Do you have more than one population group? (Unlimited nesting supported)

Enter your total population here, or use the "Do you have more than one population group?"
Decimal e.g. 0.05 = 5%
Allocate across strata? (0 groups)
Strata
Results
∑

Ready to calculate

Enter population size and margin of error, then hit Calculate.

%

Cochran's Formula

Calculates the required sample size based on an estimated population proportion. Supports flexible input formats and finite population correction.

Parameters
Formula
n₀ = Z² × p × (1−p) / e²
Finite correction: n = n₀ / (1 + (n₀−1)/N)  ·  p = proportion  ·  e = margin of error
Accepts: 0.50 (decimal), 50 (percent), or 50%
90%=1.645 · 95%=1.96 · 99%=2.576
For finite population correction
Allocate across strata?
Strata
Results
%

Ready to calculate

Enter proportion, Z-score, and margin of error, then hit Calculate.

∫

Other Formulas

Additional sample size methods for proportion.

Parameters
Formula
Allocate across strata?
Strata
Results
∫

Ready to calculate

Select a formula, enter parameters, then hit Calculate.

▣

Descriptive Statistics

Paste your data (with headers), select variables, and get comprehensive statistics — just like any statistical software! Supports both numerical and categorical data.

Import Data

Drop your data file here

or browse to upload

CSV Excel
No data loaded
⚙

Inferential Statistical Tests

Import your data, set variable types, then select and run your desired test.

Import Data

Drop your data file here

or browse to upload

CSV Excel
No data loaded
✓
Calculation Complete Results ready below

◈ Publication-Ready Flowchart Generator

Edit Diagram Nodes
NamePop (N)Sample (n)
Layout & Orientation
60px
Node Label Content
Show % allocation bar
Show non-response note
Show formula in header
Show legend
Colors
Alternating stratum colors
Typography
14px
12px
Node Dimensions
150px
54px
8px
1px
Title & Caption
Full Reset

Resets all colors, layout, typography, dimensions, node labels, and connector settings back to default values from the original calculation.

Live preview — customize with the controls on the left

Cite This Web App

Please cite CalcuStats in your research

APA 7th Edition

Ibrahim, M. M. (2026). CalcuStats: Free Sample Size Calculator & Statistical Analysis Software (Version 3.0) [Web application]. Retrieved from https://shinyhealthtools.github.io/calcustats/

MLA 9th Edition

Ibrahim, Mudasir Mohammed. CalcuStats: Free Sample Size Calculator & Statistical Analysis Software. Version 3.0, shinyhealthtools.github.io/calcustats/, 2026. Accessed August 19, 2026.

Chicago 17th Edition

Ibrahim, Mudasir Mohammed. CalcuStats: Free Sample Size Calculator & Statistical Analysis Software. Version 3.0. shinyhealthtools.github.io/calcustats/, 2026 (accessed August 19, 2026).

BibTeX
@misc{ibrahim2026calcustats,
  author = {Ibrahim, Mudasir Mohammed},
  title = {CalcuStats: Free Sample Size Calculator and Statistical Analysis Software},
  year = {2026},
  howpublished = {Web application},
  url = {https://shinyhealthtools.github.io/calcustats/},
  note = {Version 3.0}
}
Click any Copy button to copy the citation