Web & development / CLEARBYTE

Compression ratio vs percentage saved

Using the original-to-compressed convention, compression ratio is original bytes divided by compressed bytes. Reducing 100 KB to 25 KB gives 4:1 compression and 75% byte savings, not 400% savings.

Compression ratio vs percentage saved

Using the original-to-compressed convention, compression ratio is original bytes divided by compressed bytes. Reducing 100 KB to 25 KB gives 4:1 compression and 75% byte savings, not 400% savings.
Original body sizeCompressed body sizeOriginal : compressed ratioSize remainingBytes saved
100 KB100 KB1.00:1100.00%0.00%
100 KB75 KB1.33:175.00%25.00%
100 KB50 KB2.00:150.00%50.00%
100 KB25 KB4.00:125.00%75.00%
100 KB10 KB10.00:110.00%90.00%
Download this reference as CSV ↓

Formula & method

Ratio = original bytes ÷ compressed bytes
Remaining% = compressed bytes ÷ original bytes × 100
Saved% = (1 − compressed bytes ÷ original bytes) × 100

Always name the ratio convention. Some tools display compressed-to-original rather than original-to-compressed, making the same data appear as 0.25 or 4:1. This page uses original-to-compressed. Compare the same body before and after encoding, with the same content and no unrelated headers added to one side.

The table is arithmetic, not a benchmark of gzip, Brotli or another codec. Savings depend on content, settings and implementation. Lossless compression preserves the decoded bytes, but can require processing time and may increase already compressed or very small payloads.

Worked example

A 240 KB document transferred as a 60 KB encoded body has a ratio of 4:1 and saves 180 KB, or 75% of the original body size. That alone does not mean the entire page loads four times faster.

What can change the answer

The ratio is undefined for a zero compressed size; percentage savings needs a positive original size. This comparison excludes HTTP headers and does not predict latency or CPU cost.

Sources & definitions

Method checked:

Continue with a related task