Computing and data

Compression ratio calculator

Use matching units. Negative savings mean the compressed file is larger.

Your numbers

Use the units shown. Results update as you change valid inputs.

YOUR RESULT

Use matching units. Negative savings mean the compressed file is larger.

THE NUMBERS, EXPLAINED

How to use this calculator.

Use matching units. Negative savings mean the compressed file is larger.

Start with your inputs

Enter original size, compressed size. Keep amounts in the units shown on each field. The example is a starting point, not a recommended value.

InputExample value
Original size100
Compressed size25

A worked example

With the example inputs above, compression ratio is 4. Change the inputs to explore your own scenario.

All results for the example inputs above
ResultExample answer
Compression ratio4
Space saving (%)75

How this is calculated

Compression ratio

a/b

Space saving (%)

(1−b/a) × 100. The implementation defines zero original size as 0% saving, rather than dividing by zero.

Symbols and units
a
Original size
b
Compressed size

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions and limits

Use matching units. Negative savings mean the compressed file is larger.

Calculations use the values you enter. Blank or invalid inputs show an error instead of silently substituting zero. Results are displayed to useful precision; calculations retain the underlying numeric precision.

Questions about this tool

What does the result tell me?

Compression ratio; Space saving (%). The result applies to the method and inputs described above. Check the units and assumptions before using it in a decision.

Why might another calculator differ?

Differences in units, rounding, timing or model definitions can produce different answers. Compare the input definitions and the method, rather than only the final number. For this tool: Use matching units. Negative savings mean the compressed file is larger.

Are my inputs stored or sent to AI?

Calculations on this page happen in your browser. The separate AI question finder sends its submitted conversation to OpenAI; these calculator fields are not sent. Favourites and recent tool names are stored locally. A shared link contains the inputs you choose to include.

Review status

Software example and browser checks are recorded in our quality report. No external expert review is claimed. Created with coding assistance; calculations run as ordinary browser code.

Read the quality report →