Cookies for analytics and advertising
We use cookies for analytics and advertising, both sent to Google. Refusing changes nothing you can see.Read the privacy page
1 B = 1e-9 GB
A byte count becomes gigabytes by moving the decimal point nine places: 5,368,709,120 bytes is 5.36870912 GB. The awkward part is that a file manager may call that same number 5 GB, because it divided by 1,024 three times and kept the label — so this page is mostly about knowing which gigabyte you are reading.
5000000 B is 0.005 GB
— a photograph from a phone.
1024 B is 0.000001024 GB
— a kibibyte, which is where the confusion starts.
64000000000 B is 64 GB
— a modest phone.
1000000000000 B is 1000 GB
— a drive sold as one terabyte.
| B | GB |
|---|---|
| 1000000 | 0.001 |
| 2000000 | 0.002 |
| 5000000 | 0.005 |
| 10000000 | 0.01 |
| 50000000 | 0.05 |
| 100000000 | 0.1 |
| 500000000 | 0.5 |
| 1000000000 | 1 |
Convert B to GB
A byte is eight bits, though that was not always fixed — early machines used six, seven or nine. The eight-bit byte won because it holds one character of text and divides neatly in half.
A gigabyte is a billion bytes in the decimal sense used by drive manufacturers, phone plans and video sizes.
Going from bytes to gigabytes moves the decimal point 9 places to the left and changes nothing else. There is no factor to remember and no rounding to decide: the digits stay in the same order and only their position changes.
1,234 B is 0.000001234 GB — same digits, moved along. That is worth knowing because it is the one kind of conversion you can check at a glance: if the digits of the answer are not the digits you started with, something other than the conversion has happened to them.
Exact byte counts come from the tools that refuse to round: stat and ls -l, a Content-Length header, the size column in an object store, a database asked how large a table is, a log line recording an upload. None of them are trying to be readable. They report the number the filesystem actually holds, which is why the figure runs to ten or eleven digits and why nobody can read it at a glance.
That exactness is the reason to start from it rather than from a friendlier figure. The byte count is the file; every other rendering of the size is a rounded translation of this number, and the translations disagree with each other. Converting from bytes puts you upstream of the disagreement, and it means the answer you get is a decision you made rather than one a file manager made for you.
The gigabyte on this page is 1,000,000,000 bytes, so the conversion is a decimal point moved nine places to the left. This is the ordinary SI meaning of the prefix — the same giga as in gigahertz and gigawatt, where nobody has ever suggested it might mean 1,073,741,824. Storage manufacturers, network operators, phone plans and cloud billing all use it, and so does the box above.
The competing convention divides by 1,024 three times, giving 1,073,741,824 bytes, and the correct name for that unit is the gibibyte. It is about 7.4% larger, so the same byte count produces two answers that differ by roughly a fourteenth: 5,000,000,000 bytes is 5 GB decimal and 4.66 GiB binary. Neither figure is wrong. What is wrong, and common, is printing the second number and calling it GB.
The manufacturer shipped 1,000,000,000,000 bytes, which is exactly one terabyte in the decimal system the box uses. Windows takes that byte count, divides by 1,024 for kilobytes, again for megabytes, again for gigabytes, arrives at 931.32, and writes GB after it. The bytes are all there. The two numbers are the same quantity under two names, and the shortfall people go looking for does not exist.
The reason this reads as a scandal rather than a units problem is that nothing on screen says which system it is using. macOS changed to the decimal convention in 2009, so the identical drive plugged into a Mac reports close to 1,000 GB, and a user who has seen both assumes one machine is lying. Linux tools are usually the most honest of the three: ls -lh and du -h divide by 1,024 but many of them label the result GiB or a bare G, and --si switches them to powers of ten.
Two ceilings turn up often enough in this range to be worth recognising by sight. A signed 32-bit integer tops out at 2,147,483,647, so anything that stores a size or an offset that way fails at about 2.15 GB — old upload endpoints, legacy archive formats and a long tail of tools written before large files were ordinary. The failure is rarely a clear message; more often a size wraps to a negative number or a transfer stops.
The second is 4,294,967,295 bytes, one byte short of 4 GiB, which is the largest file FAT32 can hold. That is the filesystem on most USB sticks and camera cards as they are sold, and it is why a 4.7 GB DVD image will not copy onto a 64 GB stick that has plenty of room. When a byte count sits near either ceiling, the exact figure matters and the rounded gigabyte figure actively hides the problem.
A gigabyte is about an hour of standard-definition video, or two hundred photographs at the size a phone produces them. A single-layer DVD holds 4.7 GB, which is a decimal figure — divided the other way it is 4.38 GiB, which is why disc-burning software so often reports that a 4.7 GB image will not fit on a 4.7 GB disc. A single-layer Blu-ray at 25 GB is about 23.3 GiB by the same arithmetic.
The scale is worth holding on to because each step is a factor of a thousand and people habitually underestimate it. A thousand megabytes to the gigabyte, a thousand gigabytes to the terabyte. A byte count in the low billions is a film or a virtual machine image; one in the low millions is a photograph, and the difference between them on screen is three digits that are easy to miscount.
Before dividing, it is worth knowing which byte count you have. Filesystems allocate storage in whole blocks — commonly 4,096 bytes — so a file containing 100 bytes still consumes a full block. stat and ls -l report the logical length; du reports what is allocated. For one file the difference is invisible; for a source tree or a mail store with hundreds of thousands of small files it runs to gigabytes.
Two further cases push the numbers apart in the opposite direction. A sparse file reports a length far larger than it occupies, because the runs of zeros were never written; and a filesystem that compresses or deduplicates, or one that made a copy-on-write clone rather than a real copy, will show two files whose lengths add up to more than the space they take. In each case the gigabyte figure is honest and the question is which byte count deserved converting.
Group the digits in threes from the right and count the groups. The digits to the left of the last three groups are the whole gigabytes, and the first group after them is the first three decimals: 12,884,901,888 becomes 12.884 GB, and 987,654,321 becomes 0.987 GB. Nine digits chopped off the right is the entire operation, which is the practical advantage of the decimal system over the binary one.
To check an answer against something a Windows machine displayed, take about 7% off the decimal figure — 12.88 GB is roughly 12.0 in the units that machine is using. At terabyte scale the same adjustment is about 9%, because the gap widens with every step up the ladder: 2.4% at kilo, 4.9% at mega, 7.4% at giga, 10% at tera.
One thousand million — 1,000,000,000 — which is what this page uses and what a drive manufacturer, a phone plan and a video bitrate all mean. The other answer in circulation is 1,073,741,824, which is 2^30 and is properly called a gibibyte. Both numbers are correct for their own unit; the mistake is using one number under the other name.
Because the drive holds 1,000,000,000,000 bytes and Windows divided that by 1,024 three times, which gives 931.32, then printed GB next to it. Nothing was lost and no space is missing — the box counted in powers of ten and the operating system counted in powers of two. The same drive on a Mac reads close to 1,000 GB.
By 1,000,000,000 if the answer is going to be compared against a drive capacity, a data allowance, a cloud bill or a download size, because all of those are decimal. By 1,073,741,824 if you are trying to reproduce a figure Windows or a memory tool showed you — but then the honest label for the result is GiB, not GB.
5.36870912 GB decimal, and exactly 5 GiB in the binary sense. That number is a good one to keep in mind because it is the point where the two systems visibly disagree: a tool showing "5 GB" for it is using the binary unit, and a tool showing 5.37 is using the decimal one.
Bytes throughout, eight bits each. The distinction matters because network speeds are quoted in bits: a gigabyte is eight gigabits, so a 1 Gbit/s link moves at most 125 MB per second. Reading a bit figure as a byte figure overstates the quantity eightfold, and reading it the other way leaves an eighth of it; the capital B is the only thing separating them in writing.
Usually because one is reporting the file’s length and the other the space it occupies. Storage is handed out in whole blocks, so a file of 100 bytes takes a full block on disk. Across a few hundred thousand small files that gap runs to gigabytes, which is why a folder total and the sum of its file sizes rarely agree.
One GB is 1000000000 B. It is the same relationship read backwards, so an answer from one page put through the other has to come back to where it started.
The claims this page makes about data units are checkable, and these are the documents that settle them.
The factor is a constant in the page and the arithmetic is four operations, so nothing is sent anywhere and nothing needs to be. The number you type never leaves the browser — there is no request for it to travel in.