A/B Testing Sample Size Calculator

A/B Testing Sample Size Calculator: Applies standard two-tailed two-proportion z-test sample size formula using normal critical values.

Ab Test Sample Size · Client runtimeSandboxed
Formatted results will render here in real time.

About this a/b testing sample size calculator

Applies standard two-tailed two-proportion z-test sample size formula using normal critical values Enables rapid evaluation of advertising efficiency and campaign economics without transmitting proprietary media budget figures.

Metrics formula & attribution logic

Calculation and parameter relationship: p₂=baselineRate×(1+relativeLift); p₁=baselineRate; p̄=(p₁+p₂)/2; n≈ceil((z(1−alpha/2)√(2p̄(1−p̄))+z(power)√(p₁(1−p₁)+p₂(1−p₂)))²/(p₂−p₁)²) Duration estimate: ceil(2×n / visitorsPerDay), where daily visitors are the combined eligible total for a 1:1 split.

Worked campaign analytics example

Scenario: Use the following data to evaluate A/B Testing Sample Size Calculator

Sample input:

{"baselineRate":0.1,"relativeLift":0.2,"alpha":0.05,"power":0.8,"visitorsPerDay":1000}

Processing: Calculation and parameter relationship: p₂=baselineRate×(1+relativeLift); p₁=baselineRate; p̄=(p₁+p₂)/2; n≈ceil((z(1−alpha/2)√(2p̄(1−p̄))+z(power)√(p₁(1−p₁)+p₂(1−p₂)))²/(p₂−p₁)²) Duration estimate = ceil(2×n / visitorsPerDay), where daily visitors are the combined eligible total for a 1:1 split.

Illustrative output:

{ "baselineRate": 0.1, "variantRate": 0.12, "relativeLift": 0.2, "alpha": 0.05, "power": 0.8, "approxSamplePerVariant": 3841, "method": "two-sided normal approximation for two independent proportions", "visitorsPerDay": 1000, "approxTotalSample": 7682, "approxRunDays": 8, "allocationAssumption": "1:1 split; visitorsPerDay is total eligible visitors across both variants" }

Input parameters & edge case boundaries

Parameter domains and units: 0 < baselineRate,variantRate,alpha,power < 1; relativeLift ≠ 0; variantRate = baselineRate×(1+relativeLift); 0.1 = 10%. Results use binary64 floating-point numbers unless BigInt is stated. Result cards show up to 10 significant digits; raw output retains the serialized value. visitorsPerDay > 0; run days assume 1:1 allocation and steady daily traffic; uneven allocation and traffic changes are not modeled.

Marketing metrics in A/B Testing Sample Size Calculator implement standard industry formulas (IAB/MRC). External ad platform reporting may differ slightly due to time zone cutoffs or attribution windows.

Local metrics evaluation boundary

Formula calculations and numeric evaluations in A/B Testing Sample Size Calculator run synchronously in the browser JavaScript engine with zero server telemetry.

Advertising industry standards & specifications

Interactive Advertising Bureau (IAB) measurement guidelines and Media Rating Council (MRC) reporting standards:

A/B Testing Sample Size Calculator verification · Audit standards

How to use it

  1. Select “Raw JSON / Advanced” and paste the sample input.
  2. Click “Run locally”.
  3. Compare “Raw Output Data” with the example; revise inputs when an error is shown.

Frequently asked questions

Which calculation does A/B Testing Sample Size Calculator perform?+

Calculation and parameter relationship: p₂=baselineRate×(1+relativeLift); p₁=baselineRate; p̄=(p₁+p₂)/2; n≈ceil((z(1−alpha/2)√(2p̄(1−p̄))+z(power)√(p₁(1−p₁)+p₂(1−p₂)))²/(p₂−p₁)²) Estimated full days = ceil(2×n / visitorsPerDay), with visitorsPerDay as combined eligible daily traffic for a 1:1 split and steady traffic.

What input can I paste into A/B Testing Sample Size Calculator?+

Paste this complete input exactly, preserving JSON field names: {"baselineRate":0.1,"relativeLift":0.2,"alpha":0.05,"power":0.8,"visitorsPerDay":1000}

Which parameter limits and units apply to A/B Testing Sample Size Calculator?+

Parameter domains and units: 0 < baselineRate, variantRate, alpha, power < 1; relativeLift ≠ 0; variantRate = baselineRate×(1+relativeLift); 0.1 = 10%; visitorsPerDay must be a positive number and is the combined eligible daily traffic for both variants. Estimated whole days = ceil(2×n / visitorsPerDay), assuming a steady daily total and 1:1 allocation.

What result does this A/B Testing Sample Size Calculator example produce?+

With visitorsPerDay=1000, the example produces these values in the raw output: { "baselineRate": 0.1, "variantRate": 0.12, "relativeLift": 0.2, "alpha": 0.05, "power": 0.8, "visitorsPerDay": 1000, "approxSamplePerVariant": 3841, "approxTotalSample": 7682, "approxRunDays": 8, "allocationAssumption": "1:1 split; visitorsPerDay is total eligible visitors across both variants", "method": "two-sided normal approximation for two independent proportions" }