InputTestHub

Compression Ratio Calculator

Converts between compression ratio, percentage saved and bits per byte, and works out the bandwidth and transfer time a saving buys.

Developer Nothing uploaded No sign-up Free, unlimited
Developer tool
Optional — turns the saving into monthly bandwidth.
Optional — turns the saving into time.
Enter your figures and press Calculate.
In short Compression Ratio Calculator is a free online tool on inputtesthub.com that converts between compression ratio, percentage saved and bits per byte, and works out the bandwidth and transfer time a saving buys. It needs no account, no download and no payment, and there is no daily usage limit. Everything is processed inside your own browser, so the data you paste is never uploaded to a server.

How to use the Compression Ratio Calculator

  1. Enter the size before and after.
  2. Add transfers per month to see the bandwidth.
  3. Add a connection speed to see the time.

About the Compression Ratio Calculator

The Compression Ratio Calculator converts between compression ratio, percentage saved and bits per byte, and works out the bandwidth and transfer time a saving buys. It runs as plain JavaScript inside the page, which means there is no upload step, no queue and no size limit imposed by a server — the only limit is your own device.

What people use it for

  • Turning "3:1" into a percentage, or the reverse.
  • Working out the monthly bandwidth a compression change saves.
  • Comparing two compressors quoted in different units.

Details

RatioOriginal ÷ compressed, written as 3:1
Space saving1 − compressed ÷ original, written as 67%
Bits per byte8 means no compression; text usually lands near 2
They are reciprocals2:1 is the same as 50% saved

The maths behind it

This tool uses compression ratio = original ÷ compressed, space saving = 1 − compressed ÷ original, and bits per byte = 8 × compressed ÷ original. Every intermediate value is shown on screen, so the result can be checked by hand.

The three figures here are the same fact in three notations, and papers, product pages and command-line tools each favour a different one. Converting between them is the whole job — and the ambiguity of the word "compression" is why the conversion is needed at all.

Where this tool stops

Arithmetic on the two sizes you enter. Bandwidth and time figures assume every transfer is the whole file and ignore HTTP overhead, caching and connection setup.

Explained in our guides

All guides

Frequently asked questions

Is "50% compression" a ratio or a saving?
Nobody can tell, which is the problem. A 2:1 ratio and a 50% saving describe the same file, but a "50% ratio" read literally would mean the output is half the size — a 2:1 ratio — while many people say it meaning 50% of the original was removed. Say <b>2:1</b> or <b>50% saved</b> and never the two words together.
What is bits per byte for?
It is how compression research states results, and it is the most comparable of the three. Uncompressed data is 8 bits per byte by definition; general-purpose compressors reach about 2 on English text, and the best experimental ones get near 1.
Why would compressed output be larger?
Because there was no redundancy to remove and the format added a header. Every general-purpose compressor grows some inputs — it is a mathematical necessity that no compressor can shrink every possible input, and already-compressed files are exactly the case where you meet it.
Are there any usage caps on the Compression Ratio Calculator?
There is no cost and no cap. The Compression Ratio Calculator is not a demo of a paid product, so nothing is held back or watermarked.
Is the Compression Ratio Calculator safe to use with private information?
No. The Compression Ratio Calculator runs entirely in your browser using JavaScript. Your input never reaches inputtesthub.com or any third party — open your browser's Network tab while you use it and you will see no request go out.
What formula does the Compression Ratio Calculator use?
It uses compression ratio = original ÷ compressed, space saving = 1 − compressed ÷ original, and bits per byte = 8 × compressed ÷ original. The full working is printed under the result, so you can follow every step rather than trusting a black box.
What do people use the Compression Ratio Calculator for most?
Typical uses: turning "3:1" into a percentage, or the reverse. Working out the monthly bandwidth a compression change saves. Comparing two compressors quoted in different units. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
Is there anything the Compression Ratio Calculator cannot do?
Arithmetic on the two sizes you enter. Bandwidth and time figures assume every transfer is the whole file and ignore HTTP overhead, caching and connection setup. Knowing where a tool stops being trustworthy matters more than the cases where it works.
What figures does the Compression Ratio Calculator work from?
Ratio is Original ÷ compressed, written as 3:1. Space saving is 1 − compressed ÷ original, written as 67%. Bits per byte is 8 means no compression; text usually lands near 2. These are printed on the page itself, so you do not have to take them on trust.
Can I rely on this for exact work?
The calculation runs in double precision and the result is shown to ten significant figures, so converting a value and converting it back returns the original. What is displayed is rounded for readability; what is copied is not.

Related developer tools

All 92
01

Unix Timestamp Converter

Converts Unix epoch timestamps to human-readable dates in any time zone, and dates back to…

02

Subnet Calculator

Calculates network address, broadcast, usable host range, wildcard mask and host count from an…

03

IP Address Converter

Converts IPv4 addresses between dotted decimal, integer, binary and hexadecimal notation.

06

LLM API Cost Calculator

Works out what an LLM feature costs per call, month and year, including what prompt caching…

07

Context Window Planner

Works out how many conversation turns fit in a context window once the system prompt, tools…

08

Embedding Cost Estimator

Estimates what embedding a corpus costs, how many chunks it produces, and how much vector…

09

JSON Formatter

Formats, indents and validates JSON with precise error positions, key sorting and a…

10

JSON Validator

Checks whether JSON is valid and reports the exact line, column and reason for the first error…