Compression ratio

Type size before and after. 1000 and 300 give 3,33:1. 4096 and 1024 give 4:1. 100 and 95 give 1,05:1. A quotient of typed bytes, not gzip.

This is before / after from your numbers. The calculator does not compress a file and does not run gzip. A rough bundle sits on bundle size.

Input data

Results

Enter data and click Calculate.

How it works

Compression ratio in this calculator is size before divided by size after. 1000 and 300 give 3,33:1. 4096 and 1024 give 4:1. 100 and 95 give 1,05:1. Saved bytes are before minus after. The calculator does not compress a file.

Both fields are bytes that you type. 1000 / 300 ≈ 3.33. 4096 / 1024 = 4. 100 / 95 ≈ 1.05. There is no gzip, Brotli, or Zstd algorithm here. Type figures from disk or from a Network panel.

Zero in the after field gives no ratio. Before smaller than after stays a ratio below 1. The calculator does not read a file and does not change bytes. It only divides two numbers.

Bundle size next door multiplies source by a fixed 0.21. Here you type both ends yourself. 3,33:1 is not a minify estimate. 4:1 at 4096 and 1024 is a plain quotient.

Type 1000 and 300, then Calculate. The result is 3,33:1. A comma in 1000,5 works. 100 and 95 give 1,05:1.

1000 and 300 give 3,33:1. 4096 and 1024 give 4:1. 100 and 95 give 1,05:1. A different byte pair gives a different ratio.

Formula

ratio = before / after; saved = before - after

How to use

  1. Type before 1000 and after 300.
  2. Click Calculate. The result is 3,33:1.
  3. 4096 and 1024 give 4:1. 100 and 95 give 1,05:1.
  4. This is a quotient of typed bytes, not a compressor.
  5. The next card estimates a bundle from fixed ratios.

1000 and 300 give 3,33:1

Ratio = before / after. 1000 and 300 give 3,33:1. This is not a compressor.

Compression
A quotient of typed bytes. 4096 and 1024 give 4:1. Not gzip.
ratio
Before over after. 1000 and 300 give 3,33:1. 100 and 95 give 1,05:1.
before
Input size in bytes. Saved = before - after. The calculator does not touch a file.

Examples

Example 1

  • 1000 B before
  • 300 B after

3,33:1

What compression ratio at 1000 and 300? 3,33:1. A quotient, not gzip.

Example 2

  • 4096 B before
  • 1024 B after

4:1

What ratio at 4096 and 1024? 4:1.

Example 3

  • 100 B before
  • 95 B after

1,05:1

What ratio at 100 and 95? 1,05:1. Weak compression from typed bytes.

Related calculators

Common questions

What compression ratio at 1000 and 300?

3,33:1. 1000 / 300. A quotient of typed bytes, not gzip.

What about 4096 and 1024?

4:1. 4096 / 1024 = 4.

What about 100 and 95?

1,05:1. 100 / 95. Few bytes saved.

Does the calculator compress a file?

No. You type before and after. There is no gzip, Brotli, or Zstd here.

What units are the fields?

Bytes that you supply. The calculator only divides those two numbers.

What if after is zero?

There is no ratio, because we do not divide by zero.

Does a comma in 1000,5 work?

Yes. 1000,5 and 300 give a different ratio than 1000 and 300.

How is this different from bundle size?

That card turns 100 KB in kb into 21 KB gzip. Here 1000 and 300 give 3,33:1.

Is 4:1 algorithm quality?

No. It is only 4096 / 1024 from what you typed.

Knowledge sources

The calculator counts bits, bytes or throughput from your numbers. Below are SI and bit definitions (NIST).

Page updated in 2026.