Byte Conversion Calculator
Convert a data size between bytes, kilobytes, megabytes, and gigabytes.
Supports 26 decimal, bit, and binary units with bidirectional conversion.
Updated August 13, 2026
Introduction / overview
Byte Conversion Calculator converts any data size between bytes, kilobytes, megabytes, gigabytes, and the rest of the digital-information units — 26 in total. Every field is editable: type a value into any one of them and all the others update at once, so you never have to work out the factor yourself.
The last field, “Value in other multiples of the byte,” holds the full list: decimal multiples (kB, MB, GB, TB…), bit units (kbit, Mbit, Gbit…), and binary multiples (KiB, MiB, GiB…). That is where you reach for when your figure is in terabytes, megabits, or gibibytes.
It is the tool to use when you are estimating how many photos fit on a card, comparing a file size you saw in a download manager with your storage, or double-checking a number in a log, spec sheet, or network report. Conversions are exact — the calculator never rounds a result to make it fit.
How to use / quick start
Type the size you know into any field
Put the number in the field whose unit matches what you have — for example 2 in Value in gigabytes. A plain number works; the fields accept comma-grouped input such as 2,000,000,000 too.
Read the equivalent values
The other fields fill in automatically, so the same size appears in bytes, kilobytes, and megabytes at the same time. You can keep the number and pick whichever unit you need for your answer.
Switch the last field to a binary unit when you need one
By default the “other multiples” field reads in terabytes. If your result should be in KiB, MiB, or GiB, choose that unit from the field’s unit list — the value re-reads in binary multiples, which is what most operating systems report for files and drives.
Example — convert 2 GB into megabytes, kilobytes, and bytes
Type in the Value in gigabytes field. Because these are decimal multiples, each smaller unit is exactly one thousandth of the one above it:
The calculator shows the same figure as 2,000,000,000 bytes, 2,000,000 kilobytes, and 2,000 megabytes. To read it in binary units instead, switch the last field to GiB — it then reports about 1.86 GiB, because a gigabyte and a gibibyte are not the same size (more on that below).
Calculation method
Every unit in this calculator is defined by how many bytes it contains — call that factor . To convert, the value is first carried to bytes, then divided by the target unit’s factor. Because every factor is an exact integer (or an exact eighth for bit units), the conversion never introduces rounding.
The decimal multiples are powers of one thousand:
The binary multiples are powers of two, named with an “i” in the prefix:
Bit units follow the same prefixes but start from the bit, and one byte holds exactly 8 bits. That makes a kilobit = , and a kibibit = .
Variables
- — the numeric value in the source unit
- — the numeric value in the target unit
- — bytes per source unit
- — bytes per target unit
- — the size carried through to bytes
Every field is a valid starting point. Enter a value in the kilobytes field and the others re-derive from it, so the conversion runs equally well in either direction.
Decimal vs. binary units
The single most common reason people reach for this tool is the gap between decimal and binary multiples. Storage and network gear is normally rated in decimal units — — while memory and most operating systems report file sizes in binary units — . The two diverge more with every step up the scale, which is why the numbers never quite match.
Why a “500 GB” drive shows about 465 GB
A drive sold as 500 GB holds 500 billion bytes. When the operating system divides that by (gibibytes) but keeps the “GB” label, the result looks like a shortfall:
Nothing is missing — the drive has the advertised byte count. It is just being measured with a different ruler. This calculator shows both numbers side by side: enter 500 in the gigabytes field, then read the “other multiples” field in both GB and GiB to see the difference yourself.
The decimal prefixes (kB, MB, GB, TB) are the standard SI prefixes for one thousand. The binary prefixes (KiB, MiB, GiB, TiB) were adopted by the IEC so that -based sizes could be named unambiguously; the NIST reference on binary prefixes lists both systems side by side, including the byte-to-bit relationship.
Choose decimal for storage and network specs
Hard drives, SSDs, memory cards, cloud storage plans, and bandwidth/throughput figures are almost always quoted in decimal units (GB, TB, Gbit/s). Use kB, MB, GB, TB to match those numbers directly.
Choose binary for memory and much OS reporting
RAM sizes and the file sizes shown by most operating systems and file managers use binary multiples (KiB, MiB, GiB) even when the label only says “KB” or “GB.” Pick KiB/MiB/GiB when you want your result to line up with what your system displays.
Bits are for rates, bytes for sizes
Network speeds are quoted in bits per second (Mbit/s, Gbit/s), while files and storage are sized in bytes. Because , a connection moves at most in file terms.
If you are starting from a piece of text and want its exact size in bytes first, the text statistics tool reports the UTF-8 byte length of any text — paste the result here and convert it into whatever unit you need.
Frequently asked questions
What is the difference between kB and KiB?
One kilobyte is exactly bytes, while one kibibyte is exactly bytes — about 2.4% more. The gap grows with each prefix: a megabyte is bytes but a mebibyte is bytes, and so on. The “other multiples” field in this calculator includes both so you can compare them directly.
Why does my 500 GB drive only show about 465 GB?
The drive genuinely holds 500 billion bytes. Manufacturers quote capacity in decimal gigabytes ( bytes), while the operating system divides by (gibibytes) and keeps the “GB” label — so 500 GB comes out as roughly 465.66 GiB. It is a units mismatch, not missing storage.
How many bytes is a megabyte — and how do bits fit in?
A decimal megabyte is bytes and a binary mebibyte is bytes. Bits are the smaller unit: one byte holds exactly bits, so a megabit is bytes. This calculator covers both bytes and bits, including the binary bit units (Kibit, Mibit, Gibit, Tibit).
Limitations
This calculator accepts non-negative numbers only; a negative size shows a “Data size cannot be negative.” message and is not converted. The conversion itself is exact — every unit factor is a precise value, so no rounding is introduced by the math. What the tool cannot do is guess which system you mean: decimal (kB, MB, GB) and binary (KiB, MiB, GiB) are different sizes, so check the unit you are reading before relying on the number. For the same reason, quoted storage and network figures should always be treated in the unit they were advertised in.
Related Calculators
Scale Calculator
Calculate scale factors and convert scaled or real dimensions for length, area, and volume.
Text statistics
Get information about a text: character count, word count, line count, and its size in bytes (UTF-8). Runs locally in your browser.
Roman Numeral Converter
Convert an Arabic number up to 3,999,999 into Roman numerals or read a Roman numeral back into a number. Both directions run in your browser.
Fraction to Percent Calculator
Convert fractions to percentages and vice versa instantly
Grams to Tablespoons Converter
Convert grams to tablespoons for any ingredient instantly. Perfect for cooking and baking with support for multiple ingredients.
Decimal to Percent Converter
Convert decimal numbers to percentages with real-time bidirectional conversion