A decimal label against a binary count

Disk labels and download sizes are decimal, while file managers, kernels and many programming interfaces count in kibibytes, which are blocks of 1,024 bytes. This page converts the first into the second, and answers a question such as how many KiB a 4.7 GB disc image fills. The answer is 4,589,843.75. The result is exact for any input, because 1,000,000,000 divided by 1,024 is 976,562.5 with no repeating digits. The page converts units only. It does not model cluster sizes, compression or the extra space a file occupies on disk.

Where 976,562.5 comes from

The kibibyte was named by the IEC in 1998 as 2^10 bytes, 1,024. A decimal gigabyte is 10^9 bytes, which equals 10^9 / 2^10 KiB. Because 10^9 = 2^9 × 5^9, dividing by 2^10 leaves 5^9 / 2, which is 1,953,125 / 2 = 976,562.5. The trailing half shows that a gigabyte does not divide evenly into kibibytes, since one KiB has a factor of 2^10 and the gigabyte has only 2^9 in it. That fact explains why every whole-number GB input gives a result ending in .5 when the number of GB is odd.

The default 10 GB in KiB

The default of 10 GB gives 9,765,625 KiB. That number equals 5^10 and has no fractional part, since 10 × 976,562.5 is 9,765,625. A different input, such as 1 GB, gives 976,562.5 KiB, and the half is real. If you round to 976,563 for a report, the error is about 0.00005 percent. It is not a concern in practice, but a byte-exact calculation should keep the half or work in bytes. Having both the whole and the half-case in mind avoids surprise when a decimal tail appears.

Disc images and archives

A 4.7 GB DVD image is 4,589,843.75 KiB, and a 1.5 GB archive is 1,464,843.75 KiB. A 0.25 GB firmware package comes to 244,140.625 KiB. Many tools express sizes in KiB, such as package managers and download utilities that report kibibytes, so the figure you read in a log is the one to compare with these numbers. A tool that says it downloaded 244,141 KiB of a 0.25 GB package has finished the file, within rounding. The converted count helps confirm that a transfer is complete. For a download manager that prints progress in KiB, divide the printed total by the expected figure from this page. A ratio of 1.000 means the sizes agree, and a ratio of 1.024 means one side counted in kB while the other counted in KiB.

Memory pages and block sizes

The kibibyte is the natural unit of operating system memory. A typical page is 4 KiB, which is 4,096 bytes, and disks commonly use 4 KiB sectors or clusters. A 1 GB decimal buffer is 976,562.5 KiB, which equals 244,140.625 pages of 4 KiB, so the buffer does not fill whole pages exactly and an allocator rounds up to 244,141. Converting a capacity to KiB shows how many blocks a file system needs. A 1.5 GB file takes 366,211 clusters of 4 KiB, rounded up from 366,210.9375. The same logic applies to the 64 KiB buffers that some tools use for copying. A 1 GB file needs 15,259 of them, since 976,562.5 divided by 64 is 15,258.79. Knowing the KiB count lets you estimate how many read or write calls a program will make, and so how sensitive a transfer is to per-call overhead.

From KiB back to GB

Select KiB as the source and GB as the target to multiply by 1.024 and divide by 1,000,000, which the page does in one step. A file listed as 5,000,000 KiB is 5.12 GB, and one of 8,000,000 KiB is 8.192 GB. The result is larger than the KiB figure divided by a million because each KiB holds 24 more bytes than a kB. When a system log prints sizes in KiB and you need a decimal figure for a report or a quota check, this is the direction to use.

The 2.4 percent difference

A kibibyte is 2.4 percent larger than a kilobyte, so a count in KiB is 2.4 percent smaller than the same data counted in kB. For 1 GB, that is 976,562.5 KiB against 1,000,000 kB. The gap is small enough that people ignore it for small files and large enough to matter for exact accounting. The percentage grows at higher prefixes. For a quota that is enforced in KiB but described in GB, an allowance of 100 GB is 97,656,250 KiB, and a user who copies exactly that many decimal bytes has used all of it.

Notation in file managers

Some file managers label values with KB while counting in 1,024s, and others use KiB and say so. A file of 1,000,000 bytes appears as 977 KB in the first and as 976.6 KiB in the second, and the same file is 1,000 kB with SI labels. A 1.2 GB download is 1,171,875 KiB in the binary count and 1,200,000 kB in the decimal count. Choose the label that matches the system you document, and when you present a number, give the unit exactly as its source defines it. This page puts the factor in the formula line, so the convention you read is the convention applied. When two people report the same folder and one says 977 and the other 1,000, ask whether each used 1,024 or 1,000 bytes per unit before assuming that either of them made an arithmetic mistake. The converted figures on this page let you reconcile the two.

Precision and checks

Check the conversion against a known anchor: 1,048,576 bytes is 1,024 KiB, and 1 GB must equal 976,562.5 KiB. Typing 0.001 GB should give 976.5625 KiB, and 0.002 GB gives 1,953.125. Keep the digits when the next step is a byte-level calculation. When you present the figure to others, rounding to whole KiB is normal for large values. A report listing 4,589,844 KiB for a 4.7 GB disc image is fine, provided the rounding is stated. A last check works through bytes. 4,589,843.75 KiB times 1,024 gives 4,700,000,000 bytes, which is the 4.7 GB you started with, so the round trip closes. If a conversion of your own does not close that way, one of the entries used the wrong convention.