Skip to content
FlipConverto home

Data Size Converter

A data size converter for bytes, KB, MB, GB and TB — decimal and binary (KiB, MiB, GiB), bits included — that also shows what a drive will look like in Windows or macOS, how long a transfer takes, and the Excel and terminal commands for the same conversion.

Loading Data Size Converter…

Runs entirely in your browser. What you enter stays on your device — nothing is sent to a server. Verify it yourself

How do you convert MB to GB?

Divide by 1,000: 500 MB is 0.5 GB, the way drive makers, macOS and Android count. Windows divides by 1,024 instead (strictly MiB to GiB), so a 500,000,000-byte file shows there as 477 MB, or 0.466 GB. Pick decimal or binary units in the converter to see both.

Cost
Free, no limits
Upload
None — runs on your device
Sign-up
Not required
Works offline
Yes, once loaded

How to convert data sizes

  1. Choose what to work out

    Convert a size, see what a drive shows, time a transfer, or get the Excel and terminal formula.

  2. Enter the number and pick the units

    Decimal (kB, MB, GB) and binary (KiB, MiB, GiB) units are listed separately, with bits below.

  3. Read the result in every unit

    The result shows the bytes and the same amount in every common unit, decimal and binary side by side.

Examples

  • 1 GB1,000 MB · 953.67 MiB

    Decimal and binary differ by about 4.9% at mega-scale.

  • 1 TB drive931 GB in Windows · 1 TB in macOS

    Same bytes, counted in 1,024s or 1,000s.

  • 1 GB at 100 Mbps1 min 20 s

    100 Mbps is 12.5 MB/s.

  • 100 Mbps for 1 hour45 GB

    Rate × time ÷ 8.

  • Bytes → GB in Excel=A1/1000^3 or =A1/1024^3

    Decimal GB, or the GB Windows shows.

Key features of the Data Size Converter

  • Bytes and bits from kilo to quetta (decimal) and kibi to quebi (binary), including robi and quebi from IEC 80000-13:2025
  • The same amount in every unit at once, decimal and binary side by side
  • What a drive of any size shows in Windows, macOS and iOS, Android and Linux df -h
  • Transfer time for any size and speed, with an optional allowance for network overhead
  • Data rate × time to file size — for streams, calls and data allowances
  • Excel, Google Sheets, macOS and Linux terminal and JavaScript formulas for any conversion

Units it converts

Decimal bytes (SI)

  • B
  • kB
  • MB
  • GB
  • TB
  • PB
  • EB
  • ZB
  • YB
  • RB
  • QB

Binary bytes (IEC)

  • KiB
  • MiB
  • GiB
  • TiB
  • PiB
  • EiB
  • ZiB
  • YiB
  • RiB
  • QiB

Bits

  • bit
  • kbit … Qbit
  • Kibit … Qibit

Speeds

  • kbps
  • Mbps
  • Gbps
  • kB/s
  • MB/s
  • GB/s
  • MiB/s

When should you use this?

  • Understanding why a new drive or phone shows less than the label.
  • Turning a broadband speed in Mbps into download time or MB/s.
  • Working out how much data an hour of streaming or a video call uses.
  • Converting a column of byte counts in Excel, or reading ls and df output.

Limitations

  • Transfer times are best cases; real downloads share the line with other traffic and devices.
  • The OS readings are the arithmetic each system uses; usable space after formatting is a little lower.
  • Excel’s custom number formats only scale by 1,000; binary units need a formula.

Troubleshooting

My new drive shows less than advertised

Use the Drive size tab: the gap is decimal vs binary counting plus formatting, not missing space.

My download is eight times slower than my plan

Plans are in megabits per second; download meters usually show megabytes per second. Divide the plan speed by 8.

ls -lh and Finder disagree on a file size

ls -lh counts in 1,024s and Finder in 1,000s. Both are right; check ls -l for the exact bytes.

Common mistakes to avoid

  • Comparing a speed in megabits (Mb) with a file size in megabytes (MB) without dividing by 8.
  • Treating a GB in Windows and a GB on the box as the same unit — they differ by 7.4%.
  • Using du -H for decimal units on Linux; for du it means follow links. Use --si.
  • Writing KB for both 1,000 and 1,024 bytes in the same document.

Pro tips

Tips for better results

  • Speeds

    Divide Mbps by 8 for MB/s

    Divide a speed in Mbps by 8 for MB/s: 100 Mbps is 12.5 MB/s.

  • Working method

    Write the unit beside every number

    Write the unit beside every number, with B for bytes and b or bit for bits.

  • Windows

    Windows’ GB is 1,024³ bytes

    For Windows’ “GB”, divide bytes by 1,024³; for the box’s GB, by 10⁹.

  • Linux

    Add --si for the units on the box

    On Linux, add --si to ls, df or du for the decimal units on the box.

Standards and terms behind the Data Size Converter

The named things this tool works with, and the documents that define them.

IEC binary prefixesSpecification
KiB, MiB and GiB, which are powers of 1024, as against the decimal KB, MB and GB, which are powers of 1000.
SI unitsSpecification
The international system of units, maintained by the BIPM, which fixes the metre, kilogram, second and kelvin. Reference: SI units

Also searched as: mb to gb, mib vs mb, bytes to megabytes, why is my drive smaller than advertised.

Two ways to count: 1,000 and 1,024

In the International System of Units a kilo is 1,000, a mega 1,000,000 and so on. The SI Brochure is explicit: SI prefixes “refer strictly to powers of 10. They should not be used to indicate powers of 2 (for example, one kilobit represents 1000 bits and not 1024 bits).” Computers, though, count memory in powers of two, so for decades “kilobyte” also meant 1,024 bytes. To end the ambiguity the International Electrotechnical Commission approved separate binary prefixes in December 1998 — kibi (Ki), mebi (Mi), gibi (Gi) and so on, each 1,024 times the last — and the 2025 edition of IEC 80000-13 extended them to robi (Ri, 2⁹⁰) and quebi (Qi, 2¹⁰⁰).

Decimal (SI)BytesBinary (IEC)BytesBinary is bigger by
kilobyte (kB)1,000kibibyte (KiB)1,0242.4%
megabyte (MB)1,000,000mebibyte (MiB)1,048,5764.9%
gigabyte (GB)10⁹gibibyte (GiB)1,073,741,8247.4%
terabyte (TB)10¹²tebibyte (TiB)2⁴⁰10.0%
petabyte (PB)10¹⁵pebibyte (PiB)2⁵⁰12.6%
exabyte (EB)10¹⁸exbibyte (EiB)2⁶⁰15.3%
zettabyte (ZB)10²¹zebibyte (ZiB)2⁷⁰18.1%
yottabyte (YB)10²⁴yobibyte (YiB)2⁸⁰20.9%
ronnabyte (RB)10²⁷robibyte (RiB)2⁹⁰23.8%
quettabyte (QB)10³⁰quebibyte (QiB)2¹⁰⁰26.8%

The old habit hasn’t gone. JEDEC, the semiconductor standards body, still defines kilo, mega and giga as 1,024-based “as a prefix to units of semiconductor storage capacity”, noting the definitions are “included only to reflect common usage” — which is why a “16 GB” memory module holds 16 GiB. Ronna and quetta, the decimal prefixes for 10²⁷ and 10³⁰, were added to the SI in 2022, partly, the resolution says, for “the needs of data science”.

Why a 1 TB drive shows as 931 GB

Drive makers count in decimal. Western Digital’s capacity notice reads: “one gigabyte (GB) is equal to 1,000MB (one billion bytes), and one terabyte (TB) is equal to 1,000GB (one trillion bytes)”; Samsung cites the IDEMA standard for the same definition. Windows counts the same bytes in 1,024s but keeps the KB, MB, GB and TB labels — Seagate’s support article lists “FDISK, system BIOS, Windows, and older versions of macOS” as using the binary system, and a Microsoft engineer’s blog explains that Explorer “continues to use the abbreviation KB” for 1,024 bytes “just following existing practice”.

On the boxBytesWindows showsmacOS shows
128 GB128,000,000,000119 GB128 GB
500 GB500,000,000,000465 GB500 GB
1 TB1,000,000,000,000931 GB1 TB
2 TB2,000,000,000,0001.81 TB2 TB
4 TB4,000,000,000,0003.63 TB4 TB

Nothing is missing: both columns are the same bytes. Apple says its systems used binary units only up to “iOS 10 and earlier and OS X Leopard and earlier”; since then macOS and iOS count like the box. Android’s size formatter has used decimal units since Android 8. On Linux it depends on the command — df -h counts in 1,024s, df -H in 1,000s. The space you can actually use is a little less again, after formatting and the operating system, as every maker’s small print notes.

Counting explains a gap of about 7% at gigabyte scale and 9% at terabyte scale — and only that. On Super User, where “931 GB” turns up in dozens of questions, the accepted answer to one explains why a typical “500 GB” drive holds exactly 500,107,862,016 bytes: the IDEMA standard sets the sector count, which works out to 1,000,204,886,016 bytes for 1 TB. A freshly formatted 1 TB NTFS drive in another Super User question showed just 118 MiB used, so claims that file systems take “5% or so” are far off. If half a drive is missing — “1 TB shows 465 GB” — the cause is a partition, a second volume or a faulty drive, not the units; the “Is anything really missing?” box in the Drive size tab tells the two apart. Consoles count the same way: a Reddit post on the Nintendo Switch 2 found 249 of its 256 GB available to the user — which the console displays as 232 “GB”, really 232 GiB.

Some common answers online are simply wrong: a 1 TB drive is not “really 750 GB”, the binary system is base 2, not “base 8”, and iPhones have not counted in binary since iOS 11.

The difference has reached court. In 2006 Western Digital settled a US class action that alleged its 80 GB drive held 74.4 GB, by offering buyers free backup software and promising a clearer disclaimer, the Associated Press reported; in 2007 Seagate offered a 5% cash refund or free backup software to settle a similar case, according to The Register.

Bits, bytes and Mbps

A byte is 8 bits. Storage is sold in bytes (B); connections are sold in bits per second (bit/s, or Mbps for megabits). The US FCC’s broadband guide, for example, lists download speeds in “Megabits per second, or Mbps”. So a 100 Mbps connection moves at most 12.5 megabytes a second, and a 1 Gbps line 125 MB/s. Speeds use decimal prefixes — JEDEC’s own dictionary gives “a 1-kb/s data transfer rate, which is equal to 1000 bits per second”.

LinkRated speedIn bytes
USB 2.0480 Mbps60 MB/s
USB 5Gbps / 10Gbps / 20Gbps5 / 10 / 20 Gbps625 / 1,250 / 2,500 MB/s
USB4 (80 Gbps cables)up to 80 Gbps10 GB/s
Thunderbolt 580 Gbps, up to 120 Gbps with Bandwidth Boost10–15 GB/s
SATA III6 Gb/s600 MB/s after 8b/10b encoding
PCIe 6.0 x1664 GT/s per laneup to 256 GB/s

Rated speeds are line rates, not what files move at. SATA-IO says plainly that “not all 600MB/s are realized as the user data payload because the protocol includes other data and handshaking”. On a network, the headers TCP, IP and Ethernet add to every standard 1,500-byte packet leave about 95% of the line rate for data (1,460 of 1,538 bytes, by our arithmetic); the converter’s “network overhead” box uses that figure. Converter sites that knock off 10% or quote “60–80%” give no source.

Mixing the two is the most common question of all. “Why is my actual download speed less than that found by speedtest.net?” has been viewed more than 200,000 times on Super User; the answer is that the speed test reports bits and the download meter bytes. Steam, browsers and most download managers show MB/s, so a 600 Mbps plan should show about 75 MB/s at best — not the 60 that a “divide by 10” rule of thumb gives. Two other caps turn up again and again on r/HomeNetworking: a computer or cable that links at only 100 Mbps, which tops out around 11–12 MB/s however fast the plan, and a Wi-Fi “link rate” that is far above the real throughput.

How long will a download take?

Time = size × 8 ÷ speed in bits per second. A 1 GB file at 100 Mbps takes 80 seconds at best; a 50 GB game at 500 Mbps takes 13 minutes 20 seconds. In August 2026 Ookla’s Speedtest Global Index put the world’s median fixed broadband download speed at 129.68 Mbps and mobile at 109.05 Mbps, so a 1 GB file is about a minute on a median home connection. Real downloads usually take longer than the arithmetic: the server, Wi-Fi and everything else on the line share the speed.

Data transfer rate to file size

Run the sum the other way — size = rate × time ÷ 8 — and a bitrate becomes a file size or a data allowance. One hour at 100 Mbps is 45 GB. Services publish the figures:

  • Netflix: up to 1 GB an hour in standard definition, up to 3 GB in HD and up to 7 GB in 4K, which needs 15 Mbps or more.
  • YouTube recommends 5 Mbps for 1080p and 20 Mbps for 4K — about 2.25 GB and 9 GB an hour at those rates.
  • Spotify’s Very high quality is about 320 kbit/s, roughly 144 MB an hour; Normal, at 96 kbit/s, about 43 MB.
  • Zoom uses about 1.2 Mbps each way for a one-to-one 720p call; Microsoft says Teams can deliver HD video in under 1.5 Mbps.

Converting data sizes in Excel and Google Sheets

Divide by the factor: =A1/1024^3 turns bytes into GiB (what Windows calls GB) and =A1/10^9 into decimal GB. Excel’s CONVERT function knows both — =CONVERT(A1,"byte","Gbyte") and =CONVERT(A1,"byte","Gibyte") — but its unit names are case-sensitive and kibi is written with a lowercase “ki”. To keep bytes in the cell and only display a larger unit, use a custom number format: Microsoft explains that “a comma that follows a digit placeholder scales the number by 1,000”, so 0.00,,," GB" shows bytes as decimal gigabytes. Commas only divide by 1,000, so the binary units need a formula. Google Sheets scales by commas the same way. The “Formulas” tab writes the formula for any pair.

Beware the most-copied answer. The accepted Stack Overflow answer to “How can I format bytes a cell in Excel as KB, MB, GB etc?” — over 250,000 views — uses exactly these commas, so it divides by 1,000, not 1,024, and its thresholds label 600,000 bytes as “1 MB”. If the bytes come in as text with units (“10GB 102MB”), convert each part to bytes first, then add.

File sizes in the terminal: ls on a Mac and on Linux

On a Mac, ls -l lists sizes in bytes and ls -lh adds B, K, M and G suffixes — “using base 2 for sizes”, as Apple’s ls manual puts it. So a file Finder reports as 1 MB shows as about 977K in ls -lh: Finder counts in 1,000s. For kilobytes, divide the byte count by 1,024 to match ls, or by 1,000 to match Finder; du -sk gives a folder’s size in 1,024-byte units, and stat -f%z file the exact bytes.

GNU coreutils on Linux works the same way by default: -h uses powers of 1024 and --si powers of 1000. A size letter on its own or with “iB” means 1,024s and one followed by “B” means 1,000s, so --block-size=K and --block-size=KB differ by 2.4%. df and du round up, which is why a 1 TB drive shows as 932G in df -h. One trap: df -H means --si, but du -H means something else entirely (follow symbolic links), so use du --si. To sort the human-readable output, use sort -h; to turn a byte count into K, M and G, numfmt --to=iec (or --to=si).

When df, du and Finder disagree about free space it is rarely the units. Answers on Ask Ubuntu and Unix & Linux Stack Exchange trace it to deleted files that a program still holds open, and on a Mac to local Time Machine snapshots and “purgeable” space that Finder counts as free.

Formatting sizes in code

“Correct way to convert size in bytes to KB, MB, GB in JavaScript” has over 600,000 views on Stack Overflow, and the bugs repeat across languages: dividing by 1,024 but writing “KB” or “Kb” (which means kilobits), and rounding that prints “1000.0 kB” instead of moving up to “1.0 MB” — the flaw the author of Stack Overflow’s most-copied Java answer reported in his own snippet in 2019. Pick one base, label it KiB or kB to match, and switch units before rounding. JavaScript’s Intl.NumberFormat can label kilobytes and gigabytes but does not convert, and its list of units has no kibibytes.

Which unit to use

Write decimal units (kB, MB, GB) for storage, downloads and anything a reader will compare with a box or a price list, and binary units (KiB, MiB, GiB) for memory and anywhere powers of two matter. Write the symbol beside every number, keep B for bytes and bit (or b) for bits, and the 7% gap at giga-scale stops being a surprise. For the common pairs there are pages for KB to MB, MB to GB, GB to MB, KB to GB, GB to TB and bytes to GB.

For a sense of scale, IDC expects its “Global DataSphere” to surpass 700 zettabytes by 2030.

Privacy

The Data Size Converter runs entirely in your browser. What you enter and the result it produces stay on your own device — nothing is sent anywhere, because nothing needs to be.

You can confirm this rather than take our word for it: open your browser’s developer tools, watch the Network tab, and use the tool. No request carries your input. It also keeps working with the connection off.

Details are in the privacy policy.

What next?

The practical way to get a file under a size limit.

Compress an image

Data Size Converter — questions

How many MB are in a GB?

1,000 in decimal units, which drive makers, macOS, iOS and Android use. Windows counts 1,024 MB to the GB — strictly 1,024 MiB to the GiB — which is why the same file can look about 7% smaller there.

Is a kilobyte 1,000 or 1,024 bytes?

Officially 1,000: the SI says its prefixes refer strictly to powers of 10. 1,024 bytes is a kibibyte (KiB). Windows and JEDEC memory specs still use “KB” for 1,024 bytes, so check the context.

Why does my 1 TB drive show as 931 GB?

The maker counts 1,000,000,000,000 bytes as 1 TB; Windows divides by 1,024 three times and keeps the GB label, giving 931. It is the same number of bytes. macOS shows the same drive as 1 TB.

How many MB/s is 100 Mbps?

12.5 MB/s at most: divide megabits by 8 to get megabytes. In practice a little less reaches you — about 95% of the line rate carries data over TCP and Ethernet.

How long does it take to download 1 GB?

Size × 8 ÷ speed: 80 seconds at 100 Mbps, 16 seconds at 500 Mbps and 8 seconds at 1 Gbps, at best. Use the Transfer time tab for any size and speed.

How do I convert bytes to GB in Excel?

=A1/1024^3 for the GB Windows shows (GiB), or =A1/10^9 for decimal GB. Excel’s CONVERT also works: =CONVERT(A1,"byte","Gbyte"), or "Gibyte" for binary.

How do I see file sizes in KB on a Mac?

ls -lh shows sizes with K, M and G suffixes in powers of 1024. ls -l shows bytes: divide by 1,024 to match ls, or by 1,000 to match Finder, which counts in decimal.

What is bigger than a yottabyte?

The ronnabyte (10²⁷ bytes) and quettabyte (10³⁰), added to the SI in 2022. Their binary partners, robibyte and quebibyte, were added to IEC 80000-13 in 2025. “Brontobyte” and “geopbyte” are not official units.

How much data does Netflix use?

Up to 1 GB an hour in standard definition, up to 3 GB in HD and up to 7 GB in 4K, according to Netflix’s help centre.

Sources

Part of Unit Converters · Browse every tool