Data Size Converter

Convert between bits, bytes, KB, MB, GB, TB with binary and decimal modes

Bit
8388608
Byte
1048576
Kilobyte
1024
Gigabyte
0.0009765625
Terabyte
9.536743164e-7
Petabyte
9.313225746e-10

What "1 TB" means depends entirely on who said it. Drive packaging, mobile data plans and cloud storage bills all step by 1000; the capacity your operating system reports, memory specifications and most programming languages step by 1024. Both conventions use the very same abbreviations, and the gap compounds with every step until it approaches 10% at the terabyte mark. This converter puts bits, bytes and KB through PB on one table, with a button beside the input that switches between the two systems. The base unit is the bit, so the eight-fold trap of turning megabits per second into megabytes per second is covered as well. No connection is involved and the figures you enter stay in this tab — the page around them, as everywhere on this site, still loads third-party resources such as ads.

How to use it

  1. Type a number into the Value field, which starts at 1.
  2. The From unit dropdown holds seven entries: Bit, Byte, KB, MB, GB, TB and PB. It defaults to **MB** rather than to the smallest unit, which sets it apart from the other five converters here.
  3. The button to the right of the dropdown switches number systems. **It is labelled with the mode you are currently in**: reading "Binary (1024)" means you are stepping by 1024 right now, which is the default, and pressing it switches you to "Decimal (1000)".
  4. Six cards below give every other unit, each with a copy button. Switching systems keeps both the value and the source unit; only the cards recalculate.
  5. To check which mode you are in, enter 1, choose MB and look at the Byte card: 1048576 means binary, 1000000 means decimal.

When it comes in handy

Work out real capacity before buying a drive or a phone

The 256 GB on the box is 256,000,000,000 bytes, which an operating system stepping by 1024 reports as 238.4185791 GB; a 2 TB drive shows up as 1.818989404 TB. Subtract the file system and any preinstalled software and the gap widens further. Far better to know before you decide whether the larger model is worth it.

Check whether a file fits a limit

Gmail caps attachments at 25 MB, FAT32 stops just short of 4 GB per file (4294967296 bytes minus one), and messaging apps, upload forms and CDNs each set their own ceiling. Convert your file size into whatever unit the limit is quoted in and you will know whether to compress or share a link instead.

Translate a connection speed into download speed

A "300M" plan means 300,000,000 bits per second. In decimal mode, enter 300000000 and select Bit: the MB card reads 37.5, so 37.5 MB per second in theory. Switch to binary and the same input becomes 35.76278687 MB. Download managers usually show the latter, so "why does my 300M line only reach 35" is a unit mismatch rather than a swindle.

Size storage and estimate cost

At roughly 2 KB per log line and ten million lines a day, you have 2×10⁷ KB, which is 19.07348633 GB in binary. Cloud storage, however, bills in decimal GB, so the same data appears on the invoice as 20.48 GB. Scale that to terabytes and the 7% discrepancy becomes real money.

Limits and behavior

  • The base unit is the **bit**, and a byte is always eight of them. Those two entries are defined identically in both systems, so a bit-to-byte conversion is unaffected by the toggle; everything from KB upwards is what changes.
  • **The toggle applies to both sides of the conversion at once.** In either mode, 1 TB converts to either 1000 or 1024 GB and never to 931, because both ends of any single conversion always sit in the same system. Crossing between them takes two steps — see the FAQ below.
  • Both modes share one set of names, so switching to 1024 does not rewrite KB as KiB. IEC 60027-2 defined KiB, MiB and GiB back in 1998 precisely to end this confusion, but industry uptake has been thin; the Linux ecosystem is the main place it stuck, which is what ls -lh and du -h report. If you are putting a figure into a document, spell out which convention you used so the next reader does not have to guess.
  • Extreme values switch to scientific notation. One petabyte in bits shows as 9.007199e+15 in binary or 8.000000e+15 in decimal, because both exceed 10¹⁵; going the other way, one bit in petabytes shows as 1.110223e-16, because it falls below 10⁻¹⁰. That is a display threshold, not an overflow.
  • The table stops at PB — no exabytes, zettabytes or yottabytes — and at the bit, with no nibble or word. For exabyte-scale figures, divide by 1024 or 1000 yourself and enter the result as PB.
  • Everything here is a unit of **capacity**; there are no rate units. Mbps, MB/s and Gbps all carry a per-second dimension that this table cannot represent, though you can convert the quantity part and keep the time dimension in your head.
  • This is not a disk usage calculator. Real occupancy depends on the file system's allocation unit — commonly 4 KB — so a 100-byte file still consumes a whole 4 KB block. Compression, deduplication, snapshots and sparse files all pull file size and disk usage apart, and none of that is something arithmetic can predict.
  • The input takes digits only, so a string such as 1.5GB is dropped whole — pick the unit from the dropdown and give the field the bare number. Group separators behave differently: rather than refuse them, the browser strips whatever it cannot use. Strip the commas from an English-formatted figure and the value survives intact. Do the same to a continental European one, where the dot groups and the comma is the decimal mark, and the surviving dot is read as a decimal point — the figure lands orders of magnitude too small, with nothing on screen to say so.

Frequently asked questions

Why does a 1 TB drive show up as 931 GB, and how do I reproduce that number here?

The manufacturer sold you a decimal terabyte — 1,000,000,000,000 bytes — while Windows Explorer divides by 1024 at each step and still labels the result GB. Run that through and you get 931.3225746. This tool cannot do it in one shot, because the toggle changes the system on both ends simultaneously, so a single conversion never crosses systems. Two steps will: **first** switch to decimal, enter 1 with TB selected, and note the Byte card reading 1000000000000; **second** switch to binary, enter 1000000000000 with Byte selected, and the GB card reads 931.3225746. The same method checks any drive: a 500 GB label corresponds to 465.6612873, and 2 TB to 1862.645149 GB.

Why did my result turn into 9.007199e+15?

Because it crossed the 10¹⁵ threshold at which the display switches to scientific notation. One petabyte in binary is 8 × 1024⁵ = 9,007,199,254,740,992 bits, just over the line; in decimal it is 8 × 10¹⁵ and prints as 8.000000e+15. There is a matching threshold at the small end, so anything below 10⁻¹⁰ gets the same treatment — one bit in petabytes is 1.110223e-16. Nothing is lost; the number simply has too many digits to read as a plain string.

Why does binary mode not say KiB and MiB?

Because the two unit arrays in the code share a single set of names and differ only in their multipliers. Strictly, the 1024-based set should be kibibytes, mebibytes and gibibytes — the standard IEC 60027-2 laid down in 1998 for exactly this confusion. Twenty-odd years on, Windows, most hardware specifications and everyday speech still write GB, and relabelling the dropdown as GiB would mostly leave people unable to find the unit they came for. The practical rule: GiB is unambiguously 1024, whereas GB always requires you to ask who wrote it.

My 300M line only downloads at 35 MB/s. Am I being short-changed?

No — two conversions are stacked on top of each other. The first is the factor of eight between bits and bytes: 300M means 300,000,000 bits per second, which is 37,500,000 bytes per second. The second is the number system: download managers usually display in 1024 steps, and 37,500,000 divided by 1048576 is 35.76278687 MB/s. That is the theoretical ceiling before anything else is deducted — TCP/IP headers, the far server's bandwidth and real Wi-Fi throughput all take their share. A useful shortcut: divide Mbps by eight for MB/s, then knock off about 5% to match what the progress bar says.

Why do Windows and macOS report different sizes for the same drive?

They follow different conventions. Windows divides by 1024 but labels the result GB or TB, so a 1 TB drive appears as 931 GB in Explorer. macOS has counted in 1000s since Snow Leopard (10.6), so the same drive reads 1 TB in About This Mac, matching the box. Linux depends on the tool: du -h and ls -lh default to 1024 and only switch to 1000 with --si. The drive has not changed size; three systems are simply describing one byte count three ways.

Why does the unit default to MB rather than Bit?

A deliberate choice: everyday questions start around the megabyte — attachment limits, photos, installers, video clips — so starting there means the fewest changes. The other five converters on this site all default to their own base unit (metre, kilogram, Celsius, square metre, second), which makes this the one place where the default is not the base unit, the bit. If you do want to start from bits, select it once; the dropdown will not spring back to MB.

My calculated data volume does not match actual disk usage. Did the conversion go wrong?

The conversion is fine; file size and disk usage are simply different quantities. File systems allocate space in fixed blocks — 4 KB by default on both NTFS and ext4 — so a 100-byte config file really occupies 4 KB, and ten thousand small files add up to a noticeable discrepancy. The reverse happens too: compressed file systems, deduplication, sparse files, snapshots and hard links all make disk usage smaller than the sum of file sizes. Add metadata, journals and reserved space (ext4 keeps 5% for root by default) and pure arithmetic only ever gives you a lower bound. Budget 10–20% above it.