Estimate Email Storage for a Billion Users
Problem
An email service has one billion active users. Estimate the storage it needs per year for new mail, and the total it will hold after several years of operation. Show the per-user daily figure you build from, and then discuss what deduplication and tiering do to the number.
- Include attachments; they dominate bytes even though they are a minority of messages.
- Exclude spam that is filtered before delivery, but include the spam folder retention if you think it matters (and say why it does or does not).
- Give per-day, per-year, and cumulative figures with the replication policy stated.
Examples
Numbers you can put on the whiteboard and defend:
- Active users: 10^9. The largest consumer email services report well over a billion accounts.
- Messages received per user per day: about 30 that are actually delivered to the mailbox (inbox, promotions, updates). Sent mail is a fraction of that (~5), and sent messages are also received by someone, so counting delivered mail once per recipient covers both directions for internal traffic.
- Average message size without attachments: ~20-30 KB for an HTML marketing message with headers; a plain personal message is 2-5 KB. Blended: 25 KB.
- Attachments: ~10% of messages carry one, averaging ~500 KB (photos, PDFs, small documents; a few large ones pull the mean up). That is 50 KB of attachment bytes per average message.
- Blended average message: ~75 KB. If the interviewer prefers a single number, 50-100 KB per message is the standard range.
- Replication: 3× for durability, or ~1.5× with erasure coding.
- Retention: users mostly never delete. Assume mail is kept indefinitely; spam and trash auto-delete after 30 days.
Hints
- Build per user per day first: messages × bytes. Then multiply by users and by days. Doing it in that order keeps each intermediate number small enough to sanity-check.
- Attachments are 10% of messages but can be half or more of the bytes. Do not fold them in silently; compute them separately and add.
- A newsletter sent to 10 million recipients is 10 million copies of the same bytes unless you deduplicate. Ask yourself what fraction of mail is like that.
Last reviewed 8 September 2026
Approach · Answer · Complexity · Follow-ups · Company variations
The rest of this question — the worked approach, the Python solution with passing tests, complexity, follow-ups and how each company frames it — is part of the guides.
Get the full guide
Pick the company you're interviewing with. Each guide has every question tiered for that loop — one-time purchase, lifetime access.
Also in: Apple, Google, Meta, Microsoft, Netflix
Interviewing at more than one? All 6 guides for $499 · save $395
Not ready to buy? Get the free starter pack — 13 questions with full solutions.