Skip to content
Amol Dighe
Go back

Back-of-the-Envelope Capacity Estimation Calculator

Edit page
Back-of-the-Envelope Capacity Estimation Calculator
Image generated with Google Gemini

Estimate QPS, disk accumulation, egress bandwidth, and hot-set RAM in seconds for system design interviews and distributed architecture.

Below is an interactive calculator configured for real-time capacity estimation. Change the inputs to observe how QPS, disk accumulation, egress bandwidth, and hot-set memory scale.

Presets:
Traffic Derivation Pipeline
  1. DAU 10.0M
  2. →
  3. × 5 writes/day 50.0M
  4. →
  5. ÷ 86,400 QPS 579
  6. →
  7. × 100 read QPS 57.9K
  8. →
  9. × 3 peak 174K
⚡

Traffic

Queries per second
Average write QPS
579
= 10.0M DAU × 5 writes / 86,400s
Peak write QPS
1.74K
= avg × 3 (peak factor)
Average read QPS
57.9K
= write QPS × 100 (read:write ratio)
Peak read QPS
174K
= read QPS × 3 (peak factor)
💾

Storage

Disk capacity
New data per day
95.4 GB
= 50.0M writes × 2 KB
New data per year
34.0 TB
= daily volume × 365
Stored with 3x replication
102 TB
= yearly volume × 3 replicas
🌐

Bandwidth & cache

Network & RAM
Ingress (writes)
1.13 MB/s
= write QPS × 2 KB
Egress (reads)
113 MB/s
= read QPS × 2 KB
Cache for the hot set
1.86 TB
= 20% of daily read volume (80/20 rule)
ℹ️

Interview convention: calculations use powers of two for storage (1 KB = 1,024 B, 1 MB = 1,024 KB) and powers of ten for rates (1M = 1,000,000). In a live round, round aggressively: treat 86,400s ≈ 100,000s ($10^5$) for rapid mental math.

The Formulas & Estimation Guide

01

Traffic: From Users to QPS

Start with Daily Active Users (DAU) and write actions per user. Since a day has 86,400 seconds:

Write QPS = (DAU × Writes per user) / 86,400

Interview Shortcut: Approximate 86,400s as 100,000s ($10^5$). For 10M DAU × 5 writes = 50M writes / $10^5$ = 500 QPS (vs exact 579 QPS, within 15% error).

02

Reads: The Ratio Shortcut

Consumer apps are vastly read-heavy. Rather than calculating reads from scratch, anchor them to writes via a read:write ratio:

Read QPS = Write QPS × Read:Write Ratio

Typical ratios: 1:1 for IoT/audit logs, 10:1 for social feeds (Twitter/Instagram), 100:1 for URL shorteners, and 1000:1 for CDN media.

03

Storage: Writes × Payload × Retention

Storage accumulates linearly with writes. Compute daily accumulation, compound over the retention window, and apply replication:

Daily Storage = Writes/day × Payload Size (KB) Total Disk = Daily Storage × 365 Days × Replication (e.g. 3x)

Production distributed databases (Cassandra, Ceph, Spanner) default to 3x replication across availability zones.

04

Cache: The 80/20 Pareto Rule

The Pareto principle states that 20% of the content generates 80% of the traffic. Sizing an in-memory Redis cluster for the daily "hot set":

Hot Set Cache = 20% × Daily Read Volume

If daily read volume is ~10 TB, a 2 TB cache cluster will achieve roughly an 80% cache hit ratio, shielding database read replicas.

System Design Mental Math Quick Reference

Metric / Unit Exact Value Mental Math Approximation Standard Scale
Seconds in a Day 86,400 s ~100,000 s ($10^5$) Divide by $10^5$ to convert daily actions to QPS
1 Million (1M) 1,000,000 $10^6$ Common baseline for DAU & Requests
1 Billion (1B) 1,000,000,000 $10^9$ High-scale platforms (Google, Meta, Cloudflare)
Kilobyte (KB) 1,024 Bytes ~1,000 Bytes ($10^3$) Typical JSON metadata, short text record
Megabyte (MB) 1,048,576 Bytes ~$10^6$ Bytes (1 Million B) Photos, short audio, code bundles
Gigabyte (GB) 1,073,741,824 Bytes ~$10^9$ Bytes (1 Billion B) High-resolution video, DB partition, memory sizing
Terabyte (TB) 1,099,511,627,776 Bytes ~$10^12$ Bytes (1 Trillion B) Annual database growth, primary storage nodes
Petabyte (PB) 1,125,899,906,842,624 Bytes ~$10^15$ Bytes Data warehouse, cold storage archives (S3 Glacier)

Edit page
Share this post:

Next Post
Back-of-the-Envelope Framework Simplified