File Size Cheat Sheet for Developers
Quick reference for common file sizes, estimation rules of thumb, and storage tier breakdowns across text, images, audio, video, and databases.
Why Size Estimation Matters
Estimating file sizes and storage requirements is a daily task for developers. Whether you are choosing between image formats, planning database capacity, setting upload limits, estimating CDN costs, or debugging why a Docker image is 2 GB, you need a mental model of how big things are. This cheat sheet provides the reference points to build that intuition.
All sizes below are approximate and represent typical values. Actual sizes vary based on content, compression, encoding, and quality settings. When precision matters, use our Byte Calculator to convert between units.
Text and Code
Plain text is surprisingly compact. An ASCII character is exactly 1 byte, and a UTF-8 character is 1 to 4 bytes (most English text is 1 byte per character, most CJK characters are 3 bytes).
Text and Code Sizes
| Content | Typical Size |
|---|---|
| A single tweet (280 chars) | ~280 B |
| A typical email (no attachments) | 2-5 KB |
| A page of text (~2,000 words) | ~10 KB |
| A typical TypeScript source file | 5-50 KB |
| package.json (medium project) | 2-5 KB |
| node_modules (medium project) | 200-500 MB |
| An entire novel (80,000 words) | ~500 KB |
| The complete works of Shakespeare | ~5.5 MB |
| Wikipedia (English, text only) | ~22 GB |
| A typical JSON API response | 1-100 KB |
| A large JSON payload (e.g., GeoJSON) | 1-50 MB |
| A PostgreSQL row (avg) | 200-500 B |
| 1 million PostgreSQL rows | 200-500 MB |
Rule of thumb: For English text, 1 KB is roughly 1,000 characters or about 150-200 words. A typical API response is under 100 KB; if your endpoint routinely returns more than 1 MB of JSON, consider pagination.
Images
Image file size depends on dimensions, color depth, compression, and format. Uncompressed, a 1920x1080 image at 24-bit color is exactly 6,220,800 bytes (about 6 MB). Compression reduces this dramatically:
Image Sizes by Format
| Format | 1080p Photo | Notes |
|---|---|---|
| BMP (uncompressed) | ~6 MB | Raw pixel data, rarely used |
| PNG (lossless) | 1-4 MB | Best for screenshots, diagrams |
| JPEG (quality 80) | 200-500 KB | Photos, lossy compression |
| WebP (quality 80) | 100-300 KB | Modern, 25-35% smaller than JPEG |
| AVIF (quality 80) | 80-200 KB | Newest, best compression ratio |
| SVG (typical icon) | 1-10 KB | Vector, scales infinitely |
| favicon.ico | ~15 KB | Multiple sizes packed together |
Rule of thumb: Serve WebP or AVIF on the web. Target under 200 KB for hero images and under 50 KB for thumbnails. Use responsive images with srcset to avoid sending 4K images to mobile screens.
Audio and Video
Media files are where storage needs escalate quickly. A single minute of uncompressed CD-quality audio (44.1 kHz, 16-bit, stereo) is about 10.5 MB. Video adds orders of magnitude more data.
Audio and Video per Minute
| Content | Per Minute |
|---|---|
| MP3 audio (128 kbps) | ~1 MB |
| MP3 audio (320 kbps) | ~2.4 MB |
| FLAC audio (CD quality) | ~30 MB |
| WAV audio (uncompressed) | ~10.5 MB |
| 720p video (H.264) | ~50 MB |
| 1080p video (H.264) | ~150 MB |
| 4K video (H.265/HEVC) | ~375 MB |
| 4K video (ProRes, editing) | ~5 GB |
| Zoom call (720p) | ~15 MB |
Rule of thumb: A 1-hour 1080p video is about 4-8 GB compressed. A podcast episode (mono, 64 kbps) is roughly 30 MB per hour. Use the Transfer Time tab to estimate how long media files take to upload or download.
Databases and Data Engineering
Database size estimation is critical for capacity planning, backup strategies, and cost forecasting. The sizes below represent typical values; your specific schema, indexes, and data distribution will affect actual sizes.
- 1 million rows of a typical transactional table: 200 MB to 1 GB
- 1 billion rows: 200 GB to 1 TB (roughly 1,000x the million-row size)
- Index overhead: Typically adds 20-50% to base table size
- WAL/binlog: Can equal or exceed the data size during heavy write periods
- Backups: Compressed backups are typically 3-10x smaller than on-disk size
- A UUID column: 16 bytes per row (128 bits), or 36 bytes as text
- A Unix timestamp (int32): 4 bytes per row. See our Epoch Converter for timestamp formats.
Rule of thumb: For back-of-envelope calculations, estimate 500 bytes per row for a typical OLTP table with 10-15 columns. Add 30% for indexes. Double it for replication overhead.
Developer Artifacts
Understanding the size of common developer artifacts helps with CI/CD optimization, Docker image tuning, and deployment planning:
- A typical npm project (with node_modules): 200-500 MB
- A Go binary (statically linked): 5-20 MB
- A Rust binary (release, stripped): 2-10 MB
- A Java/Spring Boot uber-JAR: 50-150 MB
- A minimal Docker image (Alpine): 5-8 MB
- A Node.js Docker image (Debian-based): 150-300 MB
- A typical .git directory: 10-100 MB (depends on history length)
- Hash output sizes: MD5 = 16 B, SHA-1 = 20 B, SHA-256 = 32 B. See our Hash Generator.
Rule of thumb: If your Docker image exceeds 500 MB, use multi-stage builds. If your .git directory exceeds 1 GB, consider shallow clones in CI.
Cloud Storage Cost Estimates
Cloud storage pricing varies by tier, but approximate rates for 2025-2026 are:
- Object storage (S3, GCS, Azure Blob): ~$0.023/GB/month for standard tier
- Block storage (EBS, Persistent Disk): ~$0.08/GB/month for SSD
- Database storage (RDS, Cloud SQL): ~$0.115/GB/month for provisioned SSD
- CDN bandwidth (egress): ~$0.085/GB for the first 10 TB
At these rates, 1 TB of S3 Standard storage costs about $23/month, while the same data on RDS costs about $115/month. Use the Storage Planner to estimate costs for your specific workload.
Quick Conversion Reference
1 Byte = 8 bits
1 KB = 1,000 bytes (SI) | 1 KiB = 1,024 bytes (IEC)
1 MB = 1,000 KB | 1 MiB = 1,024 KiB
1 GB = 1,000 MB | 1 GiB = 1,024 MiB
1 TB = 1,000 GB | 1 TiB = 1,024 GiB
1 PB = 1,000 TB | 1 PiB = 1,024 TiB
Quick math:
2^10 = 1,024 ≈ 1 thousand
2^20 = 1,048,576 ≈ 1 million
2^30 = 1,073,741,824 ≈ 1 billion
2^40 ≈ 1.1 trillionFor a deeper dive into the SI vs IEC distinction, see our KB vs KiB article.
Further Reading
- Latency Numbers Every Programmer Should Know
Jeff Dean's classic reference including memory, disk, and network latency benchmarks.
- AWS S3 Pricing
Current S3 storage and transfer pricing for capacity planning.
- Image Format Comparison — web.dev
Google's guide to choosing between JPEG, PNG, WebP, and AVIF for web performance.
- IEC 80000-13 — Binary Prefixes
The standard that defines KiB, MiB, GiB and why file sizes differ between OS and manufacturer.
- Orders of Magnitude (data) — Wikipedia
Scale comparison from single bits to yottabytes with real-world examples at each order.