Files on disk calculator

How many files of a given size fit on a drive.

Inputs

Files on disk calculator

5 fields

A reserve of 5-15% is common, depending on the task.

Equal-file packing excludes automatic cluster allocation, metadata, filesystem entry limits and hidden partitions. Reserve is supplied by the user.

Fill in the fields and the result will appear here automatically.

Find how many whole files of one size fit into the supplied usable space. Drive capacity and file size have separate decimal/binary unit selectors. Changing units does not lose bytes. The reserve percentage removes only the explicitly supplied fraction; filesystem space is not deducted automatically.

FAQ
4 questions
Freshness
formula-based

How it works

Formula and logic

Both selected units are converted to bytes. Usable space = capacity·(100−reserve)/100; file count is the floor of usable space / one file size. The floor uses the rational ratio of the parsed numbers’ decimal spellings; leftover space is calculated after subtracting whole files. Reserve is from 0 to below 100% and is separate from GB/GiB conversion. File count is bounded by the safe integer range.

Example

A 1000 GB drive holds 250 000 files of 4 MB each.

Fields and units

  • Drive capacity — GB
  • Capacity unit — list option
  • File size — MB
  • File unit — list option
  • Reserved space — %

How to use

  • — Enter the drive capacity and pick its unit.
  • — Enter the file size and pick its unit.
  • — Add a reserve if some space is spoken for.

Method and limitations

Calculation method
Formula and logic
Data or methodology source
NIST: decimal and binary prefixes
Limitation
Equal-file packing excludes automatic cluster allocation, metadata, filesystem entry limits and hidden partitions. Reserve is supplied by the user.

FAQ

Why does my drive show less than the label?

GB=10⁹ bytes and GiB=2³⁰ bytes are different units for the same space, not lost bytes. Software may use either scale. Filesystem data is a separate use of space and is represented here by the reserve.

Is filesystem overhead subtracted?

Not automatically. Cluster size and metadata vary by filesystem, so the reserve field lets you account for them explicitly.

What if the file is bigger than the drive?

The answer is zero, which is a correct result rather than an error.

Are files assumed to be identical?

Yes. The calculation answers how many files of one given size fit, not how a mixed collection would pack.