Image Compression Calculator: File Size Estimator for JPEG, PNG and RAW

Image file size depends on pixel dimensions, bit depth, colour channels, and the compression format chosen. This calculator estimates the file size of an image at common formats and quality settings, from uncompressed RAW to highly compressed JPEG and WebP. The uncompressed (RAW) size is exact: width multiplied by height multiplied by channels multiplied by bytes per channel. Compressed sizes are estimates based on typical real-world compression ratios, which vary considerably with image content. Smooth gradients and flat areas compress far more efficiently than fine detail and noise, so a high-ISO night photograph may be twice the file size of a similarly sized smooth portrait at the same JPEG quality. These figures give you a useful planning baseline for storage, bandwidth, and upload time calculations. JPEG at quality 80 is the recommended starting point for most web photography. WebP lossy at quality 80 saves roughly half the size of an equivalent JPEG and is supported by all modern browsers. PNG is lossless but typically two to three times larger than JPEG for photographic content.

RAW size: --  |  JPEG 80%: --

Estimated sizes for -- image at 8-bit depth, 3 channels.

Width of the image in pixels
Height of the image in pixels
Bits per channel (8-bit is standard for JPEG/PNG)
RGB for photos, RGBA for transparency

All sizes are estimates. Actual file sizes vary with image content.

Format Quality Est. size (KB) Est. size (MB) Ratio
Enter dimensions above to see estimates

How image file sizes are calculated

The uncompressed (RAW) size is the exact number of bytes needed to store every pixel at the specified bit depth, with no compression:

RAW bytes = width × height × channels × (bit_depth / 8)

Compressed estimates use fixed ratios based on typical photographic content:
JPEG 95%: RAW / 4    JPEG 90%: RAW / 7    JPEG 80%: RAW / 12
JPEG 70%: RAW / 20    PNG lossless: RAW / 2
WebP lossy 80%: JPEG 80% / 2    WebP lossless: PNG × 0.70
TIFF uncompressed: RAW (same as uncompressed)

Worked example

6,000 × 4,000 pixel image, 8-bit, 3 channels (RGB):

  1. RAW bytes = 6,000 × 4,000 × 3 × 1 = 72,000,000 bytes = 68.66 MB
  2. JPEG 80%: 72,000,000 / 12 = 6,000,000 bytes = 5.72 MB
  3. PNG lossless: 72,000,000 / 2 = 36,000,000 bytes = 34.33 MB
  4. WebP lossy 80%: 6,000,000 / 2 = 3,000,000 bytes = 2.86 MB

Note: 1 MB = 1,048,576 bytes (binary megabytes, as reported by operating systems and most software).

Format comparison guide

Format Compression Transparency Best for
JPEG Lossy No Photographs for web and print distribution
PNG Lossless Yes Graphics, logos, screenshots, images with transparency
WebP lossy Lossy Yes Web photographs where file size matters; replaces JPEG
WebP lossless Lossless Yes Web graphics needing transparency; smaller than PNG
TIFF None / LZW Yes Archival storage, professional print workflows
RAW None or mild N/A Capture format for post-processing; not for distribution

Image compression calculator: frequently asked questions

What is the difference between lossy and lossless image compression?

Lossy compression permanently discards some image data to achieve smaller file sizes. JPEG and WebP lossy are lossy formats: once saved, the removed data cannot be recovered and repeated re-saving compounds the quality loss. Lossless compression (PNG, WebP lossless, TIFF) uses mathematical algorithms to reduce file size without discarding any pixel data, so the image can be perfectly reconstructed from the compressed file. The trade-off is that lossless files are larger than lossy files at comparable apparent quality.

What JPEG quality setting should I use?

For web use, JPEG quality 80 to 85 offers a good balance of visual quality and file size, with most viewers unable to distinguish it from quality 95 at normal viewing distances and screen sizes. Quality 90 to 95 is suitable for professional output and images that may be further processed or re-saved. Quality 70 and below is generally only appropriate for thumbnails or cases where bandwidth is severely constrained. Quality 100 is rarely useful: it produces very large files with minimal quality benefit over quality 90 to 95.

Is PNG or JPEG better for photos?

JPEG is almost always preferable for photographs, as its lossy compression reduces file sizes dramatically (often 10 to 30 times) with minimal visible quality loss on typical photographic content. PNG is better for images with sharp edges, flat colour areas, transparency, or text, such as logos, screenshots, diagrams, and illustrations. PNG lossless compression achieves much better ratios on these types of images than on photographic content. For photographs that need transparency, consider WebP lossy instead of PNG.

What is WebP format?

WebP is an image format developed by Google, offering both lossy and lossless compression. WebP lossy typically produces files about 25 to 35 percent smaller than JPEG at equivalent visual quality, while WebP lossless is typically about 26 percent smaller than PNG. WebP also supports transparency (unlike JPEG) and animation. It is supported in all modern browsers and is widely recommended for web use. The main limitation is that some older image editing software and operating systems do not yet support WebP natively.

How does bit depth affect image file size?

Bit depth determines how many tonal levels each colour channel can record. An 8-bit channel has 256 levels per channel, while a 16-bit channel has 65,536. Moving from 8-bit to 16-bit doubles the raw (uncompressed) data size, since each pixel requires twice as many bytes. Professional cameras often capture 12-bit or 14-bit RAW files, which fall between these extremes. Higher bit depth is important for post-processing flexibility (avoiding banding in gradients during heavy editing) but the extra data is largely discarded when exporting to 8-bit JPEG for web or print distribution.

Sources

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology. Compression ratios are estimates based on typical photographic content; actual file sizes vary.