Byte Conversion Formula

This might be confusing for some people converting bytes for storage media etc.

Here are the basics:

1 byte = 8 bits
1 kilobyte (K / Kb) = 2^10 bytes = 1,024 bytes
1 megabyte (M / MB) = 2^20 bytes = 1,048,576 bytes
1 gigabyte (G / GB) = 2^30 bytes = 1,073,741,824 bytes
1 terabyte (T / TB) = 2^40 bytes = 1,099,511,627,776 bytes
1 petabyte (P / PB) = 2^50 bytes = 1,125,899,906,842,624 bytes
1 exabyte (E / EB) = 2^60 bytes = 1,152,921,504,606,846,976 bytes

So the formula for conversion are:
X KB = NumberOfBytes/1024
X MB = NumberOfBytes/1048576 OR X MB = NumberOfBytes/1024/1024