Compression Ratio Calculator
Enter the original and compressed file sizes to get the compression ratio (like 4:1) and the percentage of space you saved.
Ratio and savings at once
Enter the original and compressed sizes and the calculator returns the compression ratio (original ÷ compressed) and the space savings as a percentage together.
Use the same unit
Both sizes must be in the same unit — KB, MB, or bytes. The unit cancels out, so only the comparison between the two numbers matters.
What is a compression ratio?
How much smaller the file got
The compression ratio is the single number that tells you how effectively data was compressed: it is the original size divided by the compressed size. This compression ratio calculator turns two measurements — the size before compression and the size after — into the ratio (often written like 4:1) and the matching space savings as a percentage. It is the figure behind ZIP archives, image and video codecs, and database storage, where a higher ratio means less disk space, faster transfers, and lower bandwidth costs.
Enter an original size and a compressed size to get the compression ratio and the percentage of space you saved instantly.
The compression ratio is the original size divided by the compressed size, and the space savings is the share of the original that was removed, written as a percentage.
ratio = original size ÷ compressed sizesavings = (1 − compressed ÷ original) × 100Because both formulas divide one size by the other, the unit cancels out — use KB, MB, or bytes, as long as both fields use the same one.
Suppose a 1000 KB log file is compressed down to 250 KB.
Divide original by compressed
1000 ÷ 250 = 4 — the compression ratio, written 4:1.
Find the compressed fraction
250 ÷ 1000 = 0.25 — the compressed file is a quarter of the original.
Convert to space savings
(1 − 0.25) × 100 = 75% — three quarters of the space was removed.
The two outputs describe the same result from two angles. The compression ratio (4, or 4:1, for the file above) is a multiplier: the higher it is, the smaller the compressed file relative to the original, so a 10:1 ratio is far better than 2:1. The space savings (75%) restates that as the slice of the original you no longer have to store or transfer. The notation "4:1" reads as "four to one" — four units of original data became one unit after compression. A ratio of exactly 1 means no change at all (0% savings), which is the boundary case where the two sizes are equal. In practice text and logs compress well because they are full of repeating patterns, while photos and audio in formats like JPEG or MP3 are already compressed and have little redundancy left to remove.
The arithmetic is exact, but a couple of practical points are worth keeping in mind.
Already-compressed data can expand
Compression is not guaranteed to shrink a file. Feeding already-compressed or random, incompressible data to a compressor can make it larger, because the format adds headers and overhead without finding redundancy to remove. When that happens the compressed size exceeds the original, the ratio drops below 1, and the space savings goes negative — a perfectly valid result that simply signals the data should be left uncompressed.