Skip to content
MasterMath

Compression Ratio Calculator

The compression ratio of a file and, more usefully, how much space it actually saves, which is not the same figure.

Compression ratio

—

Compression ratio—
Space saved—
Space freed—
Of the original, what remains—
Bits per byte—

How this was worked out

    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

    1. Divide the original size by the compressed one: that is the ratio
    2. Subtract the compressed from the original: that is what is freed
    3. Divide that difference by the original and multiply by a hundred
    4. 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.

    Frequently asked questions

    What does a 4:1 compression ratio mean?

    That the compressed file takes up a quarter of the original, which is a 75 % saving in space.

    Are ratio and saving the same?

    No. A ratio of 4 is a 75 % saving. The ratio says how many times the compressed file fits into the original; the saving, what fraction of the disk is freed.

    Why does a ZIP sometimes get bigger?

    Because the content was already compressed — an image, a video, an audio file — and only the format header is added, with nothing gained in return.

    What are bits per byte?

    The way to compare text compressors: a 4:1 ratio is two bits per byte, and the best compressors sit around 1.5.

    Is maximum compression worth it?

    Less and less. Going from ratio 4 to 8 saves only another 12.5 % of space, while processing time climbs steeply.