
A/B Testing Cloud Cost Per-User Formula
Learn how to estimate total A/B test cloud spend, blended cost per user, and incremental cost versus the control experience.
This calculation estimates the infrastructure cost of exposing users to an A/B test. It separates control and variant traffic, adds any fixed experiment costs, and compares the result with a control-only baseline for the same estimated audience.
- 100% Free
- No Sign-Up Required
- Private & Secure
- Mobile Friendly
Blended cloud cost per user
Where:
Calculate each group's variable cloud cost, add the one-time test cost, and divide the total by everyone estimated to see the experiment.
Variables Explained
| Variable | What It Means | Unit |
|---|---|---|
| monthlyUsers - Monthly active users | Expected users of the tested feature or service in a typical 30-day month. | users |
| testDurationDays - Test duration | Number of days the experiment runs. | days |
| testUsers - Estimated test users | Estimated users exposed during the test period. | users |
| variantTrafficPercent - Variant traffic allocation | Percentage of estimated test users assigned to the variant. | percent |
| controlUsers - Control users | Estimated test users remaining in the control group. | users |
| variantUsers - Variant users | Estimated test users assigned to the variant group. | users |
| controlCostPerUser - Control cloud cost per user | Variable cloud cost for one user served by the existing experience. | currency |
| variantCostPerUser - Variant cloud cost per user | Variable cloud cost for one user served by the proposed experience. | currency |
| fixedTestCost - Fixed test cloud cost | One-off cloud costs attributable to the experiment. | currency |
Step-by-Step Calculation
Estimate exposure during the test
Scale typical monthly active users to the selected number of test days.
testUsers = monthlyUsers * testDurationDays / 30
Split users between the groups
Apply the variant allocation to the estimated test audience.
variantUsers = testUsers * variantTrafficPercent / 100
Calculate control users
The rest of the estimated test audience is assigned to control.
controlUsers = testUsers - variantUsers
Calculate variable group costs
Multiply the users in each group by that experience's variable per-user cost.
controlCloudCost = controlUsers * controlCostPerUser; variantCloudCost = variantUsers * variantCostPerUser
Calculate total test cloud cost
Add both group costs and the fixed cloud costs of running the experiment.
totalTestCloudCost = controlCloudCost + variantCloudCost + fixedTestCost
Calculate the baseline and incremental cost
Compare test spend with serving every estimated test user through control.
baselineCloudCost = testUsers * controlCostPerUser; incrementalCloudCost = totalTestCloudCost - baselineCloudCost
Calculate cloud cost uplift
Express the change from the control-only baseline as a percentage.
costUpliftPercent = incrementalCloudCost / baselineCloudCost * 100
Worked example: 14-day 50/50 experiment
Estimated test users
100000 * 14 / 30
46,666.67 users
Variant users
46666.67 * 50 / 100
23,333.33 users
Control group cloud cost
23333.33 * 0.020
$466.67
Variant group cloud cost
23333.33 * 0.030
$700.00
Total A/B test cloud cost
466.67 + 700.00 + 100.00
$1,266.67
Control-only baseline
46666.67 * 0.020
$933.33
Blended cost and incremental cost
1266.67 / 46666.67; 1266.67 - 933.33
$0.027 per user; $333.33 incremental
Final Result
Estimated A/B test cloud spend is $1,266.67, with a blended cost of about $0.027 per exposed user and an incremental cost of about $333.33 versus control.
Assumptions
- ✓Monthly active users are distributed evenly across a 30-day month.
- ✓Each exposed user creates average variable cloud usage represented by the selected per-user cost.
- ✓The entered control and variant costs cover the relevant variable services being compared.
- ✓Fixed test cloud costs occur once during the selected test period.
- ✓The baseline assumes every estimated test user would otherwise be served by the control.
Limitations
- !Actual traffic can vary by day, time zone, campaign activity, and user behavior.
- !Caching, retries, autoscaling, provider billing increments, and free allowances can make billed costs differ from the estimate.
- !Per-user cost may change when users generate different numbers of requests, storage operations, or data transfers.
- !The calculation excludes items not entered, such as engineering time, vendor contracts, taxes, or committed-use discounts.
Common Mistakes to Avoid
Using total product monthly users instead of users expected to reach the tested feature or journey.
Entering a monthly cost as a per-user cost without first dividing it by the comparable user count.
Forgetting fixed experiment costs such as extra logging, dashboards, or temporary environments.
Using a traffic allocation as a decimal when the input expects a percentage, such as entering 0.5 instead of 50.
Comparing a test period with a baseline measured over a different number of users or days.
Related Formulas
Frequently Asked Questions
How is A/B test cloud cost per user calculated?
Total control-group cost, variant-group cost, and fixed test cloud cost are added together and divided by estimated test users.
What is incremental cloud cost in an A/B test?
It is total test cloud cost minus the estimated cost of serving the same users only through the control experience.
Can incremental cloud cost be negative?
Yes. It can be negative when the variant's lower variable cost outweighs fixed test costs and any higher-cost usage.
Does a 50/50 split double cloud cost?
Not necessarily. A 50/50 split changes the mix of users receiving each experience. The cost depends on both per-user costs and fixed test costs.
Why is blended cost per user higher for a short experiment?
Fixed test costs are divided among fewer exposed users, so they have a larger per-user effect.
Ready to calculate your result?
Use the calculator to get instant results with your own inputs.