
A/B Testing Bandwidth Cost Formula
Learn how to estimate the additional data transfer and egress cost caused by an A/B test with different page weights.
This calculation compares the bandwidth required for serving the control page to all measured views with the bandwidth required while test traffic is split across the control and variations. It helps quantify the incremental transfer and estimated egress charge associated with a page-weight change.
- 100% Free
- No Sign-Up Required
- Private & Secure
- Mobile Friendly
Additional Egress Cost
Where:
First estimate all page views during the test. Calculate the average page weight among the evenly split test versions, compare total test transfer with an all-control baseline, and multiply the difference in GB by the egress price per GB.
Variables Explained
| Variable | What It Means | Unit |
|---|---|---|
| dailyVisitors - Average daily visitors | Average unique visitors per day during the test period. | visitors |
| pagesPerVisitor - Average page views per visitor | Average measured page views generated by each visitor. | pages |
| testDurationDays - Test duration | Number of days the experiment runs. | days |
| testTrafficPercent - Traffic included in test | Percentage of measured page views assigned to the experiment. | percent |
| variantCount - Total versions | Control plus all page variations. Test traffic is assumed to be evenly split. | versions |
| controlPageWeightKb - Control page transfer size | Average data transferred for one control page view after typical caching effects. | KB per page view |
| averageVariantPageWeightKb - Average variant page transfer size | Average data transferred for one variation page view. | KB per page view |
| egressRatePerGb - Data transfer rate | Hosting or CDN charge for each GB of outbound transfer. | currency per GB |
Step-by-Step Calculation
Estimate total visitors
Multiply average daily visitors by the number of test days.
totalVisitors = dailyVisitors * testDurationDays
Estimate measured page views
Convert total visitors into the page views covered by the estimate.
totalPageViews = totalVisitors * pagesPerVisitor
Separate test traffic
Only the selected share of traffic receives the experiment versions.
testPageViews = totalPageViews * (testTrafficPercent / 100)
Calculate average test page weight
With an even split, the control and each variation contribute equally to the average page weight.
averageTestPageWeightKb = (controlPageWeightKb + ((variantCount - 1) * averageVariantPageWeightKb)) / variantCount
Calculate baseline bandwidth
This is the estimated transfer if every measured page view received the control.
baselineBandwidthGb = (totalPageViews * controlPageWeightKb) / 1000000
Calculate test bandwidth and extra cost
Subtract the baseline transfer from test transfer, then apply the egress rate.
extraCost = (totalBandwidthGb - baselineBandwidthGb) * egressRatePerGb
Example: Two-version test with a heavier variation
Total visitors
10,000 * 14
140,000 visitors
Total page views
140,000 * 3
420,000 page views
Average test page weight
(800 + ((2 - 1) * 950)) / 2
875 KB
Baseline bandwidth
(420,000 * 800) / 1,000,000
336 GB
Test bandwidth
(420,000 * 875) / 1,000,000
367.5 GB
Additional cost
(367.5 - 336) * 0.09
$2.84
Final Result
The experiment adds an estimated 31.5 GB of transfer and $2.84 in egress cost. Estimated total egress cost for the measured test traffic is $33.08.
Assumptions
- ✓Daily traffic and page views per visitor remain broadly stable during the test.
- ✓Traffic assigned to the experiment is split evenly among the control and all variations.
- ✓Page transfer sizes represent average delivered KB per page view after normal caching effects.
- ✓One GB equals 1,000,000 KB for this estimate.
- ✓The specified egress rate applies consistently to the test-period traffic.
Limitations
- !Actual CDN or hosting invoices may use different GB definitions, regional prices, tiers, or included allowances.
- !Cache hit rates, device mix, geography, and returning visitors can change delivered bytes per page view.
- !The estimate excludes request charges, edge computing, storage, testing-platform fees, analytics events, and implementation costs.
- !An average variant weight can hide substantial size differences between individual variations.
Common Mistakes to Avoid
Entering only the number of variations and leaving out the control when setting total versions.
Using an uncached lab-test page size instead of a representative delivered transfer size.
Applying the experiment traffic percentage to visitors but not to the resulting page views.
Using compressed asset size without accounting for other transferred resources such as fonts, scripts, and images.
Treating the incremental egress estimate as the full cost of operating an experiment.
Related Formulas
Frequently Asked Questions
How is A/B testing bandwidth cost calculated?
The calculation estimates total page views, applies the test traffic share, computes the evenly weighted average test page size, and compares test transfer with an all-control baseline. The additional GB is multiplied by the egress rate.
Why does the formula include the control page in total versions?
The control receives part of the experiment traffic. In an A/B test there are two versions: one control and one variation.
Can the additional bandwidth cost be negative?
Yes. If the weighted test page size is smaller than the control page size, the estimate can show reduced transfer and a negative incremental cost.
Why is 1,000,000 used to convert KB to GB?
This calculator uses decimal units, where one GB is treated as 1,000,000 KB. Check your provider's billing documentation if it uses a different convention.
Ready to calculate your result?
Use the calculator to get instant results with your own inputs.