Compression Ratio Calculator
Enter an original and compressed size, get the compression ratio, percentage reduction, and space saved — all three of the different ways this gets reported, since "3:1 compression" and "67% smaller" and "33% of original size" all describe exactly the same result and it's easy to misquote one as another.
Reading a compression ratio correctly
A ratio of 5:1 means the original was 5 times larger than the compressed result — a 500MB file compressing to 100MB is 5:1. This is the number most backup and archival tools report, and it's worth being able to sanity-check it against the percentage figures, since a lot of marketing material quotes ratios in whichever form sounds most impressive for the specific number involved (a 90% reduction and a 10:1 ratio are the same thing, but "90% smaller" sounds like more to most people at a glance).
Why compression ratios vary so much by data type
Text, logs, and other highly repetitive structured data compress extremely well — ratios of 5:1 to 10:1 are routine, sometimes higher for very repetitive log data specifically. Already-compressed formats — JPEG, MP4, ZIP, most modern video and audio codecs — compress barely at all the second time, because the redundancy compression exploits has already been squeezed out; running gzip on a folder of JPEGs typically saves next to nothing and sometimes technically makes the total slightly larger once you include compression overhead. Database backups and structured exports usually land somewhere in between, depending heavily on how much repeated structure versus high-entropy data (encrypted fields, already-compressed blobs, random IDs) the export actually contains.
Where this actually gets used
- Sanity-checking whether a backup tool's claimed compression ratio matches what you're actually observing on disk
- Estimating storage savings before enabling compression on a log pipeline or backup job
- Comparing two compression algorithms or settings (e.g. gzip level 6 vs 9) on the same dataset to see if the extra CPU cost of higher compression is actually worth the marginal space saved
- Reverse-engineering roughly how compressible a dataset is, which is itself a useful signal about how repetitive or structured the underlying data actually is