Storage Estimation Basics
What you'll learn: How to calculate how much storage your system needs based on four key factors.
Why Storage Estimation Matters
Before you design any data-intensive system (photo sharing, messaging, logs), you need to know: "How many hard drives do I need?" Storage estimation gives you this answer using simple multiplication.
The Four-Factor Formula
Storage requirements come from four numbers:
- Object Count — How many items will you store? (photos, messages, records)
- Average Size — How big is each item? (measured in KB, MB, or GB)
- Retention Period — How long do you keep data? (30 days, 1 year, forever)
- Replication Factor — How many copies for backup/availability? (usually 2-3x)
The Basic Calculation
Total Storage = Objects × Average Size × Retention × Replication
Practical Example
Imagine a photo-sharing app:
- 10 million users upload 2 photos per day
- Each photo averages 500 KB
- Keep photos forever (5 years for estimation)
- Store 3 copies for reliability
Calculation:
- Daily uploads: 10M users × 2 photos = 20M photos/day
- Over 5 years: 20M × 365 × 5 = 36.5 billion photos
- Raw storage: 36.5B × 500 KB = 18.25 PB (petabytes)
- With replication: 18.25 PB × 3 = ~55 PB total
That's 55,000 terabytes of storage infrastructure!
Common Units to Remember
- 1 KB = 1,000 bytes
- 1 MB = 1,000 KB
- 1 GB = 1,000 MB
- 1 TB = 1,000 GB
- 1 PB = 1,000 TB
Key Takeaway: Storage estimation multiplies object count, average size, retention period, and replication factor to determine total infrastructure needs—always round to orders of magnitude for quick interview calculations.