
A/B Testing Database Storage Per-User Formula
Learn how to estimate per-user database storage for A/B test assignments and retained experiment events.
This calculation estimates the storage associated with one user's A/B testing records. It separates durable experiment assignments from retained exposure and conversion events, then applies a database overhead allowance for planning purposes.
- 100% Free
- No Sign-Up Required
- Private & Secure
- Mobile Friendly
Total Storage per User
Where:
Multiply active experiments by the assignment record size, add the retained event storage, and increase the raw total by the selected overhead percentage.
Variables Explained
| Variable | What It Means | Unit |
|---|---|---|
| E - Active experiments per user | Average number of active experiments for which one user has an assignment record. | experiments |
| A - Assignment record size | Average stored size of one experiment assignment record. | bytes |
| X - Exposure events per experiment per day | Average daily exposure or impression records stored for one experiment and user. | events |
| C - Conversion events per experiment per day | Average daily conversion or outcome records stored for one experiment and user. | events |
| R - Event retention period | Number of days event-level records remain stored before deletion or archival. | days |
| V - Event record size | Average stored size of one exposure or conversion event record. | bytes |
| O - Storage overhead | Allowance for indexes, row metadata, and similar database storage costs. | percent |
Step-by-Step Calculation
Calculate assignment storage
Each active experiment contributes one assignment record for the user.
assignmentStorageBytes = activeExperiments * assignmentRecordBytes
Calculate daily event count
This combines daily exposure and conversion events across the user's active experiments.
dailyEventCount = activeExperiments * (exposureEventsPerDay + conversionEventsPerDay)
Calculate retained event storage
Daily event volume is retained for the selected number of days and multiplied by average event size.
eventStorageBytes = dailyEventCount * retentionDays * eventRecordBytes
Calculate raw storage
Raw storage is the combined assignment and event storage before overhead.
rawStorageBytes = assignmentStorageBytes + eventStorageBytes
Add database overhead
The overhead percentage increases the raw estimate for non-payload storage costs.
totalStorageBytes = rawStorageBytes * (1 + storageOverhead / 100)
Convert bytes to kilobytes
The calculator displays the primary result in KB per user.
totalStorageKb = totalStorageBytes / 1024
Example: Five active experiments with 90-day retention
Assignment storage
5 * 150
750 bytes
Daily event count
5 * (1 + 0.1)
5.5 events per day
Event storage
5.5 * 90 * 300
148500 bytes
Raw storage
750 + 148500
149250 bytes
Total with overhead
149250 * 1.30
194025 bytes
Convert to KB
194025 / 1024
189.48 KB
Final Result
Estimated A/B testing database storage: 189.48 KB per user, including 30% overhead.
Assumptions
- ✓Each user has one stored assignment record for every active experiment.
- ✓Exposure and conversion events are retained for the full retention period entered.
- ✓The event record size represents an average across exposure and conversion events.
- ✓The overhead percentage is a planning allowance for indexes, row metadata, and similar costs.
- ✓The estimate covers one user only and excludes shared experiment configuration.
Limitations
- !Actual storage can vary with database engine, serialization format, compression, and index design.
- !Replicas, backups, archives, and warehouse copies are not included.
- !Users may not have uniform experiment assignments or event rates.
- !Event properties can make record size vary substantially between event types.
Common Mistakes to Avoid
Using total experiments in the organization instead of the average experiments assigned to one user.
Entering total daily events rather than events per experiment per day.
Forgetting that retention days affect only event-level storage in this model.
Using payload size alone while omitting IDs, timestamps, and serialized metadata from record-size estimates.
Treating the per-user result as total infrastructure capacity without adding user count, backups, and replicas.
Related Formulas
Frequently Asked Questions
How is A/B testing storage per user calculated?
It adds assignment storage to retained exposure and conversion event storage, then applies the selected overhead percentage.
Why do event records usually drive the storage estimate?
Events can occur repeatedly each day and accumulate throughout the retention period, while assignments are stored once per active experiment.
Does increasing retention by 30 days increase storage linearly?
For event storage in this model, yes. With stable event volume and record size, event storage rises in direct proportion to retention days.
What should be included in event record size?
Include identifiers, timestamps, experiment and variant fields, event properties, encoding or serialization costs, and other stored fields where relevant.
Why is storage overhead added after raw storage?
It represents additional database costs not captured by the raw assignment and event record sizes, such as indexes and row metadata.
Ready to calculate your result?
Use the calculator to get instant results with your own inputs.