Convert data sizes between bits, bytes, KB, MB, GB, TB, KiB, MiB, and GiB, or calculate total storage from a file count and average file size.

Decimal KB/MB/GB use powers of 1,000; IEC KiB/MiB/GiB use powers of 1,024. One byte is 8 bits. Unit changes convert the entered quantity.

Data Size Formula

The calculator has two modes: convert one data size, or calculate total data for a file count and average file size.

Total files mode: Total bytes = number of files × average bytes per file.

Total = N × S

Convert mode: Output = value × bytes per input unit ÷ bytes per output unit.

Decimal units (KB, MB, GB, TB, PB) use powers of 1000. IEC binary units (KiB, MiB, GiB, TiB, PiB) use powers of 1024. One byte equals 8 bits. Changing an input unit converts its current quantity.

File totals are logical data sizes. Filesystem allocation, metadata, compression and reserved space can change actual disk use. This calculator does not provide text-encoding or files-that-fit modes.

Reference Tables

Use the exact unit table to check conversions. The file-size ranges below are illustrative assumptions, not reliable limits; actual files depend on encoding, compression, duration and content.

Unit Bytes Family
KB1,000Decimal
KiB1,024Binary
MB1,000,000Decimal
MiB1,048,576Binary
GB1,000,000,000Decimal
GiB1,073,741,824Binary
TB1,000,000,000,000Decimal
TiB1,099,511,627,776Binary
File type Illustrative size (varies)
Plain text page2 to 10 KB
JPEG photo (phone)2 to 6 MB
RAW photo20 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 document100 KB to 5 MB
PC game install5 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.

Additional manual example: files that fit. A 64 GB card holds files that average 250 MB. Fit = floor(64,000 MB / 250 MB) = 256 files before filesystem overhead. This is a manual capacity example, not a calculator mode.

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. Check the stated unit rather than assuming a device or operating-system convention. The gap depends on the prefix: 1 MB is about 0.954 MiB, 1 GB about 0.931 GiB, and 1 TB about 0.909 TiB.