Skip to content
Calcrivo

Log Growth Calculator

Predict log file size over time from a daily growth rate and calculate how many days until a size threshold is reached.

Inputs

MB
MB/day
days
MB

e.g. an alert threshold or the partition's capacity

Projected Size at End of Period

2,000.00MB

Threshold Status

Threshold reached in approximately 90 days

Total Growth Over Period

1,500.00MB

Step by step

  1. Values used

    Current Log Size = 500 MB; Daily Growth Rate = 50 MB/day; Projection Period = 30 days; Size Threshold to Watch For = 5,000 MB

  2. Projected size at day n

    size_at_day_n = initial_size + daily_rate × n

  3. Days until threshold

    days = (threshold − initial_size) / daily_rate

  4. Projected Size at End of Period

    = 2,000.00 MB

  5. Threshold Status

    = Threshold reached in approximately 90 days

  6. Total Growth Over Period

    = 1,500.00 MB

How it works

Assuming a roughly constant daily growth rate, a log file's size at any future day is simply its current size plus the daily growth multiplied by the number of days elapsed — a linear projection. Rearranging that same relationship to solve for time gives the number of days until the log reaches any chosen size threshold, whether that threshold represents a monitoring alert level or the physical capacity of the partition it lives on, which is useful for scheduling log rotation or cleanup before a threshold is breached rather than reacting after the fact.

Formulas

Projected size at day n

size_at_day_n = initial_size + daily_rate × n

S_0
initial size
r
daily growth rate
n
number of days

Days until threshold

days = (threshold − initial_size) / daily_rate

T
threshold size
S_0
initial size
r
daily growth rate

Frequently Asked Questions

Why might actual log growth deviate from this linear projection?

Real log volume often correlates with traffic or error rates, which vary by day of week, seasonal events, or incidents — a sudden bug causing repeated error logging can spike growth far above the historical average rate used in a linear projection, so treat this as a planning estimate rather than a guarantee.

How can I measure a log file's actual daily growth rate?

Sample the file size with `stat -c%s /path/to/log` (or `du`) at the same time on consecutive days and take the difference, or average the difference over a week to smooth out day-to-day variance before feeding it into a growth projection.

What should I do once I know when a threshold will be reached?

Set up or tighten logrotate rules to cap growth before the threshold date, add monitoring alerts at an earlier checkpoint (e.g. 80% of the threshold) to catch acceleration in the growth rate, or route logs to centralized storage with its own retention policy.

You might also need