Image Compression Calculator
Why a 24-Megapixel Photo Isn't a 72-Megabyte File
An uncompressed image stores every pixel at full color depth, which adds up fast — a single 24-megapixel RGB photo holds nearly 69 million bytes before any compression is applied. Formats like JPEG shrink that footprint dramatically by discarding redundant and visually less-important data. This calculator works out both the raw, uncompressed size and the compressed size for a given compression ratio, so you can predict storage needs or upload sizes before exporting.
The Formula
Compressed Size = Uncompressed Size ÷ Compression Ratio
Bytes per pixel depends on color mode: 1 byte for 8-bit grayscale, 3 bytes for 24-bit RGB, and 4 bytes for 32-bit RGBA (which adds an alpha transparency channel). The compression ratio is the factor by which a format shrinks the raw data — JPEG at typical quality settings commonly lands around 8:1 to 12:1, while lossless PNG usually only achieves 2:1 to 3:1 on photographic content.
Where This Calculation Matters
- Storage and backup planning — estimating card or drive capacity needed for a shoot before you're in the field.
- Web performance — predicting output file size for images that need to stay under a page-weight budget.
- Client delivery — sizing a batch of images against an email attachment limit or a client portal's upload cap.
- Archival decisions — weighing the storage cost of keeping uncompressed masters versus compressed derivatives.
Uncompressed vs. Compressed File Sizes
| Resolution | Uncompressed size | Compressed size (10:1) |
|---|---|---|
| 12 MP (4000 × 3000) | 34.3 MB | 3.43 MB |
| 24 MP (6000 × 4000) | 68.7 MB | 6.87 MB |
| 48 MP (8000 × 6000) | 137.3 MB | 13.73 MB |
Actual JPEG output size varies with image content and quality setting — a 10:1 ratio is a reasonable mid-quality estimate, not a guarantee.
How to Use This Calculator
- Enter the image width in pixels.
- Enter the image height in pixels.
- Select the color mode — RGB (24-bit), RGBA (32-bit), or Grayscale (8-bit).
- Optionally enter a compression ratio (defaults to 10 if left blank).
- Select Calculate to see the uncompressed size, compressed size, and percentage reduction.
Related Calculations
Working backward from a target print size instead of a file size? Try the Image DPI Calculator or the Print Size DPI Calculator.