File Size Calculator
Converting File Sizes Without Losing Track of the Base
A photo listed as "4.2 MB," a game update listed in GB, and a cloud storage quota listed in TB all use the same unit names but not always the same underlying byte count. This calculator moves a value between bytes, kilobytes, megabytes, gigabytes, terabytes, and petabytes under whichever convention you specify — the binary base used by most operating systems, or the decimal base used by storage manufacturers and cloud providers.
The Formula
Every conversion passes through bytes as the common intermediate unit:
Result = Bytes / (Size of target unit in bytes)
Under the binary convention, each step up is ×1024 (1 KB = 1024 B); under the decimal convention, each step is ×1000 (1 KB = 1000 B) — the same structure as the formal IEC vs. SI distinction, applied consistently through KB, MB, GB, TB, and PB.
Where This Calculation Matters
- Comparing quoted file sizes — converting a size quoted in one unit into the unit you actually need to compare against a limit or quota.
- Explaining a size discrepancy — a value that looks "wrong" between two systems is often just the same byte count expressed under different base conventions, not an actual data mismatch.
- Media production specs — converting between the decimal GB used in disc capacity specs (a standard DVD is quoted as 4.7 GB, decimal) and the binary units a video editor might report.
- Cloud storage tiers — checking exactly how many MB or GB a storage plan's listed capacity represents before estimating how many files it will hold.
Same Value, Two Conventions
| Conversion | Binary (1024-based) | Decimal (1000-based) |
|---|---|---|
| 750 MB → GB | 0.7324 GB | 0.75 GB |
| 1 GB → MB | 1,024 MB | 1,000 MB |
| 4.7 GB (DVD spec) → MB | 4,812.8 MB | 4,700 MB |
A single-layer DVD is specified as 4.7 GB using the decimal convention — converted with the binary convention instead, it works out to roughly 4.38 "GiB," which is why some software reports its capacity differently.
How to Use This Calculator
- Enter the Value you want to convert.
- Choose the From unit and To unit, from B up through PB.
- Select the Binary (1 KB = 1024 B) or Decimal (1 KB = 1000 B) base.
- Select Calculate to get the converted value.
Related Calculations
Need bit-level units like bits and Kbps included in the conversion? Use the Storage Calculator. Estimating a video or audio file's size from its bitrate instead? See the Video Bitrate Calculator.
Principles of Digital Data Measurement and File Size Calculations
A digital file size calculator determines the exact storage capacity required to store digital files, video recordings, audio tracks, database archives, and cloud backups based on bitrates, durations, or raw dimensional arrays. Understanding digital storage units is essential for storage infrastructure capacity planning, bandwidth provisioning, and media production workflows.
Decimal (SI) versus Binary (IEC) Storage Prefixes
A major source of confusion in computer engineering stems from two competing storage standards:
- Decimal SI Standards (Base-10): Used by hard drive and SSD manufacturers, telecommunications bandwidth providers, and networking protocols:
1 Kilobyte (KB) = 1,000 Bytes | 1 Megabyte (MB) = 106 Bytes | 1 Gigabyte (GB) = 109 Bytes
- Binary IEC Standards (Base-2): Used by operating systems (such as Windows, Linux kernels, and computer RAM memory):
1 Kibibyte (KiB) = 1,024 Bytes | 1 Mebibyte (MiB) = 1,024² Bytes | 1 Gibibyte (GiB) = 1,024³ (1,073,741,824) Bytes
- The "Missing Gigabytes" Phenomenon: When a 1,000 GB (1 TB) retail hard drive is formatted in Windows, it reports only 931.32 GiB of usable capacity because Windows divides by 1,024³ rather than 1,000³.
The Core Media File Size Formula
Comprehensive Digital Storage Units Matrix
| Unit Name | Symbol | Base-10 (Decimal Bytes) | Base-2 (Binary Bytes) |
|---|---|---|---|
| Byte | B | 8 bits | 8 bits |
| Kilobyte / Kibibyte | KB / KiB | 1,000 Bytes (10³) | 1,024 Bytes (210) |
| Megabyte / Mebibyte | MB / MiB | 1,000,000 Bytes (106) | 1,048,576 Bytes (220) |
| Gigabyte / Gibibyte | GB / GiB | 1,000,000,000 Bytes (109) | 1,073,741,824 Bytes (230) |
| Terabyte / Tebibyte | TB / TiB | 1012 Bytes | 1,099,511,627,776 Bytes (240) |
| Petabyte / Pebibyte | PB / PiB | 1015 Bytes | 1,125,899,906,842,624 Bytes (250) |
Step-by-Step Worked Calculation Example
Example: Calculating Video Surveillance Storage for a 30-Day NVR Archive
Problem: A commercial security system records continuous video from 8 IP cameras. Each camera streams H.265 video at a constant bitrate of 4.0 Mbps with 64 kbps AAC audio. Calculate the total storage capacity required in Terabytes (TB) to maintain an uninterrupted 30-day (720 hours) security archive.
Step 1: Calculate total combined bitrate per camera:
Bitrate per Camera = 4,000 kbps (video) + 64 kbps (audio) = 4,064 kbps
Combined Bitrate for 8 Cameras = 4,064 kbps × 8 = 32,512 kbps = 32.512 Mbps
Step 2: Calculate total seconds in 30 days:
Seconds = 30 days × 24 hrs/day × 3,600 s/hr = 2,592,000 seconds
Step 3: Calculate total data in Megabytes:
Total Data (Megabytes) = (32,512 kbps × 2,592,000 s) / (8 × 1,000) = 10,533,888 MB
Step 4: Convert to Terabytes (TB) with 10% formatting/slack overhead:
Total Net Storage = 10,533,888 MB / 1,000,000 = 10.534 TB
Gross Storage Required (10% buffer) = 10.534 TB × 1.10 = 11.59 TB
Conclusion: Sizing requires installing at least three 4 TB enterprise surveillance hard drives (or two 8 TB drives in RAID 1) to guarantee 30 days of retention.
Common Pitfalls in File Size Calculations
- Filesystem Cluster Slack Space: Filesystems allocate storage in minimum allocation clusters (e.g., 4 KB NTFS clusters); storing millions of tiny 500-byte text files wastes significant storage due to cluster slack space.
Enterprise Deduplication and Filesystem Compression
In enterprise datacenter storage systems (such as ZFS, Btrfs, and NetApp storage appliances), raw file sizes are dramatically compressed using real-time inline algorithms:
- Block-Level Deduplication: Identifies identical 4 KB or 8 KB data blocks across virtual machine disk images and database snapshots, storing only a single unique physical copy and referencing it via metadata pointers, often saving 70% to 90% of storage capacity.
- Transparent Compression (LZ4 / Zstandard): Compresses active filesystem blocks on-the-fly with minimal CPU overhead, doubling effective SSD storage density.
Linear Tape-Open (LTO) Cold Storage Density
For enterprise long-term archival compliance, organizations utilize magnetic tape media. Modern LTO-9 tape cartridges store 18.0 Terabytes of uncompressed data (up to 45 TB with 2.5:1 hardware compression) per single cartridge at an archival media cost under $5 per Terabyte, with a verified shelf storage lifespan exceeding 30 years.
Lossless vs. Lossy Data Archiving Compression
While lossy media compression permanently discards psychoacoustically inaudible frequencies or fine visual textures to achieve 90% file size reductions, enterprise databases and scientific genome archives rely on lossless Huffman coding and DEFLATE compression (such as Gzip and Zstandard) to achieve exact bit-for-bit reconstruction upon decompression.
Sparse Files and Virtual Disk Provisioning
In cloud virtualization platforms, hypervisors allocate thin-provisioned sparse disk images that reserve virtual multi-terabyte address spaces while physically consuming storage on physical SSDs only as actual data blocks are written.