A sample that is too small gives unreliable conclusions and wide confidence intervals, while one that is too large wastes resources. Given the confidence level and allowed error (or test power), a sample size calculation returns the minimum sample that satisfies the requirement, and it is a basic step in sampling, experiment design, market research and clinical trials, and a common requirement in plan approval and audits. Define the test objective and acceptable risk before calculating, and write the sample size conclusion into the study plan instead of deciding by experience or convention.
To estimate a population mean, use n = (z times sigma divided by E) squared where E is the allowed error and sigma comes from historical data or a small pilot sample; to estimate a population proportion, use n = z squared times p(1-p) divided by E squared, taking p = 0.5 (most conservative) when unknown. The tool supports an iterative t-distribution correction when sigma is unknown and a finite population correction (FPC), so both estimation problems return the minimum sample size that meets the required precision.
For comparing two means or two proportions, the required sample depends on the test type (two- or one-sided), significance level alpha, power 1 minus beta and effect size (the minimum detectable difference): higher power and smaller detectable differences both demand larger samples. The tool covers independent-sample t tests, paired tests, proportion tests and equivalence tests (TOST). For testing, the effect size assumption needs professional judgment rather than a simple default.
Clarify the objective (estimation or testing), set the confidence level (95%), power (80% or 90%), effect size and variation estimate, calculate, then adjust upward for practical feasibility and dropout rates. Inaccurate sigma or effect size estimates affect results significantly, so combine historical data with professional judgment, and record the assumptions so reviewers can reproduce and adjust the parameters. The tool works online and can add an AI interpretation.