A-Priori Sample Size Calculator

Interactive tool for calculating required sample sizes across different study designs and sampling methods. Visualize sampling strategies and understand design effects.

v2.0.0 Build 20251028
Educational Tool

This estimator helps you understand how sampling methods and study designs affect required sample sizes. Adjust parameters to see real-time effects on power and sample size requirements.

Study Design

Select your test type

80%

Probability of detecting an effect if it exists (typically 80%)

0.50

Sampling Method

Choose design and extraction

No stratification or clustering

Single homogeneous population

Stratified

Sample within subgroups

Cluster

Sample groups, then all within

Stratified + Cluster

Strata, then clusters within

Simple Random

Equal probability for all units

Systematic Random

Select every kth unit

Sample Size Required

Based on your study parameters

73
Required Sample Size
58%
Target Power
0.50
Effect Size

Power Analysis Curve

Statistical Power
Target (0.80)
Theme

Current Design: With N = 73, you have 57.7% power to detect an effect size of 0.50 at α = 0.05.

Power is below the recommended 80% threshold.

Sampling Design Report

APA-formatted summary of your sampling design

Table 1
Sample Size Requirements for Detecting Mean Differences
Parameter Value Description
Test Type
Effect Size (d)
Significance Level (α)
Statistical Power (1-β)
Test Direction
Sampling Design
Extraction Method
Required Sample Size
Note:

Sample size calculated using power analysis for mean differences. Design effects and finite population corrections applied where specified.

R Code

Reproduce this analysis in R using the pwr package

Copy this code to reproduce the analysis in R (pwr). Python support is coming soon.

Computed locally in your browser. Results typically match R pwr; minor differences may occur for the reasons above.
R Code
R Output
New to R? This code uses base R functions and common packages.
  • Install required packages once with install.packages()
  • Load packages with library()
  • Modify the values to match your data
  • Run line-by-line to understand each step
Want to learn more about using R for statistical analysis? View R Tutorials