Log Compression Calculator
Estimate storage savings from compressing log data before archival or shipping.
About Log Compression Calculator
Compressing logs before long-term storage shrinks both disk footprint and cost: compressed = raw × (1 − compression_ratio), with savings = raw − compressed. Text-based logs compress especially well because of repetitive structure (timestamps, field names, common log levels), often reaching 80-90% size reduction with standard codecs like gzip or zstd.
Formula
compressed_GB = raw_volume_GB × (1 - compression_ratio_percent / 100)
- raw_volume_GB
- Uncompressed log volume (GB)
- compression_ratio_percent
- Percent size reduction achieved by compression
Worked example
With the default values below, Log Compression Calculator returns Compressed Size of 75.00. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Raw Log Volumeaccepts 0–10,000,000 GB
- 500 GB
- Compression Ratioaccepts 0–99 %
- 85 %
- Storage Costaccepts 0–100 $/GB/month
- 0.023 $/GB/month
Results
- Compressed Size
- 75.00 GB
- Storage Savings
- 425.00 GB
- Monthly Cost Savings
- $9.78
- Annual Cost Savings
- $117.30
Step by step
- 1Compressed size: raw × (1 − ratio)= 75.00 GB
- 2Savings: raw − compressed= 425.00 GB
- 3Monthly cost savings= $9.78
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 or tax into account.
- Figures are rounded for display to 2 decimal places, 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
What compression ratio should I expect for logs?
Plain text and JSON logs typically compress 80-90% with gzip due to high repetition (field names, timestamps, common values); already-compressed or binary payloads embedded in logs will compress far less.
Does compression affect log search performance?
Yes — compressed logs generally must be decompressed before searching unless your storage/search engine supports compressed-block scanning, so there's a tradeoff between storage savings and query latency for cold/archived data.
Should I compress logs before or after shipping?
Compressing before shipping (e.g. gzip at the agent) reduces network bandwidth too, not just storage — many log shippers support this natively (e.g. Fluent Bit's gzip output compression).
Is zstd better than gzip for logs?
zstd generally offers a better compression-speed tradeoff than gzip at similar or better ratios, and is increasingly the default choice for high-throughput log pipelines that need to compress in real time.
Related Calculators
You might also need
- Log Ingestion CalculatorCommonly used together
- Fluentd Buffer CalculatorCommonly used together
- OpenSearch Index Size CalculatorCommonly used together
- Observability Cost CalculatorCommonly used together
- Log Retention CalculatorAlso in Logging & Observability
- Fluent Bit Throughput CalculatorAlso in Logging & Observability
