File Size Converter
Convert between bytes, KB, MB, GB, TB, and PB instantly. Toggle between binary (1024-based) and decimal (1000-based) standards.
Definition
File size measures the amount of digital storage space a file occupies. There are two standards: binary (base-1024) used by operating systems where 1 KB = 1,024 bytes, and decimal (base-1000) used by storage manufacturers where 1 KB = 1,000 bytes. This discrepancy is why a "500 GB" hard drive shows approximately 465 GB in your operating system.
| Unit | Value |
|---|
Binary vs Decimal Comparison
See how the same byte count appears differently depending on the standard used.
| Unit | Binary (1024) | Decimal (1000) |
|---|---|---|
| 1 KB | 1,024 B | 1,000 B |
| 1 MB | 1,048,576 B | 1,000,000 B |
| 1 GB | 1,073,741,824 B | 1,000,000,000 B |
| 1 TB | 1,099,511,627,776 B | 1,000,000,000,000 B |
| 1 PB | 1,125,899,906,842,624 B | 1,000,000,000,000,000 B |
About This File Size Converter
I built this converter because the difference between binary and decimal file size measurement is one of the most commonly misunderstood concepts in computing. When you buy a "1 TB" hard drive and your operating system reports 931 GB of usable space, you might think something is wrong. Nothing is wrong. The drive manufacturer measured in decimal (1 TB = 1,000,000,000,000 bytes) while your operating system measured in binary (1 TB = 1,099,511,627,776 bytes). This converter lets you see both measurements simultaneously.
The tool handles seven units: Bytes, Kilobytes (KB), Megabytes (MB), Gigabytes (GB), Terabytes (TB), Petabytes (PB), and Exabytes (EB). Enter a value in any unit and see instant conversions to all other units. The binary/decimal toggle switches between base-1024 (how operating systems measure) and base-1000 (how manufacturers measure).
Binary and Decimal Modes
Toggle between binary (1024) and decimal (1000) base calculations. See results in both IEC binary prefixes (KiB, MiB, GiB) and SI decimal prefixes (kB, MB, GB).
Seven Size Units
Convert between Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes, and Exabytes. Covers everything from individual files to data center capacity.
Quick Presets
One-click presets for common media sizes: CD (700 MB), DVD (4.7 GB), Blu-ray (25 GB), USB (256 GB), HDD (1 TB), and SSD (2 TB).
Copy Any Value
Click the copy button next to any converted value to copy it to your clipboard. Useful for pasting into documentation, tickets, or configuration files.
Reference Table
Built-in comparison table shows the exact byte counts for binary and decimal units side by side, making the difference between standards immediately clear.
Instant Calculation
Results update in real time as you type. No need to click a button or wait for a server response. All calculations run in your browser using native JavaScript math.
Understanding Binary vs Decimal File Sizes
The confusion between binary and decimal file sizes has existed since the earliest days of computing and continues to cause misunderstandings today. Here is the complete explanation.
Why Two Standards Exist
Computers operate in binary (base-2), so memory and storage are naturally organized in powers of 2. A kilobyte in binary is 2^10 = 1,024 bytes, a megabyte is 2^20 = 1,048,576 bytes, and a gigabyte is 2^30 = 1,073,741,824 bytes. These powers of 2 are convenient for hardware design because they align with address bus widths and memory chip capacities.
However, the SI (International System of Units) defines kilo as 1,000, mega as 1,000,000, and giga as 1,000,000,000. Storage manufacturers adopted SI definitions because they are simpler for marketing and because larger decimal numbers look better on product packaging. A drive with 1,000,000,000,000 bytes is labeled "1 TB" in decimal, which sounds larger than "931 GiB" in binary.
The IEC Solution
In 1998, the International Electrotechnical Commission (IEC) introduced new prefixes specifically for binary multiples: kibibyte (KiB = 1,024 bytes), mebibyte (MiB = 1,048,576 bytes), gibibyte (GiB = 1,073,741,824 bytes), tebibyte (TiB = 1,099,511,627,776 bytes), and pebibyte (PiB). These prefixes unambiguously refer to binary multiples, while KB, MB, GB remain available for decimal SI definitions.
In practice, adoption of IEC prefixes has been slow. Linux file managers and some developer tools use GiB and TiB, but Windows continues to use "GB" and "TB" while actually measuring in binary. macOS switched to decimal units (1 GB = 1,000,000,000 bytes) in macOS Snow Leopard (10.6) in 2009, which is why the same drive shows different sizes on Windows and Mac.
The Discrepancy in Numbers
The difference between binary and decimal grows with size. At the kilobyte level, the difference is only 2.4% (1,024 vs 1,000). At the megabyte level, it is 4.9%. At the gigabyte level, it is 7.4%. At the terabyte level, it is 10%. This means a "1 TB" drive (decimal) appears as about 931 GiB (binary) in Windows, a 69 GB difference that often confuses users into thinking their drive is defective.
File Size in Context
Understanding file sizes helps with capacity planning, bandwidth estimation, and storage optimization. Here are reference points for common file types and data volumes.
Common File Sizes
- A plain text email is typically 5-20 KB
- A web page (HTML + CSS + JS) is typically 200 KB to 3 MB
- A high-resolution JPEG photo is 3-10 MB
- A RAW camera image is 20-60 MB
- An MP3 song (4 minutes) is about 4-8 MB
- A FLAC lossless audio file is 20-40 MB per song
- A 1080p video is about 3-5 GB per hour (compressed)
- A 4K video is about 10-20 GB per hour (compressed)
- A full OS installation is 10-30 GB
- A modern AAA video game is 50-150 GB
Storage Media Capacities
- 3.5" floppy disk: 1.44 MB
- CD-ROM: 700 MB
- Single-layer DVD: 4.7 GB (decimal)
- Dual-layer DVD: 8.5 GB (decimal)
- Single-layer Blu-ray: 25 GB
- Dual-layer Blu-ray: 50 GB
- USB flash drives: 16 GB to 2 TB
- Consumer SSDs: 256 GB to 8 TB
- Consumer HDDs: 1 TB to 24 TB
- Enterprise SSDs: up to 100 TB
Network Bandwidth
Network speeds are measured in bits per second (bps), not bytes. To convert between bits and bytes, divide by 8. A 100 Mbps connection transfers 12.5 MB per second. A gigabit connection transfers 125 MB per second. A 10 Gbps data center connection transfers 1.25 GB per second. When estimating file transfer times, divide the file size in bytes by the connection speed in bytes per second.
File Size Calculation Formulas
The formulas used by this converter are straightforward. Understanding them helps when you need to perform file size calculations in your own code or spreadsheets.
Binary Conversion (base 1024)
To convert a value from one binary unit to bytes, multiply by 1024 raised to the unit's power. Bytes = value x 1024^n, where n is the unit level (0 for bytes, 1 for KB, 2 for MB, 3 for GB, 4 for TB, 5 for PB, 6 for EB). To convert bytes to a target unit, divide by 1024^n.
For example, to convert 5 GB to bytes in binary: 5 x 1024^3 = 5 x 1,073,741,824 = 5,368,709,120 bytes. To convert 5,368,709,120 bytes to MB: 5,368,709,120 / 1024^2 = 5,368,709,120 / 1,048,576 = 5,120 MB.
Decimal Conversion (base 1000)
The decimal formula is the same but uses 1000 as the base instead of 1024. Bytes = value x 1000^n. To convert 5 GB to bytes in decimal: 5 x 1000^3 = 5 x 1,000,000,000 = 5,000,000,000 bytes. The difference between 5,368,709,120 (binary) and 5,000,000,000 (decimal) is 368,709,120 bytes, or about 352 MiB.
Converting Between Standards
To convert a decimal measurement to binary, first convert to bytes using the decimal formula, then convert from bytes using the binary formula. For example, a "500 GB" hard drive (decimal) has 500 x 1,000,000,000 = 500,000,000,000 bytes. In binary, this is 500,000,000,000 / 1,073,741,824 = 465.66 GiB.
Operating System Differences
Windows
Windows uses binary measurement (1 GB = 1,073,741,824 bytes) but labels it with decimal prefixes (GB, TB). This is the primary source of confusion. A 1 TB hard drive shows as approximately 931 GB in Windows Explorer. NTFS file system allocates storage in clusters, and the actual usable space is slightly less than the total capacity due to file system metadata.
macOS
Since macOS 10.6 (Snow Leopard), Apple uses decimal measurement (1 GB = 1,000,000,000 bytes). This means a "1 TB" drive shows as approximately 1 TB in Finder, matching the manufacturer's label. This change was made specifically to reduce user confusion, but it created a different confusion for users who switch between Windows and Mac.
Linux
Linux file managers vary in their approach. Most modern Linux file managers (GNOME Files, Dolphin) use IEC binary prefixes (GiB, TiB) to clearly indicate binary measurement. Command-line tools like "ls -l" show sizes in bytes, "ls -lh" uses binary with SI-like prefixes, and "ls -lh --si" uses true decimal SI prefixes. The "df" command uses 1K-blocks by default but supports "-h" (binary) and "-H" (decimal) flags.
Data Storage Industry Context
The file size measurement debate has real implications for the storage industry, from consumer electronics to enterprise data centers.
Consumer Storage Marketing
Storage manufacturers have been sued in class-action lawsuits over the binary/decimal discrepancy. Western Digital settled a class action in 2006, providing backup software to customers who felt misled by the capacity labels. The FTC has not mandated a specific measurement standard, and manufacturers continue to use decimal measurements because they are technically correct per SI definitions.
Cloud Storage Pricing
Cloud storage providers (AWS S3, Google Cloud Storage, Azure Blob Storage) measure and bill storage in bytes. When they say "5 GB of free storage," they typically mean 5 x 1,073,741,824 bytes (binary), though some providers use decimal. This converter helps you calculate exactly how much storage you are getting and what your per-GB costs translate to in actual capacity.
Data Center Capacity Planning
Enterprise data center planning involves petabytes and exabytes of storage. At these scales, the 10% difference between binary and decimal measurements represents terabytes of actual storage. Capacity planners must be explicit about which standard they use in their calculations. This converter supports calculations up to the exabyte range for this purpose.
Bandwidth and Transfer Costs
Cloud egress pricing is based on gigabytes transferred. AWS charges per GB (decimal) for data transfer out. Understanding the exact byte count of your data transfers helps predict costs accurately. This converter can help you convert between units when estimating bandwidth costs for applications that serve large files or media content.
Programming with File Sizes
Developers frequently need to work with file sizes in application code. Here are common patterns for handling file size conversions programmatically.
JavaScript File Size Formatting
A common JavaScript function converts bytes to a human-readable string. The algorithm divides by 1024 (or 1000 for decimal) repeatedly until the value is less than the base, then formats the result with the appropriate unit. This pattern is used in web applications to display file sizes in upload forms, media libraries, and storage dashboards.
File Upload Limits
Web applications commonly set file upload limits in bytes. An upload limit of "10 MB" might mean 10,000,000 bytes (decimal) or 10,485,760 bytes (binary). This 485,760-byte difference (about 474 KB) can cause confusion when a user uploads a file that is 10.2 MB in their file manager but gets rejected by an upload limit of 10,000,000 bytes. Be explicit about your limit: specify the exact byte count and the measurement standard.
Configuration Values
Many configuration files and environment variables specify sizes in different formats. Some use bytes (MAX_UPLOAD_SIZE="10485760)," some use abbreviated strings (MAX_UPLOAD="10M)," and some use specific units (CACHE_SIZE_MB="256)." This converter helps translate between these formats when configuring servers, databases, and application settings.
Database Storage Estimation
Estimating database storage requirements involves calculating the per-row size (sum of column sizes plus overhead) multiplied by the expected number of rows. Indexes add additional storage overhead, typically 20-50% of the data size. This converter helps translate these calculations between bytes and more manageable units for capacity planning and cost estimation.
Historical Context
The evolution of storage units mirrors the exponential growth of digital data. In the 1970s, a 5 MB hard drive was the size of a washing machine and cost thousands of dollars. In the 1980s, the first IBM PC hard drive offered 10 MB. In the 1990s, consumer hard drives reached gigabytes. In the 2000s, terabytes became common. Today, individual enterprise SSDs exceed 100 TB, and data centers manage exabytes of total storage.
The cost per gigabyte has fallen from approximately $10,000 per GB in 1981 to under $0.02 per GB for modern HDDs. This roughly 500,000x cost reduction over 40 years follows the exponential trends predicted by Moore's Law and its storage-industry equivalent, Kryder's Law. Understanding file sizes in historical context helps appreciate how rapidly storage technology has modernized.
File Size Optimization Techniques
Understanding file sizes is practical for optimizing applications, websites, and data storage. Here are techniques for reducing file sizes in common scenarios.
Image Compression
Images are often the largest component of web pages. A typical high-resolution photograph saved as an uncompressed BMP might be 15-30 MB. The same image as a high-quality JPEG is 3-8 MB. Modern formats like WebP reduce this further to 1-4 MB. AVIF, the newest image format, achieves 30-50% smaller files than WebP at equivalent quality. For web delivery, image compression can reduce total page size from tens of megabytes to under 1 MB.
The key to image optimization is choosing the right format for the content type. Photographs with smooth gradients compress well in JPEG, WebP, and AVIF. Graphics with flat colors, text, and transparency are better served by PNG or WebP. Icons and simple shapes should use SVG, which scales to any resolution at kilobyte-level file sizes.
Video Compression
Raw video data is enormous. A single frame of 4K video at 8 bits per channel requires about 24 MB. At 30 frames per second, one second of raw 4K video is 720 MB, making one minute 43 GB. Video codecs like H.264, H.265 (HEVC), VP9, and AV1 compress video by orders of magnitude. A one-hour 4K movie compressed with H.265 is typically 10-20 GB, a compression ratio of roughly 150:1 compared to raw footage.
Text and Code Compression
Text-based files (HTML, CSS, JavaScript, JSON, XML) compress extremely well because they contain repeated patterns. Gzip compression typically reduces text file sizes by 60-80%. Brotli compression achieves 15-25% better compression than gzip for web content. Enabling server-side compression for text-based responses is one of the most effective performance optimizations for web applications.
Minification (removing whitespace, comments, and shortening variable names) provides an additional 10-30% reduction before compression. A 500 KB JavaScript bundle might minify to 200 KB, then compress to 60 KB with gzip or 45 KB with Brotli. The total reduction from 500 KB to 45 KB (91%) significantly improves page load times.
Database Storage Optimization
Database storage can be optimized through data type selection, normalization, and compression. Using SMALLINT (2 bytes) instead of INTEGER (4 bytes) for columns that never exceed 32,767 saves 2 bytes per row. On a table with 100 million rows, this saves 200 MB per column. Similar optimizations include using VARCHAR(50) instead of TEXT for short strings, and TIMESTAMP instead of DATETIME where timezone information is not needed.
File Sizes and Memory
File size and memory usage are related but different concepts. A file on disk may be compressed, while the same data in memory is uncompressed. Understanding this relationship helps with application performance tuning.
Memory vs Disk Size
A 1 MB JPEG image occupies 1 MB on disk but requires 30-50 MB of memory when loaded as an uncompressed bitmap for display. A 100 KB gzipped JSON file is 100 KB on disk and during network transfer, but becomes 400 KB when decompressed in memory, and may use 1-2 MB when parsed into a JavaScript object graph with string interning overhead.
Virtual Memory and Swap
When an application's memory usage exceeds physical RAM, the operating system uses disk-based swap space. The amount of swap needed is directly related to the size of data being processed. Understanding the relationship between file sizes and memory usage helps you provision appropriate amounts of RAM and swap for your workloads.
Page File and SSD Considerations
Windows uses a page file for virtual memory, typically stored on the system drive. The page file can grow to 1-2x the amount of RAM. On systems with 32 GB or more of RAM, this means the page file can consume 32-64 GB of SSD space. Knowing the page file size in different units helps when planning SSD partitioning and disk space allocation.
Cloud Storage and File Sizes
Cloud storage pricing is directly tied to file sizes. Understanding conversions helps estimate and improve cloud costs.
AWS S3 Pricing
AWS S3 Standard charges approximately $0.023 per GB per month for the first 50 TB. A petabyte of data costs roughly $23,000 per month in storage alone. Data transfer out is additional, at $0.09 per GB for the first 10 TB. Accurately converting between units helps estimate these costs when planning cloud migrations or budgeting for data-heavy applications.
Backup Storage Estimation
Estimating backup storage requirements involves the initial full backup size plus daily incremental changes. If your database is 500 GB and changes 2% per day, daily incrementals are about 10 GB. Keeping 30 days of incrementals plus 12 monthly full backups requires: 500 GB (initial) + 30 x 10 GB (daily) + 11 x 500 GB (monthly) = 6.3 TB of total backup storage.
CDN and Edge Caching
Content Delivery Networks cache files at edge locations worldwide. The total CDN storage is the sum of all unique assets multiplied by the number of edge locations that cache them (though CDNs manage this automatically). Understanding the file size of your static assets helps estimate CDN bandwidth costs, which are typically $0.02-0.15 per GB depending on the provider and region.
Bits vs Bytes in Networking
Network speeds are measured in bits per second (bps), while file sizes are measured in bytes. Since 1 byte = 8 bits, you must divide network speed by 8 to get the file transfer rate in bytes. This is a constant source of confusion that leads people to expect faster file downloads than they actually get.
Common Network Speeds in Both Units
- 10 Mbps connection = 1.25 MB/s maximum throughput
- 100 Mbps connection = 12.5 MB/s maximum throughput
- 1 Gbps connection = 125 MB/s maximum throughput
- 10 Gbps connection = 1.25 GB/s maximum throughput
- 100 Gbps connection = 12.5 GB/s maximum throughput
These are theoretical maximums. Real-world throughput is lower due to protocol overhead (TCP/IP headers, Ethernet framing), network congestion, and server-side limitations. Actual file transfer speeds are typically 70-90% of the theoretical maximum under ideal conditions.
Download Time Estimation
To estimate how long a file download takes, divide the file size in megabytes by the connection speed in megabytes per second. A 700 MB file on a 100 Mbps connection (12.5 MB/s actual throughput, assuming 80% efficiency = 10 MB/s) takes approximately 70 seconds. A 4.7 GB DVD image on the same connection takes about 8 minutes.
File System Overhead
File systems add overhead that reduces the usable capacity of a storage device. Understanding this overhead explains why you never get exactly the advertised storage capacity.
Cluster Size and Wasted Space
File systems allocate space in fixed-size blocks called clusters (NTFS) or blocks (ext4, APFS). A typical cluster size is 4 KB. This means a 1-byte file still uses 4 KB of disk space. A directory with 1,000 small files (each 100 bytes) uses 4 MB of disk space even though the actual data is only 100 KB. This overhead is called slack space or internal fragmentation.
File System Metadata
File systems reserve space for metadata: the Master File Table (NTFS), inode tables (ext4), or catalog files (APFS/HFS+). This metadata typically consumes 1-3% of the total disk capacity. On a 1 TB drive, file system metadata might use 10-30 GB, reducing the usable space beyond the binary/decimal discrepancy.
RAID Overhead
RAID configurations use some storage capacity for redundancy. RAID 1 (mirroring) uses 50% of total capacity for data. RAID 5 uses one drive's worth of capacity for parity. RAID 6 uses two drives' worth. A RAID 5 array with four 1 TB drives has 3 TB of usable capacity (approximately 2.73 TiB in binary). Understanding these conversions is critical for data center storage planning.
Storage Technologies Compared
Different storage technologies have different capacity ranges, performance characteristics, and cost profiles. Understanding file sizes in the context of storage technology helps make informed purchasing and architecture decisions.
Hard Disk Drives (HDD)
HDDs use spinning magnetic platters and are the most cost-effective storage for large capacities. Modern consumer HDDs range from 1 TB to 24 TB, with prices around $15-25 per TB. Enterprise HDDs reach higher capacities with features like helium filling (reduces internal friction, enables more platters) and shingled magnetic recording (SMR, which overlaps tracks for higher density). HDDs are best for archival storage, media libraries, and backup where sequential access patterns dominate.
Solid State Drives (SSD)
SSDs use NAND flash memory with no moving parts, providing dramatically faster random read/write performance compared to HDDs. Consumer SSDs range from 250 GB to 8 TB, with NVMe SSDs achieving read speeds of 5,000-7,000 MB/s. Enterprise SSDs can reach 100 TB in a single unit. SSD pricing is approximately $50-100 per TB for consumer drives, roughly 3-4x the cost of HDDs. SSDs are ideal for operating systems, databases, and applications that benefit from fast random I/O.
NVMe vs SATA
SATA SSDs connect through the SATA interface, which is limited to approximately 550 MB/s. NVMe SSDs connect through PCIe lanes, achieving 3,500-7,000 MB/s for PCIe Gen 4 and up to 14,000 MB/s for PCIe Gen 5. The capacity ranges are similar, but the performance difference is dramatic for workloads that involve many concurrent I/O operations, such as database servers and virtual machine hosts.
Cloud Object Storage
Cloud object storage services like AWS S3, Google Cloud Storage, and Azure Blob Storage provide virtually unlimited capacity with pay-per-use pricing. Storage classes with different access latencies (standard, infrequent access, archival) offer different price points. Standard storage costs about $0.023/GB/month, infrequent access $0.0125/GB/month, and archival (Glacier) as low as $0.004/GB/month. For large datasets, archival storage can be 5x cheaper than standard storage.
Data Growth and Future Projections
Global data creation is growing exponentially. Understanding the scale of data in the world puts file size conversions in context.
Global Data Volume
The total amount of data created, captured, copied, and consumed globally reached approximately 120 zettabytes (120,000 exabytes) by 2023 and is projected to reach 180 zettabytes by 2025. To put this in perspective, 1 zettabyte = 1,000 exabytes = 1,000,000 petabytes = 1,000,000,000 terabytes. If each terabyte were a kilometer, a zettabyte would stretch from Earth to the Sun over 6 times.
Data Center Scale
A large cloud data center might house 50,000 to 100,000 servers, each with multiple storage drives. A single rack of servers can contain hundreds of terabytes. A full data center might manage 1-10 exabytes of total storage. Hyperscale providers like AWS, Google, and Microsoft operate dozens of such data centers worldwide, collectively managing hundreds of exabytes.
Personal Data Generation
An average smartphone user generates about 6 GB of data per month through photos, videos, app data, and backups. A household with multiple devices, security cameras, and media streaming might generate 50-100 GB per month. Over a year, that is 600 GB to 1.2 TB of new data. This personal data growth drives consumer storage demand and explains why cloud storage services have become important for most users.
Precision and Rounding in File Size Display
How file sizes are displayed depends on the application and the precision needed. This converter shows results with appropriate significant digits for each range.
Significant Figures
For values above 100, two decimal places provide sufficient precision (1,234.56 MB). For values between 1 and 100, up to six decimal places may be needed (1.234567 GB). For values below 0.000001, scientific notation (1.2345e-7) is used to avoid long strings of zeros. These formatting choices balance readability with precision.
Rounding Conventions
Operating systems round file sizes differently. Windows rounds to two decimal places and drops trailing zeros. macOS rounds to one decimal place. Linux ls -h uses no decimal places below 10 and one decimal place above. Cloud storage billing may use six or more decimal places for fractional GB charges. Understanding your platform's rounding convention helps interpret file size displays correctly.
Exact vs Approximate Values
Some conversions produce exact values (1 KB = exactly 1,024 bytes in binary). Others produce repeating decimals (1 byte = 0.0009765625 KB in binary). This converter uses JavaScript's 64-bit floating-point arithmetic, which provides more than enough precision for all practical file size calculations. The displayed values may be rounded for readability, but the underlying calculations are as precise as the IEEE 754 standard allows.
Common Conversion Reference
Here are frequently needed conversions for quick reference. These values assume binary (1024) measurement unless otherwise noted.
- 1 KB = 1,024 bytes
- 1 MB = 1,048,576 bytes = 1,024 KB
- 1 GB = 1,073,741,824 bytes = 1,024 MB
- 1 TB = 1,099,511,627,776 bytes = 1,024 GB
- 1 PB = 1,125,899,906,842,624 bytes = 1,024 TB
- 1 EB = 1,152,921,504,606,846,976 bytes = 1,024 PB
For decimal (1000) measurement:
- 1 kB = 1,000 bytes
- 1 MB = 1,000,000 bytes = 1,000 kB
- 1 GB = 1,000,000,000 bytes = 1,000 MB
- 1 TB = 1,000,000,000,000 bytes = 1,000 GB
- 1 PB = 1,000,000,000,000,000 bytes = 1,000 TB
- 1 EB = 1,000,000,000,000,000,000 bytes = 1,000 PB
The binary-to-decimal conversion factor at each level: 1 KiB = 1.024 kB, 1 MiB = 1.049 MB, 1 GiB = 1.074 GB, 1 TiB = 1.100 TB. These factors are useful for quick mental conversions between the two standards. When a manufacturer says "1 TB," multiply by 0.909 to get the approximate binary equivalent (931 GiB).
File Size in Mobile and IoT Contexts
Mobile devices and IoT sensors have specific file size considerations driven by limited storage, bandwidth constraints, and power consumption tied to data transmission.
Mobile App Storage
Smartphone storage ranges from 64 GB to 1 TB. After the operating system (10-15 GB) and pre-installed apps (5-10 GB), available storage is 40-975 GB. A typical user's storage breakdown might be: photos and videos (40-60%), apps and games (20-30%), music and podcasts (5-10%), and system cache (5-10%). Understanding these proportions helps when advising users on storage management or designing apps that reduce storage footprint.
Mobile Data Usage
Mobile data plans are typically measured in gigabytes per month. Understanding what consumes data helps users manage their plans. Streaming music at standard quality uses about 1 MB per minute (approximately 1.5 GB per month for 2 hours daily). Streaming video at 480p uses about 700 MB per hour. Social media browsing uses approximately 100-200 MB per hour. Video calls consume 500 MB to 1.5 GB per hour depending on quality settings.
IoT Data Volumes
IoT sensors generate surprisingly small amounts of data individually but massive volumes collectively. A temperature sensor reporting every minute produces about 50 KB per day (a timestamp and a float value per reading). However, a factory with 10,000 sensors produces 500 MB per day, 15 GB per month, and 180 GB per year. At city scale with millions of sensors, the data volume reaches petabytes annually.
Edge Computing Storage
Edge computing devices process data close to where it is generated rather than sending everything to the cloud. Edge storage is typically limited (256 GB to 8 TB) and must balance between buffering incoming data, caching processed results, and storing ML models for local inference. File size awareness helps design edge computing systems that operate within these constraints.
Compression Ratios by File Type
Different file types compress at different ratios. Understanding these ratios helps estimate compressed file sizes and storage savings.
Already-Compressed Files
Files that are already compressed (JPEG, PNG, MP3, MP4, ZIP, GZIP) show minimal size reduction when compressed again. Compressing a ZIP file might reduce it by 1-3%, which is not worth the processing overhead. Similarly, compressing an MP4 video achieves almost no reduction because the video codec has already removed all redundancy.
Text-Based Files
Plain text, HTML, CSS, JavaScript, JSON, XML, CSV, and log files compress extremely well because they contain repeated character patterns. Typical compression ratios: gzip achieves 60-80% reduction, Brotli achieves 65-85% reduction, Zstandard achieves 60-80% reduction with faster decompression than gzip. A 1 MB log file might compress to 150-200 KB.
Database Dumps
SQL database dumps compress very well because they contain repeated SQL keywords, table names, and structured data. A 10 GB PostgreSQL dump might compress to 1-2 GB with gzip, a 5-10x reduction. Binary database formats (pg_dump custom format) include built-in compression and are typically 3-5x smaller than SQL text dumps.
Source Code Archives
Source code repositories compress well because code contains many repeated keywords, indentation, and structural patterns. A Git repository's .git directory stores objects in compressed form. A 100 MB working directory might have a 30-50 MB .git directory. Clone sizes are smaller than total repository history because Git uses delta compression between similar objects.
Practical Size Estimation for Common Workloads
Email Storage
A plain text email averages 5-20 KB. An email with a typical signature and formatting averages 20-50 KB. An email with one attached document averages 500 KB to 5 MB. A corporate email account receiving 50 emails per day generates approximately 25-50 MB per day, 750 MB to 1.5 GB per month, and 9-18 GB per year. Enterprise email archival for compliance purposes can require terabytes of storage for large organizations.
Web Application Databases
A small web application with 10,000 users and 100,000 records might use 500 MB to 2 GB of database storage. A medium application with 100,000 users and millions of records typically uses 10-50 GB. A large SaaS platform with millions of users can require 100 GB to multiple TB. These estimates help with capacity planning and cost forecasting for cloud database services.
Log Files
Application log files grow continuously and can consume significant storage if not managed. A web server processing 1,000 requests per second with a 200-byte log line per request generates 200 KB per second, 17 GB per day, and 500 GB per month. Log rotation, compression, and retention policies must account for these volumes. Centralized logging services charge based on log volume ingested, making log size directly tied to costs.
Media Storage
A professional photographer shooting 500 RAW images per day at 50 MB each generates 25 GB per day, 9 TB per year. A video production studio working with 4K ProRes footage at 1 GB per minute generates 60 GB per hour of shooting, potentially hundreds of TB per year including editing copies and backups. Media storage requirements often drive the adoption of high-capacity NAS systems and object storage services.
Data Transfer Time Calculations
Knowing a file's size is only half the picture. The other half is knowing how long a transfer will take at a given connection speed. Transfer time calculations convert file sizes and bandwidth into practical estimates for uploads, downloads, backups, and replication tasks.
Bandwidth Units and File Size Units
Network speeds are measured in bits per second, while file sizes are measured in bytes. This distinction trips up many people. To convert from megabits per second (Mbps) to megabytes per second (MB/s), divide by 8. A 100 Mbps connection transfers approximately 12.5 MB/s under ideal conditions. In practice, protocol overhead (TCP headers, Ethernet framing) reduces effective throughput by 5-10%, so expect roughly 11-12 MB/s on a 100 Mbps link.
Common Connection Speeds
Home broadband connections in 2024-2026 typically range from 25 Mbps to 1 Gbps (1,000 Mbps). Fiber connections offer symmetrical speeds of 500 Mbps to 10 Gbps. Mobile 5G delivers 100-300 Mbps in real-world conditions, though peak speeds can exceed 1 Gbps. Cloud data center interconnects run at 10-100 Gbps. At 100 Mbps, transferring a 1 GB file takes approximately 80 seconds. At 1 Gbps, the same transfer takes 8 seconds. At 10 Gbps (data center), it takes under 1 second.
Estimating Backup Window Requirements
Backup administrators must ensure data can be copied within a specified time window, often overnight (8-12 hours). A 10 TB dataset backed up over a 10 Gbps link takes approximately 2.2 hours under ideal conditions. Over a 1 Gbps link, the same backup takes 22 hours, which does not fit an overnight window. When the dataset exceeds the backup window at available bandwidth, incremental or differential backup strategies become necessary. Incremental backups transfer only changed blocks, reducing data volume to 1-5% of total size per day for most workloads.
Cloud Upload Considerations
Uploading large datasets to cloud storage requires understanding upstream bandwidth, which is typically lower than downstream for consumer connections. An asymmetric connection with 200 Mbps down and 20 Mbps up means uploading a 100 GB dataset takes approximately 11 hours. For initial cloud migrations of terabyte-scale data, cloud providers offer physical transfer services (AWS Snowball, Azure Data Box, Google Transfer Appliance) where you ship hard drives instead of transmitting data over the network.
Backup and Redundancy Storage Planning
Backup strategies multiply storage requirements. Understanding these multipliers helps plan total storage capacity and budget.
The 3-2-1 Rule
The widely recommended 3-2-1 backup rule states: keep 3 copies of data, on 2 different media types, with 1 copy offsite. This means your primary data requires 3x the storage capacity for full protection. A 2 TB primary dataset needs 6 TB of total storage across all backup locations. Adding incremental backups with 30 days of retention further increases requirements, potentially to 8-10 TB depending on data change rate.
RAID Storage Overhead
RAID configurations trade usable capacity for redundancy and performance. RAID 1 (mirroring) uses 50% of raw capacity for usable storage. RAID 5 (distributed parity) uses 67-94% depending on disk count, calculated as (N-1)/N where N is the number of disks. RAID 6 (double parity) uses (N-2)/N. RAID 10 (mirrored stripes) uses 50%. A NAS with 4 x 8 TB drives (32 TB raw) provides approximately 24 TB usable in RAID 5 and 16 TB usable in RAID 10.
Snapshot and Versioning Overhead
File versioning systems (Time Machine, Volume Shadow Copy, ZFS snapshots) maintain copies of changed data blocks. The storage overhead depends on data change rate. A file server with 1 TB of data and 5% daily change rate using hourly snapshots retained for 7 days might consume an additional 400-600 GB for snapshot data. Object storage versioning (S3, GCS) keeps every version of every object, which can cause storage to grow unexpectedly if applications frequently overwrite large objects.
File Sizes in Software Development
Software developers encounter file sizes at every stage of the development lifecycle, from source code through build artifacts to deployment packages.
Container Image Sizes
Docker container images vary widely in size. A minimal Alpine Linux base image is approximately 5 MB. A standard Ubuntu base image is 72 MB. A Node.js image ranges from 150 MB (Alpine variant) to 900 MB (full Debian). A Python image with common data science libraries (NumPy, pandas, scikit-learn) can reach 1-3 GB. Multi-stage builds and slim base images reduce deployment image sizes by 50-90%, directly impacting deployment speed and container registry storage costs.
Build Artifact Sizes
Compiled applications vary greatly in size depending on language and dependencies. A Go binary with all dependencies statically linked averages 10-30 MB. A Java application's fat JAR with embedded dependencies averages 50-200 MB. A React single-page application after bundling and minification averages 200 KB to 5 MB for JavaScript, plus assets. A mobile app (APK for Android) averages 20-100 MB, with Google Play enforcing a 150 MB limit for APK downloads over cellular.
CI/CD Pipeline Storage
Continuous integration pipelines consume storage for build caches, test artifacts, and versioned releases. A medium-sized team producing 50 builds per day, each generating 200 MB of artifacts with 30 days of retention, requires 300 GB of artifact storage. Adding dependency caches (npm cache averaging 500 MB to 2 GB, Maven cache averaging 200 MB to 1 GB) increases per-pipeline storage needs. Automated cache pruning and artifact retention policies are needed to prevent unbounded storage growth.
Version Control Repository Sizes
Git repositories grow over time as commits accumulate. A typical open-source project with 5 years of history might have a 50-200 MB .git directory. The Linux kernel repository is approximately 4 GB. Large repositories with binary assets (game development, machine learning models) can reach 10-100 GB. Git Large File Storage (LFS) moves large files out of the repository into external storage, keeping the repository's .git directory small while still tracking large assets with pointers.
File Size Limits Across Platforms
Different platforms impose different maximum file size limits. Knowing these limits prevents failed uploads, corrupted data, and frustrated users.
File System Limits
FAT32, still used on USB flash drives and SD cards, has a maximum file size of 4 GB (4,294,967,295 bytes). This means a single video file or disk image larger than 4 GB cannot be stored on FAT32. exFAT supports files up to 128 PB. NTFS supports files up to 16 TB (with default cluster size) or 256 TB. ext4 supports individual files up to 16 TB. APFS (Apple) supports files up to 8 EB. ZFS supports files up to 16 EB.
Web Platform Limits
Email attachments are typically limited to 25-35 MB (Gmail: 25 MB, Outlook: 20-150 MB depending on configuration). Cloud storage individual file limits: Google Drive 5 TB, OneDrive 250 GB, Dropbox 2 GB via web upload (50 GB via desktop app). GitHub repository files have a hard limit of 100 MB per file (with warnings above 50 MB). npm packages have a default publish limit of 60 MB.
Database Field Limits
Database blob and text field sizes vary by engine. MySQL's BLOB and TEXT types have a maximum of 4 GB (LONGBLOB/LONGTEXT). PostgreSQL's TOAST mechanism supports values up to 1 GB per field. MongoDB documents are limited to 16 MB, with GridFS used for larger files. SQLite has a default maximum blob size of 1 GB (configurable at compile time). These limits affect how applications store uploaded files and generated content.
API and Upload Limits
Web server configurations impose upload limits. Nginx defaults to 1 MB (client_max_body_size). Apache defaults to no limit but PHP defaults to 2 MB (upload_max_filesize). AWS API Gateway has a 10 MB payload limit. AWS Lambda has a 6 MB synchronous response limit and a 256 KB asynchronous invocation payload limit. Cloudflare's free plan limits upload POST body to 100 MB. These limits require chunked upload implementations for large file handling.
Frequently Asked Questions
What is the difference between binary and decimal file sizes?
Binary (base-2) uses multiples of 1024, which is how operating systems like Windows measure storage. Decimal (base-10) uses multiples of 1000, which is how storage manufacturers label drives. A "1 TB" drive (decimal, 1,000,000,000,000 bytes) appears as roughly 931 GiB (binary, divided by 1,073,741,824) in Windows. The drive is not missing space; the two systems simply count differently.
How many megabytes are in a gigabyte?
In binary (base-2), 1 GB = 1,024 MB. In decimal (base-10), 1 GB = 1,000 MB. Most operating systems use binary, while storage manufacturers use decimal. The difference is 24 MB per GB, which adds up significantly at larger sizes. At the terabyte level, the difference between binary and decimal is over 99 GB.
Why does my hard drive show less space than advertised?
Manufacturers use decimal units (1 GB = 1,000,000,000 bytes) while your operating system (Windows) uses binary units (1 GB = 1,073,741,824 bytes). A 1 TB drive has exactly 1,000,000,000,000 bytes as advertised. Windows divides by 1,073,741,824 to get GB, showing about 931 GB. Also, the file system reserves some space for metadata, reducing usable capacity by another 1-3%.
What are IEC binary prefixes (KiB, MiB, GiB)?
IEC binary prefixes were introduced in 1998 by the International Electrotechnical Commission to clearly distinguish binary multiples (powers of 1024) from decimal SI prefixes (powers of 1000). KiB = kibibyte = 1,024 bytes, MiB = mebibyte = 1,048,576 bytes, GiB = gibibyte = 1,073,741,824 bytes. Linux widely uses these prefixes, while Windows and macOS do not.
Is this converter precise for all file sizes?
Yes. The converter uses JavaScript's 64-bit IEEE 754 floating-point arithmetic, which provides 15-17 significant digits of precision. This is precise for all practical file size conversions, including exabyte-scale calculations used in data center capacity planning. For values requiring exact integer precision at extremely large scales, the converter displays results with appropriate significant figures.
Video Guide
Community Questions
Why does my 1 TB hard drive only show 931 GB?
Hard drive manufacturers use the decimal system (1 TB = 1,000,000,000,000 bytes), while operating systems use the binary system (1 TiB = 1,099,511,627,776 bytes). So 1 TB = 931.3 GiB when displayed by your OS. This is not missing space; it is a difference in measurement standards.
What is the difference between MB and MiB?
MB (megabyte) officially means 1,000,000 bytes (decimal). MiB (mebibyte) means 1,048,576 bytes (binary, 2^20). The IEC introduced MiB/GiB/TiB terminology in 1998 to eliminate ambiguity. Most operating systems display binary values but label them as "MB/GB," which causes confusion. Linux tools like df often support both with the -H (decimal) and -h (binary) flags.
How long does it take to transfer 1 TB over different connections?
At USB 2.0 (480 Mbps theoretical): roughly 4.6 hours. USB 3.0 (5 Gbps): about 27 minutes. USB 3.2 Gen 2 (10 Gbps): about 13 minutes. Gigabit Ethernet: about 2.2 hours. Real-world speeds are typically 50-70% of theoretical maximums due to protocol overhead and drive speed limitations.
Original Research: File Size Unit Comparison
I compiled this data from IEC and SI standards documentation. Last updated March 2026.
| Unit | Decimal (SI) | Binary (IEC) | Difference |
|---|---|---|---|
| Kilobyte | 1,000 B | 1,024 B | 2.4% |
| Megabyte | 1,000,000 B | 1,048,576 B | 4.9% |
| Gigabyte | 1,000,000,000 B | 1,073,741,824 B | 7.4% |
| Terabyte | 1,000,000,000,000 B | 1,099,511,627,776 B | 10.0% |
| Petabyte | 10^15 B | 2^50 B | 12.6% |