Skip to content
Calcrivo

Disk Usage Calculator

Estimate total disk usage from a file count and average file size, and see what percentage of total disk that consumes.

Inputs

Total number of files

KB
GB

Estimated Used Space

24.414GB

Percent of Total Disk Used

24.41%

Estimated Used Space

25,000.00MB

Estimated Free Space

75.586GB

Status

Healthy

Step by step

  1. Values used

    File Count = 100,000; Average File Size = 256 KB; Total Disk Size = 100 GB

  2. Used space

    used = file_count × avg_file_size

  3. Usage percentage

    used% = (used / total_disk) × 100

  4. Estimated Used Space

    = 24.414 GB

  5. Percent of Total Disk Used

    = 24.41

  6. Estimated Used Space

    = 25,000.00 MB

  7. Estimated Free Space

    = 75.586 GB

  8. Status

    = Healthy

How it works

Total used space is estimated by multiplying the number of files by their average size, mirroring the rough math behind the `du` command's summary output. Comparing that estimate to the total disk capacity yields a usage percentage, which is flagged as a warning at 80% and critical at 95% — the same thresholds most Linux monitoring tools default to.

Formulas

Used space

used = file_count × avg_file_size

n
file count
\bar{s}
average file size

Usage percentage

used% = (used / total_disk) × 100

U
used space
T
total disk capacity

Frequently Asked Questions

Why is this only an estimate?

Real filesystems round each file up to a multiple of the block size and also store metadata (inodes, directory entries), so actual usage from `du` or `df` is typically higher than file_count × average_size, especially with many small files.

What disk usage percentage should trigger an alert?

Most monitoring setups warn at 80% and escalate to critical at 90-95%, leaving headroom for logs, temp files and snapshots before the filesystem fills completely.

How is this different from the Filesystem Utilization Calculator?

This calculator projects usage from file count and average size — useful for capacity planning before files exist. The Filesystem Utilization Calculator works from actual used/total block counts reported by `df`.

You might also need