Enter the number of files and the average size per file into the calculator to determine the total data size. This calculator helps in estimating the storage space required for a given number of files with an average size.
Data Size Formula
The calculator uses a different formula for each tab.
Files tab (three modes):
Total = N * S
Fit = floor(C / S)
Average = T / N
- N = number of files
- S = average size per file (in bytes)
- C = storage capacity available (in bytes)
- T = total data size (in bytes)
Convert tab:
Output = Value * (BytesPerFromUnit / BytesPerToUnit)
Decimal units (KB, MB, GB, TB, PB) use powers of 1000. Binary units (KiB, MiB, GiB, TiB) use powers of 1024. Bits equal one-eighth of a byte.
Text tab:
Bytes = sum of bytes per character under chosen encoding
- UTF-8: 1 to 4 bytes per character
- UTF-16: 2 bytes per code unit (4 for surrogate pairs)
- ASCII: 1 byte per character
The Files tab handles capacity planning. The Convert tab moves a value between any two units. The Text tab measures the byte size of a string under the selected encoding.
Reference Tables
Use these tables to sanity check inputs and results.
| Unit | Bytes | Family |
|---|---|---|
| KB | 1,000 | Decimal |
| KiB | 1,024 | Binary |
| MB | 1,000,000 | Decimal |
| MiB | 1,048,576 | Binary |
| GB | 1,000,000,000 | Decimal |
| GiB | 1,073,741,824 | Binary |
| TB | 1,000,000,000,000 | Decimal |
| TiB | 1,099,511,627,776 | Binary |
| File type | Typical size |
|---|---|
| Plain text page | 2 to 10 KB |
| JPEG photo (phone) | 2 to 6 MB |
| RAW photo | 20 to 50 MB |
| MP3 song (3 min) | 3 to 5 MB |
| 1080p video (1 min) | 100 to 200 MB |
| 4K video (1 min) | 300 to 600 MB |
| PDF document | 100 KB to 5 MB |
| PC game install | 5 to 150 GB |
Examples and FAQ
Example 1: Total size from files. You have 1,500 photos at an average of 4 MB. Total = 1,500 × 4 MB = 6,000 MB, or 6 GB.
Example 2: Files that fit. A 64 GB card holds files that average 250 MB. Fit = floor(64,000 MB / 250 MB) = 256 files.
Why does my 1 TB drive show as 931 GB? Drive makers label capacity in decimal TB (1,000,000,000,000 bytes). Operating systems often display the same bytes in binary GiB but call it “GB,” so 1 TB shows as about 931 GiB.
What is the difference between bits and bytes? One byte equals 8 bits. Network speeds are usually quoted in bits per second (Mbps), while file sizes are quoted in bytes (MB). Divide a bit rate by 8 to get the byte rate.
Why does the same text give different byte counts? Encoding decides how many bytes each character takes. The letter “A” is 1 byte in UTF-8 and 2 bytes in UTF-16. An emoji can be 4 bytes in UTF-8 and 4 bytes in UTF-16.
Should I plan storage with decimal or binary units? Match the source. Drive capacity is decimal. RAM and most operating system file sizes are binary. Mixing the two makes estimates look off by 7 to 10 percent.
