Calculating compression ratio

Divide the starting size by the ending size. A 4 MB photo that becomes 500 KB compresses to roughly one eighth of its original weight, so the ratio is about 8 to 1.

The inverse also helps. Multiply the compressed size by the ratio to recover the original, which is useful when only the smaller number is recorded somewhere.

What makes a strong ratio

Ratios depend on the content. Highly redundant data, such as flat graphics or text, compresses dramatically, while noisy photographs offer less for the algorithm to exploit.

A dramatic ratio is not automatically good. Aggressive lossy settings can reach impressive numbers by destroying detail, so ratio and visual quality have to be read together.

  • Ratio equals original size divided by compressed size
  • Simple content compresses further than detailed content
  • Lossless methods reach modest ratios without any quality change
  • Lossy methods go further at a visible cost

Compression ratio in practice

When a target size is set rather than a ratio, the question flips: what is the smallest file that still looks right? That framing suits forms and upload limits, where the ceiling is fixed.

Filekind works this way. It compresses JPEG and PNG input to a JPEG at or below the KB or MB figure you choose, and reports the final size and dimensions so you can judge the outcome.