The formula
ratio = original size ÷ compressed size
Where it comes from
Ratio and saving get confused constantly and they are not the same number. A 4:1 ratio means the file fits four times into the original, that is, it takes up a quarter: the saving is 75 %, not 400 %. And the relationship is not linear: going from a ratio of 2 to 4 saves another 25 % of space, but going from 4 to 8 saves only 12.5 % more. Past a certain point, squeezing harder returns less and less for more and more processing time.
How to work it out by hand
- Divide the original size by the compressed one: that is the ratio
- Subtract the compressed from the original: that is what is freed
- Divide that difference by the original and multiply by a hundred
- That percentage is the real saving
What is worth knowing
Bits per byte is the measure used to compare lossless text compressors: a byte is eight bits, so a 4:1 ratio is two bits per byte. The best English text compressors sit around 1.5. With already-compressed data — a JPEG, an MP3, a video — the ratio lands near 1 and sometimes below it: the file grows, because the container header is added without any gain. That is not a fault in the compressor, it is the sign that the information was already compressed.