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

Uncompressed Size = Width × Height × Bytes per Pixel
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

24-bit RGB images at common camera resolutions, compressed at a 10:1 ratio
ResolutionUncompressed sizeCompressed size (10:1)
12 MP (4000 × 3000)34.3 MB3.43 MB
24 MP (6000 × 4000)68.7 MB6.87 MB
48 MP (8000 × 6000)137.3 MB13.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

  1. Enter the image width in pixels.
  2. Enter the image height in pixels.
  3. Select the color mode — RGB (24-bit), RGBA (32-bit), or Grayscale (8-bit).
  4. Optionally enter a compression ratio (defaults to 10 if left blank).
  5. 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.