KB and kB refer to kilobyte - a unit of information or computer storage equal to either 1,024 bytes (2^{10}) or 1,000 bytes (10^{3}), depending on context.
MB refers to megabyte - a unit of information or computer storage equal to either 1,048,576 bytes (2^{20}) or 1,000,000 bytes (10^{6}), depending on context. A megabyte has approximately 1,000 (or 1,024 to be precise) kilobytes.
Difference between kB and kb, MB and Mb
kb is kilobits and kB is kilobytes. While MB is megabytes, Mb refers to Megabits. 1 byte has 8 bits. File sizes are usually expressed in KB and MB whereas kb and Mb are often used to express data transfer speeds (such as a 54 Mbps wireless router or 3G or 4G connection speeds).
All units of information volume
A bit is the smallest unit of information. It is either a 0 or 1. A byte is the next smallest unit, and is equal to 8 bits. All other units of information are derived from bits and bytes, and represent a certain number of bits (or bytes).
Each unit contains a prefix and suffix. The suffix denotes whether the unit is representing bits or bytes; the prefix denotes how many bits/bytes are being conveyed. There are two types of prefixes:
- Kilo-, mega-, giga-, tera-, peta-: these are the prefixes most widely used. They denote aggregations in units of 1,000.
- Kilo- is 1000^{1}
- Mega- is 1000^{2} i.e., 1 million
- Giga- is 1000^{3} i.e., 1 billion
- Tera- is 1000^{4} i.e., 1 trillion
- Peta- is 1000^{5} i.e., 1 quadrillion
- Kibi-, mebi-, gibi-, tebi-, pebi-:these prefixes denote aggregations in units of 1024. Since computing uses a binary system, the totals for units of storage are always in powers of 2. 1024 is 2^{10}.
- Kibi- is 1024^{1}
- Mebi- is 1024^{2}
- Gibi- is 1024^{3}
- Tebi- is 1024^{4}
- Pebi- is 1024^{5}
Applying this pattern we can see that
Unit | Base | Power | Value |
---|---|---|---|
Kilobit (Kb or kb) | 1000 | 1 | 1000 bits |
Megabit (Mb) | 1000 | 2 | 1000^{2} bits; or 1000 kilobits |
Gigabit (Gb) | 1000 | 3 | 1000^{3} bits; or 1000 megabits |
Terabit (Tb) | 1000 | 4 | 1000^{4} bits; or 1000 gigabits |
Kilobyte (KB or kB) | 1000 | 1 | 1000 bytes |
Megabyte (MB) | 1000 | 2 | 1000^{2} bytes; or 1000 kilobytes |
Gigabyte (GB) | 1000 | 3 | 1000^{3} bytes; or 1000 megabytes |
Terabyte (TB) | 1000 | 4 | 1000^{4} bytes; or 1000 gigabytes |
Kibibyte (KiB) | 1024 | 1 | 1024 bytes |
Mebibyte (MiB) | 1024 | 2 | 1024^{2} bytes; or 1024 kibibytes |
Gibibyte (GiB) | 1024 | 3 | 1024^{3} bytes; or 1024 mebibytes |
Tebibyte (TiB) | 1024 | 4 | 1024^{4} bytes; or 1024 gibibytes |
Kbps vs. Mbps and Other Data Rate Units
Data rate units are represented as information per second. For example, Kilobits per second uses the symbol kbps, kbit/s or kb/s; Kilobytes per second is written as kB/s and Mbps stands for Megabit per second.
The notation follows this convention:
- Use lower-case b for bits and upper-case B for bytes. e.g. MB/s is megabyte per second and Mbps is megabit per second.
- K stands for kilo and may be used in upper or lower case. M stands for mega, G for giga, T for tera. So 1 Gbps is 1 gigabit per second. These units are aggregated in multiples of 1000.
- Ki stands for kibi, so KiB/s is kibibytes per second while Kib/s or Kibit/s is kibibit per second. Similarly Mi stands for Mebi, Gi for Gibi, and Ti for Tebi. The units are aggregated in powers of 2, specifically 2^{10}.
Symbol | Name | bit per second |
---|---|---|
bit/s | bit per second | 1 |
B/s | byte per second | 8 |
kbit/s | kilobit per second | 1,000 |
Kibit/s | kibibit per second | 1,024 |
kB/s | kilobyte per second | 8,000 |
KiB/s | kibibyte per second | 8,192 |
Mbit/s | megabit per second | 1,000,000 |
Mibit/s | mebibit per second | 1,048,576 |
MB/s | megabyte per second | 8,000,000 |
MiB/s | mebibyte per second | 8,388,608 |
Gbit/s | gigabit per second | 1,000,000,000 |
Gibit/s | gibibit per second | 1,073,741,824 |
GB/s | gigabyte per second | 8,000,000,000 |
GiB/s | gibibyte per second | 8,589,934,592 |
Tbit/s | terabit per second | 1,000,000,000,000 |
Tibit/s | tebibit per second | 1,099,511,627,776 |
TB/s | terabyte per second | 8,000,000,000,000 |
TiB/s | tebibyte per second | 8,796,093,022,208 |
Comments: KB vs MB