Compression Ratio Calculator

Compare original and compressed sizes as a ratio and a percent saved.

Technology and NetUpdated 2026-11-192 min read
Compression Ratio Calculator
Size before compression, in any consistent unit.
Size after compression, in the same unit.
Compression ratio
...
Ratio notation...
Space saving...
Original size used...
Compressed size used...

What it does

Compression ratio measures how much a file shrinks under a compression algorithm. The standard definition divides the original size by the compressed size, so a larger ratio means better compression.

This tool takes the two sizes in the same units and returns the ratio, a ratio notation such as 5:1, and the percent of space saved. The page opens with an original size of 10 and a compressed size of 2.

The ratio is 10 divided by 2, which is 5, written as 5:1. Space saving is one minus 2 over 10, which is 0.8 or 80 percent.

For streaming audio and video, the same formula uses uncompressed and compressed data rates instead of file sizes.

Lossless methods usually reach modest ratios because the data's entropy sets a floor. Lossy methods can reach much higher ratios by discarding detail.

How to use

  1. Enter the size before compression.
  2. Enter the size after compression in the same units.
  3. Read the compression ratio as the main result.
  4. Check the ratio notation and space saving percentage.
  5. Use matching units for both values.
  6. Compare ratios only for files of similar type.

Formula

Compression ratio = original size / compressed size; space saving = (1 - compressed / original) times 100 percent
original
Size before compression.
compressed
Size after compression.
ratio
How many times smaller the compressed representation is.

Some sources define the ratio the other way around. This tool uses the more common convention of original over compressed, which makes a higher number mean better compression. Both sizes must use the same unit.

Worked example

Example: 10 to 2

The page opens with original size 10 and compressed size 2.

  1. Divide original by compressed: 10 divided by 2 is 5.
  2. Write this as a ratio of 5:1.
  3. Compute space saving: 2 divided by 10 is 0.2.
  4. One minus 0.2 is 0.8, or 80 percent.
  5. The tool reports ratio 5 and ratio_text 5:1.
  6. The space saving row shows 80 percent.

Reference table

Compression ratios for sample sizes
OriginalCompressedRatioSpace saving
1025:180 %
824:175 %

Limits

  • Sizes must be positive and use the same units.
  • Compressed size cannot exceed original size here.
  • Does not measure quality loss for lossy compression.
  • Ignores metadata and container overhead.

Common mistakes

  • Mixing bytes and bits between the two inputs.
  • Using the inverse definition without saying so.
  • Treating a high ratio as proof of good quality.
  • Including file headers in only one of the sizes.
  • Comparing ratios across very different file types.

Try it yourself

Quick checks. Answers sit tucked under each question.

Original 10, compressed 2. Ratio?

5:1.

What is the space saving?

80 percent.

Original 8, compressed 2. Ratio?

4:1, a 75 percent saving.

Questions

How is compression ratio defined?

Original size divided by compressed size.

What does 5:1 mean?

The compressed file is one fifth the original size.

What is space saving?

The fraction of the original size that was removed.

Can lossless compression reach 10:1?

Usually not for typical data, because entropy sets a limit.

Does a higher ratio mean better quality?

No. For lossy formats it often means more detail was discarded.

Does this work for streaming?

Yes, using data rates instead of file sizes.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.