UtilDojo

Popular

Menu

Back-of-the-Envelope Calculator for System Design Estimates

  • This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.

Traffic

×

Peak traffic ÷ daily average

Payload and storage

KB
KB
years
×copies

Capacity

%

80/20 rule: cache 20%

req/s

Requests per second at peak

Peak requests per second×3 the average
3.47K req/s
3,472 requests per second
Average QPS
1.16K req/s
Requests/day
100M
Reads/s
1.04K peak 3.13K
Writes/s
115.74 peak 347.22
90% reads10% writes

Storage

New data per day
9.54 GB
one copy
New data per year
3.4 TB
one copy
Kept for 5 years
17 TB
before replication
On disk, ×3 replication
50.99 TB
what you provision

Bandwidth

Egress (reads out)
10.17 MB/s
85.33 Mbps average · 256 Mbps peak
Ingress (writes in)
115.74 KB/s
948.15 Kbps average · 2.84 Mbps peak

Capacity

Cache memory
171.66 GB
20% of a day's read traffic
Servers at peak
4
at 1,000 req/s each, no headroom

Order-of-magnitude figures. Storage and bandwidth count only request bodies; add indexes, metadata and protocol overhead for a fuller picture, and leave headroom before sizing real hardware.

Working

  1. Reads per day9 reads per user × 10,000,000 users= 90,000,000
  2. Writes per day1 write per user × 10,000,000 users= 10,000,000
  3. Requests per day90,000,000 + 10,000,000= 100,000,000
  4. Average QPS100,000,000 ÷ 86,400 s= ≈ 1,157
  5. Peak QPS1,157 × 3= ≈ 3,472
  6. Storage per day10,000,000 writes × 1 KB= 9.54 GB
  7. Storage over 5 years9.54 GB × 365 × 5 × 3 copies= 50.99 TB
  8. Egress bandwidth1,042 reads/s × 10 KB= 10.17 MB/s
  9. Ingress bandwidth116 writes/s × 1 KB= 115.74 KB/s
  10. Cache memory90,000,000 reads × 10 KB × 20%= 171.66 GB
  11. Servers at peak⌈3,472 ÷ 1,000⌉= 4

About this tool

Back-of-the-envelope estimation is the part of a system design interview where you turn a vague brief (“design a URL shortener for 100 million users”) into numbers you can design around: how many requests per second, how much storage, how fat a network pipe and roughly how many machines. This calculator does that arithmetic for you. Enter daily active users, then reads and writes either per user per day or as a daily total, a peak-to-average multiplier, the size of a write and of a read response, retention, replication and the share of reads you expect to cache, and every figure updates as you type.

The results follow the standard recipe. Reads and writes per day are users × the per-user figures (or the totals you typed); adding them gives requests per day; average QPS divides that by 86,400 seconds; peak QPS multiplies by your peak factor. Reads and writes stay separate throughout, so a 9-reads-to-1-write system shows its own read and write rates and the bar under the headline shows the split. Storage per day is writes × bytes per write, scaled to a year, to the full retention period and then by the replication factor, because three copies of 1 TB is 3 TB on disk. Egress bandwidth is reads per second × response size, ingress is writes × write size, both shown as MB/s and as a bit rate. Cache memory applies the 80/20 rule: cache 20% of a day’s read traffic and you serve most requests from memory. The server count divides peak QPS by what one server handles and rounds up.

The Working block under the results writes every step out as a line of arithmetic, for example “100,000,000 ÷ 86,400 s ≈ 1,157”. Copy it into your notes or say it aloud in an interview; the point of the exercise is showing the reasoning, not the answer. Interviewers also expect you to know the reference numbers that make quick maths possible, so the tables below list the powers of two with the storage unit each one names, Jeff Dean’s latency numbers every programmer should know, how much downtime each number of nines allows, and a quick conversion from daily traffic to requests per second.

Treat the output as an order of magnitude, not a specification. The figures count only request bodies, so real storage also carries indexes, metadata and backups, real bandwidth carries headers and TLS overhead, and real fleets keep headroom for failures and growth. If a number surprises you, change one input and watch which outputs move; that sensitivity is usually the most useful thing to say about a design. Everything runs in your browser and nothing is sent to a server.

Daily traffic to requests per second (average, over 86,400 seconds)
Requests per dayAverage QPSPeak QPS at ×3
1,000,0001235
10,000,000116347
100,000,0001,1573,472
1,000,000,00011,57434,722
Powers of two and the storage unit each one names
PowerExact valueApproximatelyUnit
2^101,0241 thousand1 KB
2^201,048,5761 million1 MB
2^301,073,741,8241 billion1 GB
2^401,099,511,627,7761 trillion1 TB
2^501,125,899,906,842,6241 quadrillion1 PB
Latency numbers every programmer should know
OperationTimeNanoseconds
L1 cache reference0.5 ns1
Branch mispredict5 ns5
L2 cache reference7 ns7
Mutex lock / unlock25 ns25
Main memory reference100 ns100
Compress 1 KB with Snappy3 µs3,000
Send 1 KB over 1 Gbps network10 µs10,000
Read 4 KB randomly from SSD150 µs150,000
Read 1 MB sequentially from memory250 µs250,000
Round trip within the same datacenter500 µs500,000
Read 1 MB sequentially from SSD1 ms1,000,000
Disk seek10 ms10,000,000
Read 1 MB sequentially from disk20 ms20,000,000
Send packet California → Netherlands → California150 ms150,000,000
Availability nines and the downtime each one allows
AvailabilityDowntime per yearPer month (30 days)Per day
99%3.65 days7.2 h14.4 min
99.9%8.76 h43.2 min1.44 min
99.99%52.56 min4.32 min8.64 s
99.999%5.26 min25.92 s864 ms

Frequently asked questions

Why do people say a day has 100,000 seconds?

A day has 86,400 seconds, but rounding to 10^5 makes the division easy to do in your head: 10 million requests a day ÷ 10^5 is about 100 per second. The calculator uses the exact 86,400, which gives 116, so your mental figure lands within 15% of the real one. That gap is fine for an estimate.

What peak multiplier should I use?

Two to three times the daily average covers most consumer apps, whose traffic bunches into evenings. Use higher for anything with a schedule or an event, such as ticket sales, exam results or a live broadcast, where a 10× or 100× spike is realistic. If you only know the peak, enter 1 and treat the average as peak.

How do I estimate the size of one record?

Add up the fields. A short URL record is roughly a 7-character key, a 2 KB long URL at most, a user id, two timestamps and a few flags: well under 1 KB on average. A tweet is 140 to 280 bytes of text plus ids and timestamps; a photo is megabytes. Round to the nearest convenient unit and say what you assumed.

What is the difference between QPS, RPS and TPS?

They are used almost interchangeably. QPS (queries per second) and RPS (requests per second) count incoming requests; TPS (transactions per second) usually counts database writes or completed business transactions, which can be a fraction of the requests. This calculator takes reads and writes separately and reports both rates alongside the combined QPS.

Why do the server numbers look low?

The count is peak QPS divided by one server’s capacity, with no allowance for failure or growth. Real deployments add replicas for redundancy, keep each machine below 60 to 70% utilisation and spread across zones, so multiply by 1.5 to 2 for a deployable figure. The point of the estimate is to know whether you need 3 servers or 300.

Related tools