Skip to content

Data Compression Calculator

data-compression-calculator
: 1

Higher means smaller output. 3:1 means the compressed file is one third the size.

How this compression calculator works

A compression ratio tells you how many times smaller your data gets. A ratio of 3:1 means the compressed data is one third of the original size.

The formulas

Compressed size = Raw size ÷ Ratio

Space saved = Raw size − Compressed size

Saving % = (1 − 1 ÷ Ratio) × 100

Worked example

You have 100 GB of raw data and a 3:1 ratio.

  • Compressed size = 100 ÷ 3 ≈ 33.33 GB
  • Space saved ≈ 66.67 GB, a saving of about 66.7%

Typical ratios

Real ratios depend heavily on your data. As a rough guide:

  • Plain text, logs and JSON often compress 3:1 to 10:1, because they repeat a lot.
  • Columnar formats such as Parquet or ORC with Snappy or Zstandard often reach 3:1 to 10:1 on tables.
  • Images, video and already-zipped files barely shrink (close to 1:1), because they are already compressed.

The best way to know is to compress a real sample of your data and measure it.

Lossless or lossy?

Lossless compression (gzip, Snappy, Zstandard) gives back exactly the original data. Data systems use this. Lossy compression (JPEG, MP3) throws some detail away to get much smaller files, and it is only suitable for media.

Frequently asked questions

Is a higher ratio always better?

Not always. Stronger compression usually takes more CPU time to compress and read. Snappy is fast with a moderate ratio; Zstandard and gzip compress more but cost more CPU.

How do I plan storage costs with this?

Use the compressed size in the data storage cost calculator to see what it will cost each month.

Share

One short email when a new calculator or article goes live. No spam, and you can unsubscribe in one click.