Science & Engineering

Compression Ratio Calculator (File Size)

Enter the original and compressed file sizes and you get the compression ratio in X:1 form plus the percentage of space saved. It works for ZIP, JPEG, MP3, H.264, or any format.

Reviewed and updated

How to use
  1. Enter the original file size.
  2. Enter the compressed file size.
  3. Check the percentage of space saved.
Try
Compression ratio
5 : 1

100 MB → 20 MB

Space saved
80%
Size reduction
80 MB
Bits per byte
1.6 bits
For study and estimation. Verify against authoritative data before relying on a result.
Was this helpful?

The ratio, and the percentage it maps to

ratio = original ÷ compressed,   saved% = ( 1 compressed ÷ original ) × 100

These are two views of the same result. The ratio is how many times smaller the file got; percent saved is how much space you got back. A 4:1 ratio and 75% saved describe the exact same compression. Confusing the two is the usual mistake — a "50% compression" is only a 2:1 ratio.

Ratio and percent saved, side by side

RatioSpace savedRatioSpace saved
1.5:133.3%5:180%
2:150%10:190%
3:166.7%20:195%
4:175%50:198%

Percent saved climbs toward 100 but never reaches it, and each extra point costs a much bigger ratio: going from 90% to 95% doubles the ratio from 10:1 to 20:1.

What ratio to expect by format

Ratio depends on the data and the codec, not just the format. Lossless formats keep every bit and stay modest; lossy formats discard imperceptible detail and go much further.

  • ZIP / GZIP (lossless). Around 2–3:1 on text and documents, near 1:1 on data that is already compressed.
  • PNG / FLAC (lossless). Roughly 1.5–3:1; nothing is thrown away, so the ceiling is low.
  • JPEG / MP3 (lossy). About 10:1, tunable by quality; the loss is permanent.
  • H.264 video (lossy). 50:1 and beyond, which is why raw video is impractical to store or stream.

Common questions

How do I calculate a compression ratio?

Divide the original size by the compressed size. 100 MB down to 10 MB is a 10:1 ratio. The two files must be in the same units before you divide.

What is the difference between the ratio and the percent saved?

The ratio compares sizes (original divided by compressed); percent saved is the space you got back, figured as 1 minus compressed over original, times 100. A 2:1 ratio is 50 percent saved. A 10:1 ratio is 90 percent saved.

Why did my file get bigger after compressing it?

Already-compressed data (JPEG, MP4, ZIP) and truly random data have little redundancy left to remove, and the archive format adds a small header. On tiny or pre-compressed files that overhead can outweigh any saving.

From the blog

Guides & how-tos

All articles →