CalculatorMasters

A/B Testing File Size Formula

Learn how an A/B test's traffic split, file sizes, requests, and cache hit rate determine estimated data transfer.

This formula estimates how much more or less data an A/B test transfers than serving the control file to every uncached request. It helps quantify the bandwidth effect of testing a larger or smaller file before considering other performance factors.

  • 100% Free
  • No Sign-Up Required
  • Private & Secure
  • Mobile Friendly

A/B Test Bandwidth Difference

Bandwidth difference (GB) = [(Variant size − Control size) × Visitors × Downloads per visitor × (1 − Cache hit rate) × Variant traffic share] ÷ 1,048,576

Where:

Find the size difference per file download, multiply it by the uncached requests receiving the variant, then convert kilobytes to gigabytes. A positive result means the test transfers more data than an all-control baseline.

Variables Explained

VariableWhat It MeansUnit
variantFileSize - Variant file sizeDownloaded size of the file served to visitors assigned to the variant.KB
controlFileSize - Control file sizeDownloaded size of the existing control file.KB
testVisitors - Test visitorsExpected unique visitors included in the experiment.number
downloadsPerVisitor - Downloads per visitorAverage number of times each visitor requests the file.number
cacheHitRate - Cache hit rateShare of requests expected to be served from cache without a new file transfer.percent
variantTrafficShare - Variant traffic sharePercentage of uncached test requests assigned to the variant.percent

Step-by-Step Calculation

1

Estimate total requests

Multiply expected test visitors by the average number of file requests per visitor.

totalRequests = testVisitors * downloadsPerVisitor

2

Remove cached requests

Only the uncached share is counted as a new file transfer in this estimate.

uncachedRequests = totalRequests * (1 - cacheHitRate / 100)

3

Allocate variant requests

Apply the experiment's variant traffic allocation to uncached requests.

variantRequests = uncachedRequests * (variantTrafficShare / 100)

4

Calculate the all-control baseline

This is the estimated transfer if every uncached request received the control file.

controlOnlyTransferGb = (controlFileSize * uncachedRequests) / 1048576

5

Calculate A/B test transfer

Add the control and variant transfer amounts based on their assigned uncached requests.

abTestTransferGb = ((controlFileSize * (uncachedRequests - variantRequests)) + (variantFileSize * variantRequests)) / 1048576

6

Compare the test with the baseline

A positive result indicates additional transfer from the A/B test; a negative result indicates reduced transfer.

bandwidthDifferenceGb = abTestTransferGb - controlOnlyTransferGb

Example: 300 KB variant tested against a 250 KB control

Control file size250 KB
Variant file size300 KB
Test visitors100,000
Downloads per visitor2
Variant traffic share50%
Cache hit rate30%
1

Total file requests

100,000 × 2

200,000 requests

2

Uncached requests

200,000 × (1 − 30 / 100)

140,000 requests

3

Variant requests

140,000 × 50 / 100

70,000 requests

4

Control-only transfer

(250 × 140,000) ÷ 1,048,576

33.38 GB

5

A/B test transfer

[(250 × 70,000) + (300 × 70,000)] ÷ 1,048,576

36.72 GB

6

Bandwidth difference

36.72 − 33.38

+3.34 GB

Final Result

The 50/50 A/B test is estimated to transfer 3.34 GB more than serving the 250 KB control file to all uncached requests.

Try the Calculator →

Assumptions

  • Entered file sizes represent the typical downloaded response size in KB.
  • Each visitor makes the stated average number of file requests.
  • The same cache hit rate applies to both control and variant requests.
  • Traffic allocation is applied to uncached requests using the entered variant share.
  • One GB is treated as 1,048,576 KB.

Limitations

  • !The estimate excludes HTTP headers, retries, redirects, and other page resources.
  • !Actual cache behavior can vary by browser, device, geography, CDN configuration, and cache-control headers.
  • !File compression may vary by client or content encoding and can change transferred size.
  • !The calculation measures transfer volume, not loading speed, conversion impact, infrastructure cost, or server load.

Common Mistakes to Avoid

1

Entering an uncompressed build size instead of the typical transferred size.

2

Using all site visitors when only a subset is expected to enter the experiment.

3

Treating a 30% cache hit rate as 0.30 without using percentage input conventions.

4

Forgetting that a 10% variant allocation limits the transfer impact to roughly one tenth of uncached requests.

5

Interpreting a positive bandwidth difference as a direct measure of page-speed change.

Related Formulas

Frequently Asked Questions

What is the A/B testing file size formula?

The bandwidth difference equals the variant-minus-control file size multiplied by uncached requests assigned to the variant, then divided by 1,048,576 to express the result in GB.

Why does only variant traffic affect the bandwidth difference?

The control traffic is the same in both the A/B test and the all-control comparison. Only requests receiving a differently sized variant create the difference.

What does a negative bandwidth difference mean?

It means the variant is smaller than the control and the selected test allocation is estimated to transfer less data than the all-control baseline.

Why is cache hit rate subtracted before traffic allocation?

Cached requests are assumed not to download the file again, so the calculation first estimates requests that result in a file transfer.

How is KB converted to GB in this calculator?

The calculator divides kilobytes by 1,048,576, which is 1,024 × 1,024 KB per GB.

Ready to calculate your result?

Use the calculator to get instant results with your own inputs.

Try A/B Testing File Size