Log Compression Calculator
Calculate compressed log storage size and cost savings from a raw log volume and expected compression ratio.
Inputs
Uncompressed log volume over the period being analyzed.
Percent size reduction achieved by compression (e.g. gzip on text logs commonly reaches 80-90%).
Storage cost per GB per month for your backend (e.g. S3 Standard).
Compressed Size
75.00GB
Storage Savings
425.00GB
Monthly Cost Savings
$9.78
Annual Cost Savings
$117.30
Step by step
Compressed size: raw × (1 − ratio)
500 × (1 − 85/100)
= 75.00 GB
Savings: raw − compressed
500 − 75.00
= 425.00 GB
Monthly cost savings
(500 − 75.00) × $0.023
= $9.78
How it works
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
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.
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