File Size Calculator

Convert file sizes between Bytes, KB, MB, GB, and TB.

Bytes1,024
KB1
MB0.000977
GB0.000001
TB0
Bits8,192

About File Size Converter

Enter one figure, pick the unit it is already in, and read every equivalent off the table below it. Rather than asking you to choose a from-unit and a to-unit, the calculator converts your input to a byte count and then expresses that same count six ways at once, recalculating as you type.

Binary prefixes, and the missing-space question

Every step on this page is a factor of 1024, not 1000. That choice matters because the computing world never fully agreed on one. Memory has always been counted in powers of two, because address lines come in powers of two. Storage manufacturers count in powers of ten, because a byte is a byte and the SI prefixes are theirs to use. Operating systems then report the decimal-sized drive using binary prefixes, and the result is the perennial complaint that a new 1 TB disk shows 931 GB. Both numbers describe exactly the same trillion bytes. The gap is about 2.4% at the kilobyte and compounds to roughly 10% by the terabyte.

The standards bodies did try to fix this by introducing kibibyte, mebibyte and gibibyte for the binary quantities, leaving kilobyte to mean exactly a thousand. In practice almost nobody adopted the new names, so what you see labelled KB, MB and GB here are the binary quantities that your file manager also calls KB, MB and GB.

Why there is a bits row

Because the eightfold difference between a bit and a byte quietly ruins more estimates than any prefix confusion. Bandwidth is sold in bits per second and files are measured in bytes, so a 100 Mbps connection does not move 100 MB in a second — it moves about 12.5 MB before you account for protocol overhead. Converting a file size into bits before dividing by a quoted line speed is the quickest way to get a realistic transfer time.

Where precision runs out

The arithmetic uses ordinary JavaScript numbers, which hold integers exactly up to 2 to the 53. That ceiling corresponds to roughly 8192 TB of bytes, and to about 1024 TB in the bits row because of the extra multiplication. Below those thresholds every byte count shown is exact. Above them the result is the nearest representable value rather than the true one, so this is not the right tool for reconciling block counts on a petabyte array.

What it does not calculate

There is no petabyte or exabyte row, no decimal-prefix column, no transfer-time field and no compression estimate. It also cannot tell you the size of a file on your machine — it converts a number you already know. Note too that a file's size and the space it occupies on disk are different things: a filesystem allocates whole blocks, so a 10-byte file typically consumes 4 KB. Everything here is arithmetic done in your browser, with nothing uploaded and nothing stored.

Every Unit At Once

One value in, six rows out — bytes, kilobytes, megabytes, gigabytes, terabytes and bits, all recalculated on each keystroke. No unit pairing to choose and no convert button to press.

Enter In Whatever You Have

Set the dropdown to the unit your source used. A size read off a download page in MB and a size read off a disk report in GB both land on the same table of equivalents.

Bits As Well As Bytes

The last row multiplies by eight, which is the row you want when a network figure is quoted in megabits and a file figure in megabytes — the eightfold gap between them causes more bad transfer estimates than anything else.

Frequently Asked Questions

Is this base-2 or base-10?

Base-2 throughout. Each step is a factor of 1024, so a kilobyte is 1024 bytes and a gigabyte is 1,073,741,824 bytes. There is no decimal column: the tool commits to the binary convention rather than showing both and leaving you to work out which applies. That is the convention Windows, macOS and Linux all use when reporting how much space a file occupies.

Why does my 1 TB drive show up as 931 GB?

Because two different definitions are in play. The manufacturer sold you a trillion bytes — a terabyte in the decimal sense, which is a legitimate use of the SI prefix. Your operating system then divides by 1024 four times and reports 931. Nothing is missing and nothing is faulty; the same bytes are being described with a different prefix convention. Enter 931 GB here and you will get back roughly the trillion bytes the box promised.

How large a number can it handle before it stops being exact?

Byte counts stay exactly representable up to about 8192 TB, which is where JavaScript numbers run out of integer precision at 2 to the 53. Beyond that the byte figure starts rounding to the nearest representable value. The bits row multiplies by a further eight, so it becomes inexact eight times sooner, at around 1024 TB. For any everyday size this is irrelevant, but do not use the tool to reconcile exact block counts at petabyte scale.

What is the difference between the Bits row and the Bytes row?

A factor of eight, and it is the single most common source of wrong download estimates. Network speeds are quoted in bits per second — a 100 Mbps line moves at most about 12.5 MB per second. File sizes are quoted in bytes. Dividing a file size in megabytes by a connection speed in megabits without converting will make you eight times too optimistic.

Why does the value show as 0 when I clear the box?

An empty field is read as zero rather than as no input, so every row collapses to zero. Type any digit and the table repopulates. Negative numbers are accepted too and convert normally, since the tool does arithmetic rather than validation.

How many decimal places are shown?

The kilobyte through terabyte rows show up to six decimal places, which keeps a small file legible when expressed in gigabytes. The bytes and bits rows show up to three, because fractional bytes rarely mean anything. All rows use your locale’s own digit grouping, so the thousands separator matches what the rest of your system displays.

Can I copy a result?

There are no copy buttons — select the number and use your usual copy shortcut. Because the values are plain text rather than form fields, selection also works with a triple-click on the row.

Do I need to be online?

Only to load the page. The conversion table is a handful of powers of two built into the JavaScript, so once the tab is open the tool keeps working with the network disconnected, and no size you type is ever transmitted.