Disk Usage Calculator
Calculate used, free and total disk space percentages for a Linux filesystem.
About Disk Usage Calculator
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
Worked example
With the default values below, Disk Usage Calculator returns Estimated Used Space of 24.414. Change any input above and every figure here is recalculated in your browser.
Inputs used
- File Countminimum 0
- 100,000
- Average File Sizeminimum 0 KB
- 256 KB
- Total Disk Sizeminimum 0.001 GB
- 100 GB
Results
- Estimated Used Space
- 24.414 GB
- Estimated Used Space
- 25,000.00 MB
- Percent of Total Disk Used
- 24.41%
- Estimated Free Space
- 75.586 GB
- Status
- Healthy
Step by step
- 1Values used
- 2Used space
- 3Usage percentage
- 4Estimated Used Space= 24.414 GB
- 5Percent of Total Disk Used= 24.41
- 6Estimated Used Space= 25,000.00 MB
- 7Estimated Free Space= 75.586 GB
- 8Status= Healthy
Assumptions and limits
- The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 3 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
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`.
