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.

Calculations run locally in your browser

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