← All documentation

Sample size calculation

Plan sample size or statistical power for a specified study design and effect size.

Data requirements

No participant dataset is required. Enter planning assumptions directly for a two-group comparison.

Parameters

Names match the analysis form. Starting values describe a newly loaded form; column selections depend on your uploaded data. Matching example column names may be preselected. Review every selection before running.

“Optional / conditional” fields may be required by a particular mode or method. The explanation states when each field takes effect. Hold Ctrl / Command to select multiple columns.

Study

Choice

means compares continuous means; proportions compares event probabilities.

means
means
proportions
proportions
Input
Required
Starting value
means

Design

Choice

difference, superiority, non-inferiority and equivalence select the planning formula. The margin and effect direction must match the design.

difference
difference
superiority
superiority
non inferiority
non-inferiority
equivalence
equivalence
Input
Required
Starting value
difference

Ratio

Number

Positive group allocation ratio passed to the planning formula, up to 20. A value of 1 plans equal allocation; review both reported group sizes when changing it.

Input
Required
Starting value
1.0

Alpha

Number

Type I error probability strictly between 0 and 0.5. Enter 0.05 for 5%, rather than 5.

Input
Required
Starting value
0.05

Power

Number

Target power strictly between 0.5 and 1. Enter 0.8 for 80%.

Input
Required
Starting value
0.8

Sd

Number

Positive common standard deviation, shown and validated for means only.

Input
Required
Starting value
1.0

Theta

Number

Planned treatment-minus-control mean effect for means. The proportions effect instead uses p1 minus p2.

Input
Required
Starting value
0.5

Delta

Number

Signed margin for superiority/non-inferiority, or positive equivalence margin. The planned effect must exceed the signed margin for superiority/non-inferiority. Equivalence requires delta > absolute planned effect. Ignored for difference.

Input
Required
Starting value
0.2

P1

Number

First event probability for proportions, strictly between 0 and 1. Hidden and ignored for means. The proportions effect is p1 minus p2.

Input
Required
Starting value
0.7

P2

Number

Second event probability for proportions, strictly between 0 and 1. Together with p1, supplies the planned proportions effect.

Input
Required
Starting value
0.8

Example settings

Open the analysis and enter these assumptions. No data upload is needed.

Sample size calculation — bundled example settings
Parameter Setting
Study means
Design difference
Ratio 1.0
Alpha 0.05
Power 0.8
Sd 1.0
Theta 0.5
Delta 0.2
P1 0.7
P2 0.8

Results

The sample-size table contains the planning formula's group sizes and rounded-up sizes. Review assumptions and the reported allocation before using the plan. Additional downloadable analysis-summary and diagnostics tables describe the analysis scope and method checks. Selected-variable missingness is reported where applicable. Diagnostics do not establish external validity or verify untested assumptions.

Review the reported method, observation count and notes alongside the estimates. Result tables can be downloaded as CSV and the figure as PNG.

Notes & limitations

  • A difference design requires a nonzero planned effect. The bundled example uses means, effect 0.5, SD 1, alpha 0.05 and power 0.8.
  • This interface calculates sample size for a specified power; a separate achieved-power mode is not available.