
A/B Testing Uptime Per-User Formula
Learn how traffic-weighted uptime, expected downtime per user, and lost user-hours are calculated for an A/B test.
This calculator estimates the availability experienced by a typical test user when Variant A and Variant B have different uptime levels. It weights each variant by its assigned traffic share, then converts unavailable time into expected downtime across the test period.
- 100% Free
- No Sign-Up Required
- Private & Secure
- Mobile Friendly
Average Per-User Uptime
Where:
Multiply each variant's uptime by the share of users assigned to it, then add the two results. The result is the average uptime expected across all test users.
Variables Explained
| Variable | What It Means | Unit |
|---|---|---|
| uptimeA - Variant A uptime | Expected availability for users assigned to Variant A. | percent |
| uptimeB - Variant B uptime | Expected availability for users assigned to Variant B. | percent |
| trafficSplitA - Traffic assigned to Variant A | Percentage of test users sent to Variant A. The remainder is sent to Variant B. | percent |
| trafficShareA - Variant A traffic share | Variant A traffic allocation expressed as a decimal. | N/A |
| trafficShareB - Variant B traffic share | Variant B traffic allocation expressed as a decimal. | N/A |
| testDurationDays - Test duration | Number of calendar days included in the test. | days |
| testHours - Test duration in hours | Total test duration after converting days to hours. | hours |
| totalUsers - Total test users | Expected number of unique users included in the experiment. | users |
Step-by-Step Calculation
Convert the traffic split to decimal shares
The entered allocation for Variant A becomes a decimal. Variant B receives the remaining share.
trafficShareA = trafficSplitA / 100; trafficShareB = 1 - trafficShareA
Estimate users in each variant
The total user count is split according to the selected traffic allocation.
usersA = totalUsers * trafficShareA; usersB = totalUsers * trafficShareB
Convert test duration to hours
Downtime is measured in hours, so the test length is converted from days.
testHours = testDurationDays * 24
Calculate downtime for each assigned user
Each variant's unavailable percentage is multiplied by the full test duration.
downtimeHoursA = testHours * (1 - uptimeA / 100); downtimeHoursB = testHours * (1 - uptimeB / 100)
Calculate weighted average uptime
Each uptime percentage contributes in proportion to the traffic routed to that variant.
weightedUptime = uptimeA * trafficShareA + uptimeB * trafficShareB
Calculate expected downtime and total exposure
Average downtime is weighted by traffic share, then multiplied by total users to estimate combined lost user-hours.
expectedDowntimeHours = downtimeHoursA * trafficShareA + downtimeHoursB * trafficShareB; totalLostUserHours = totalUsers * expectedDowntimeHours
Equal-split 30-day availability test
Traffic shares
50 / 100 = 0.50; 1 - 0.50 = 0.50
A: 50%, B: 50%
Test hours
30 * 24
720 hours
Variant A downtime per user
720 * (1 - 99.90 / 100)
0.72 hours
Variant B downtime per user
720 * (1 - 99.50 / 100)
3.60 hours
Weighted uptime
99.90 * 0.50 + 99.50 * 0.50
99.70%
Expected downtime per user
0.72 * 0.50 + 3.60 * 0.50
2.16 hours
Total lost user-hours
10,000 * 2.16
21,600 user-hours
Final Result
The test has estimated average per-user uptime of 99.70%, expected downtime of 2.16 hours per user, and 21,600 total lost user-hours. Variant B is 0.40 percentage points below Variant A.
Assumptions
- ✓Users are assigned to one variant for the relevant portion of the test according to the selected traffic split.
- ✓Each variant's uptime percentage is assumed to apply consistently during the full test period.
- ✓Downtime is assumed to be distributed evenly enough that traffic shares represent user exposure.
- ✓Every user is treated as having the same potential exposure during the test duration.
Limitations
- !An uptime percentage does not show the number, duration, timing, or severity of individual incidents.
- !The estimate does not account for regional routing, device differences, caching, retries, or partial feature failures.
- !Actual user exposure can differ when users are not active throughout the test period.
- !Lost user-hours measure unavailable time only; they do not estimate conversion, revenue, support, or reputational impact.
Common Mistakes to Avoid
Entering 99.9 as though it means 99.9 hours rather than 99.9% availability.
Treating a percentage-point difference as a relative percentage change.
Using total traffic sent to Variant A as the share for both variants instead of assigning the remainder to Variant B.
Forgetting that a longer test period increases downtime hours even when uptime percentages stay the same.
Interpreting total lost user-hours as the number of users affected; it is an aggregate time estimate.
Related Formulas
Frequently Asked Questions
How do you calculate average uptime in an A/B test?
Multiply each variant's uptime by its traffic share and add the results. This produces a traffic-weighted average uptime for the test population.
How is downtime per user calculated from uptime?
Convert the uptime percentage to its unavailable share, then multiply that share by the test duration in hours.
What does a positive Variant B versus A uptime difference mean?
It means Variant B has higher uptime than Variant A by the displayed number of percentage points.
Why can a 0.1 percentage-point uptime difference matter?
Over many hours and users, a small availability gap can produce substantial additional expected downtime exposure.
What are total lost user-hours?
They are average expected downtime per user multiplied by the total number of test users.
Ready to calculate your result?
Use the calculator to get instant results with your own inputs.