File Size Converter
Convert any storage unit to every other one at once, with both the decimal (SI) and binary (IEC) standards side by side so you can see exactly where the “missing” gigabytes went.
Photo by Benjamin Lehman on Unsplash
File size unit converter
| Unit | Value | Definition |
|---|
Key takeaways
- A kilobyte is 1,000 bytes and a kibibyte is 1,024; the gap grows to 10% by the terabyte scale.
- Lowercase b is bits and uppercase B is bytes, which is why a 100 Mbps line downloads at about 12.5 MB/s.
- Drive capacity is quoted in decimal units while Windows reports binary ones, which fully explains a “1 TB” disk showing 931 GB.
Why 1 GB is not always 1 GB
There are two competing definitions of every storage prefix, and the gap between them widens with every step up the scale.
Decimal (SI) prefixes follow the metric system: kilo means exactly 1,000. This is what drive manufacturers, network engineers and the International System of Units use. A 1 TB drive holds 1,000,000,000,000 bytes.
Binary (IEC) prefixes follow powers of two, because memory addressing is binary: a kibibyte (KiB) is 210 = 1,024 bytes. The IEC standardised these names in 1998 precisely to end the ambiguity.
| Scale | SI | IEC | Difference |
|---|---|---|---|
| Kilo | 1,000 | 1,024 | 2.4% |
| Mega | 1,000,000 | 1,048,576 | 4.9% |
| Giga | 109 | 1,073,741,824 | 7.4% |
| Tera | 1012 | 1,099,511,627,776 | 10.0% |
| Peta | 1015 | 1,125,899,906,842,624 | 12.6% |
This is the entire explanation for the “missing” space on a new drive. A 2 TB disk really does contain two trillion bytes; Windows divides by 1,024 three times, calls the result GB, and reports 1,862. Nothing was lost. macOS and most Linux distributions switched to decimal reporting years ago, which is why the same disk shows a different number on each operating system.
Bits versus bytes
A bit is one binary digit. A byte is eight bits and is the smallest individually addressable unit of memory on essentially every modern machine. The abbreviations differ only by capitalisation, which causes endless confusion:
- b (lowercase) = bit, used for transfer rates
- B (uppercase) = byte, used for storage
So a 100 Mbps connection delivers 100 megabits per second, which is 12.5 megabytes per second at best. Marketing departments quote the larger number; your download manager shows the smaller one. Neither is lying.
Real throughput is lower still because of protocol overhead. TCP/IP headers, TLS records and HTTP framing typically consume 3–10% of a link, so treat the transfer estimate above as a theoretical floor on time, not a promise.
Reference points that make the numbers concrete
| Item | Typical size |
|---|---|
| One ASCII character | 1 byte |
| One emoji in UTF-8 | 4 bytes |
| A tweet at 280 characters | ~280 bytes |
| A page of plain text | ~2 KB |
| A favicon | ~5 KB |
| Optimised hero image (WebP) | 60–150 KB |
| Median web page transfer | ~2.3 MB |
| Three-minute MP3 at 192 kbps | ~4.3 MB |
| 12-megapixel phone photo (JPEG) | 3–6 MB |
| One hour of 1080p streaming | ~3 GB |
| Dual-layer Blu-ray | 50 GB |
Front-end performance budgets are set in these units. Google’s Core Web Vitals thresholds are timing-based, but the practical lever is transfer size: every 100 KB removed from a page is roughly 8 ms saved on a 100 Mbps link and far more on mobile. Our CSS and JS minifier reports exactly how many bytes a build step saves.
Formatting sizes in code
// Binary (IEC) formatting — what most file managers show
function formatBytes(bytes, decimals = 2) {
if (bytes === 0) return '0 B';
const k = 1024;
const units = ['B', 'KiB', 'MiB', 'GiB', 'TiB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return (bytes / k ** i).toFixed(decimals) + ' ' + units[i];
}
// Decimal (SI) formatting — what drive vendors use
new Intl.NumberFormat('en', {
notation: 'compact', style: 'unit', unit: 'byte', unitDisplay: 'narrow'
}).format(1500000); // '1.5MB'Pick one convention per product and label it. Mixing SI prefixes with binary maths — calling 1,024 bytes a “kB” — is the root cause of most size-reporting bugs.
Frequently Asked Questions
How many bytes are in a megabyte?
1,000,000 using the SI definition, or 1,048,576 using the binary definition properly called a mebibyte (MiB). Storage vendors and networks use the first; Windows file sizes use the second while still writing “MB”.
Why does my 1 TB drive show as 931 GB?
The drive holds 1012 bytes. Windows divides by 1,024 three times, which gives 931.32, and labels the result GB. No space is missing — it is a labelling difference of about 10%.
What is the difference between Mb and MB?
Mb is megabits and MB is megabytes; one byte is eight bits. A 100 Mbps connection tops out around 12.5 MB/s of actual file transfer.
What are KiB, MiB and GiB?
IEC binary prefixes standardised in 1998: kibibyte, mebibyte and gibibyte, equal to 1,024, 1,0242 and 1,0243 bytes. They exist so that “kilobyte” can unambiguously mean 1,000 bytes.
How long will a file take to download?
Multiply the size in bytes by eight to get bits, then divide by the connection speed in bits per second. The calculator shows this for a 100 Mbps link; add 5–10% for protocol overhead.
Is a kilobyte 1000 or 1024 bytes?
Strictly 1,000. The 1,024 value belongs to the kibibyte. In practice both meanings circulate, so state which one you mean whenever precision matters.
Sources & further reading
- BIPM: SI prefixes — the official decimal prefix definitions
- NIST: Prefixes for binary multiples — the reference explanation of KiB, MiB and GiB
- HTTP Archive: Page Weight — current median transfer sizes for real web pages
- MDN: Intl.NumberFormat — locale-aware byte formatting in JavaScript