What Makes a Good Sample Size Calculator?

Mårten Schultzberg27 May 2026

Problem

A team enters a baseline rate, a minimum detectable effect, alpha and power into a sample size calculator and plans the experiment around the result. The calculator usually assumes a fixed-sample test of one metric. If the platform analyzes the experiment differently, the number is wrong by construction. The experiment then ends underpowered and inconclusive, or it holds traffic for weeks longer than needed. At Spotify, experiment throughput is high and traffic is scarce, so either error costs a slot that cannot be recovered.

Example from the article: a calculator assumes a fixed-sample test while the analysis uses always-valid confidence sequences, so the experiment starts underpowered and nobody suspects the calculator.

Solution in brief

Treat the calculator as the front end of the analysis pipeline. It reads the same settings as the analysis: sequential method, number of looks, metric roles, correction type, variance reduction and the affected population. Each setting changes the required sample size, and the errors multiply, so they cannot be fixed by hand.

Questions this case answers
  • How to plan the sample size of a randomized experiment when the analysis uses interim looks, several decision metrics and variance reduction, so that the planned power matches the real one
  • How to get a sample size that is correct for the way the experiment will actually be analyzed?
  • How to estimate how much sequential testing and multiple-testing corrections add to the required sample size?
  • How to account for guardrail metrics when planning the power of an A/B test?

Tools and methods

  • Sequential testing — the chosen method sets the extra sample needed
  • Multiple-testing correction — success metrics shrink alpha, guardrails raise the needed power
  • Variance reduction (CUPED-style) — uses effective variance, which can reorder metrics
  • Trigger analysis — plans for the affected users only
  • Power monitoring during the run — updates the required sample from observed variance
Continue reading — it's free

Google or a one-time email code. No password.