Clinical Trial Sample Size & Statistical Power Calculator
Calculate required patient sample size per treatment arm for superiority randomized controlled trials (RCTs) based on statistical power, alpha, and effect size.
Parameters & Inversions
Deterministic EngineCalculated Output Metrics
Analytical Proof & Invariants
Machine PrecisionN_arm = 2 · (Z_α/2 + Z_β)² · p̄(1 - p̄) / (p₁ - p₂)²
Step-by-Step Mathematical Derivation
For two-tailed α = 0.05: Z_α/2 = 1.960. For 80% statistical power (β = 0.20): Z_β = 0.842. (Z_α/2 + Z_β)² = (1.960 + 0.842)² = (2.802)² = 7.851.
p₁ = 0.20, p₂ = 0.35. Pooled mean p̄ = (0.20 + 0.35) / 2 = 0.275. Variance factor = 2 · p̄(1 - p̄) = 2 × 0.275 × 0.725 = 0.39875.
N_arm = [7.851 × 0.39875] / (0.35 - 0.20)² = 3.1306 / (0.15)² = 3.1306 / 0.0225 = 139.1 ≈ 138 patients per arm.
Total needed = 138 × 2 arms = 276 evaluable patients. With 15% dropout: Total Enrolled = 276 / (1 - 0.15) = 324.7 ≈ 326 total patients to recruit.
Artificial Intelligence & Prompt Integration
Paste this verified mathematical prompt directly into ChatGPT, Claude, or Gemini to eliminate arithmetic hallucination, or invoke the programmatic API endpoint for automated workflows.
Generating verified mathematical prompt...
llms.txt
✓ Exact Radical Form & Closed Formulas
✓ Machine-Readable Edge API