Observability & SRE

Log Sampling Rate Calculator

Enter current log volume, cost target, and error log percentage to compute the sampling rate needed to hit your budget while keeping 100% of error logs.

No data is transmitted — everything runs locally

Log Sampling Rate Calculator

The Log Sampling Rate Calculator computes the optimal sampling rate to hit a cost target, modeling error log preservation and statistical validity at the sampled volume.

• Calculate the INFO log sampling rate needed to reduce logging costs by 60%

• Model the cost savings from sampling DEBUG logs at 1% vs 10%

• Design a tiered sampling strategy with different rates per log level

• Validate that a target sampling rate preserves enough volume for statistical significance

Uptime, incident, and on-call management. Better Stack provides status pages, incident management, and on-call scheduling for engineering teams.
View log cost options with Better Stack
External site · Independent provider · We may receive a commission · Not a recommendation
What does this tool tell you?
The Log Sampling Rate Calculator computes the optimal sampling rate to hit a cost target, modeling error log preservation and statistical validity at the sampled volume.
What affects the result most?
Optimal sampling rate: target_cost / current_cost × 100 — what rate hits your budget?. Error log preservation: sample 100% of ERROR/FATAL, reduce INFO/DEBUG to hit cost target. Statistical validity: at X% sampling, minimum sample size for 95% confidence in a rare event.
How should I use the result?
The calculation is deterministic — the same inputs always produce the same output — so the most useful workflow is to vary one input at a time and see which factor moves the result most. That tells you where to focus your attention before committing to a decision.
Observability stack visibility. Better Stack watches your monitoring infrastructure — catches collector outages, log pipeline failures, and alert routing gaps.
View monitoring options →
External site · Independent provider · We may receive a commission · Not a recommendation