%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

Gzip / Brotli / WebP / AVIF Savings Calculator

Results update as you type.

Your numbers

Understanding the compression savings calculator — concept and principle

This calculator estimates how much smaller a file becomes when you switch on text compression (Gzip or Brotli) or convert JPEG images to WebP or AVIF, and how much monthly bandwidth that saves across your traffic. Site owners use it to justify enabling compression on a server or CDN, or to size the payoff of an image-format migration.

Compression savings per view and per monthGzip cuts a 500 KB file to 150 KB, saving 350 KB on each of 100,000 monthly views, 35 GB a month.Squeeze once, save on every view500 KBGzip× 0.30150 KB−70%350 KB saved per view× 100,000 views a month35 GB saved a month350 KB × 100,000 ÷ 1,000,000
A 70% cut turns 500 KB into 150 KB; multiplied by traffic that is 35 GB a month.

How it is calculated

The method menu sets a typical saving fraction: Gzip on text 0.70, Brotli on text 0.76, JPEG to WebP 0.30, JPEG to AVIF 0.50. Dividing KB by one million gives GB in decimal units (1 GB = 1,000,000 KB).

The principle

Text formats such as HTML, CSS, JavaScript and JSON repeat the same words and patterns many times. Gzip uses the DEFLATE algorithm, which replaces repeated strings with short back-references (LZ77) and then encodes symbols with Huffman codes, so frequent symbols take fewer bits. Brotli uses a similar idea with a larger window, context modelling and a built-in dictionary of common web strings, so it usually beats Gzip on text by some extra percent. Images are different: JPEG is already compressed, so the savings from WebP and AVIF come from better prediction and transform coding at similar visual quality. AVIF, based on the AV1 video codec, generally compresses further than WebP but is slower to encode. Compression is lossless for Gzip and Brotli; image conversions are usually lossy and depend on the quality setting.

Worked example

  1. Inputs: 500 KB file, Gzip on text (0.70), 100,000 page views per month.
  2. New size: 500 × (1 − 0.70) = 500 × 0.30 = 150 KB.
  3. Saved per view: 500 × 0.70 = 350 KB.
  4. Monthly saving: 350 × 100,000 ÷ 1,000,000 = 35 GB.
How New size (KB) changes with Original size (KB)How New size changes with Original size01002003001252503755006257501,000Example: 150Original size (KB)
Each point is the calculator re-run with only “Original size (KB)” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Original size (KB)New size (KB)
12537.5
25075
375112.5
500150
625187.5
750225
1,000300

How to read the result

The saving fractions are typical, not guaranteed. Minified JavaScript often compresses 60–80%; already-compressed files (JPEG, PNG, MP4, ZIP, WOFF2) gain almost nothing from Gzip and should not be re-compressed. For images, test a few representative files at your chosen quality, because photos, screenshots and illustrations behave very differently.

Common mistakes

Keep in mind: Results are rough averages for planning. Actual savings depend on the content, compression level and quality settings, so measure on your own files before making cost decisions.

Frequently asked questions

Is Brotli always better than Gzip?

For text it is usually somewhat smaller at comparable settings, and all modern browsers support it over HTTPS; Gzip remains a safe fallback.

Does compression slow down the server?

Compressing on the fly costs CPU, which is why static assets are often pre-compressed at high levels and stored.

Will WebP or AVIF reduce image quality?

Lossy conversion discards some detail; at sensible quality settings the difference is usually hard to see, but check sharp edges and text.

Sources: IETF RFC 1951 (DEFLATE) and RFC 1952 (GZIP file format) · IETF RFC 7932, Brotli Compressed Data Format · Alliance for Open Media, AV1 Image File Format (AVIF) specification

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →