Skip to content
Testing Tool

QR Scan Test Sample Calculator

Work out how many scans a test needs: one figure for measuring a single rate within a margin of error, and one per-variant figure for an A/B test that can detect a given improvement. Both are computed from your inputs with standard sample-size formulas.

1. Enter test parameters

Formulas: one-sample n = z² · p(1−p) / E². Two-sample per-variant n = (zα + zβ)² · [p₁(1−p₁) + p₂(1−p₂)] / (p₂−p₁)², where p₂ = baseline + MDE. Results are rounded up to whole scans.

Result
A/B test — scans needed per variant
2,211
4,422 total across both variants
One-sample measurement457 scans
Target rate to detect7.0% (from 5%)

Plan the test to reach the A/B figure before judging the winner — stopping early because the result looks good inflates false positives.

Decide the Sample Size Before the Test

A test judged too early is a coin flip dressed as data. The sample-size formulas used here turn your ambition — how small an improvement you need to detect, and how sure you want to be — into a concrete number of scans. The honest trade-off is that small effects need large samples: if the required sample exceeds the traffic the placement will ever get, the test cannot answer the question, and you should either accept a larger detectable effect or pick a busier placement.

After the test

Run to the planned size, then judge the result with a significance test on the final numbers — do not re-decide the sample size mid-test based on interim results.

Frequently Asked Questions

What is the difference between the two sample sizes?

The one-sample figure sizes a single measurement (e.g. estimating one code’s scan rate within a margin of error). The A/B figure sizes a two-variant comparison: it is the number of scans needed per variant to detect the stated improvement with the chosen power.

What is minimum detectable effect (MDE)?

The smallest improvement you care about detecting, in percentage points. A smaller MDE needs a much larger sample — halving the MDE roughly quadruples the required sample size.

What does power mean here?

Power is the chance of detecting a real improvement of the MDE size: 80% power means a 1-in-5 chance of missing a real effect. Higher power needs a larger sample.

Why is the A/B sample so much bigger than the one-sample figure?

Comparing two noisy rates needs more data than measuring one rate, because the difference between two estimates is noisier than either estimate alone. That is normal — budget for the A/B figure when you plan a test.