Skip to content
ENExplore Calculators

Docker Image Compression Calculator

Estimate compressed vs uncompressed image size savings across registry transfers.

About Docker Image Compression Calculator

Docker layers are stored compressed (gzip) in registries. Compressed size = uncompressed / compressionRatio. Typical ratios: 2–3× for compiled binaries, 3–5× for text-heavy layers (node_modules, documentation), 1.2–1.5× for already-compressed data.

Formula

Compressed Size

compressed = uncompressed / compressionRatio

uncompressed
Uncompressed image size in MB
compressionRatio
Gzip compression ratio (typically 2–4)

Worked example

With the default values below, Docker Image Compression Calculator returns Compressed Image Size of 320.0. Change any input above and every figure here is recalculated in your browser.

Inputs used

Uncompressed Image Sizeaccepts 1–100,000 MB
800 MB
Compression Ratioaccepts 1–20 ×
2.5 ×
Layer Countaccepts 1–200 layers
10 layers

Results

Compressed Image Size
320.0 MB
Compression Savings
60.0%
Size Saved
480.0 MB
Avg Compressed Layer
32.0 MB

Step by step

  1. 1Compressed size= 320.0MB
  2. 2Savings= 480.0MB (60.0%)
  3. 3Average compressed layer= 32.0MB

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 1 decimal place, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why does `docker images` show a different size than the registry?

`docker images` shows uncompressed size (what's on disk locally); the registry stores gzip-compressed layers, so registry storage and transfer sizes are significantly smaller.

Can I improve the compression ratio?

Reducing entropy in layers helps — combining related files, removing unnecessary files before layer commit, and avoiding random/binary content that doesn't compress well.

Docker Image Compression Calculator | Calcrivo