Byte to Megabyte Converter
Convert bytes to megabytes with our free online data storage converter.
Quick Answer
1 Byte = 0.000001 megabytes
Formula: Byte × conversion factor = Megabyte
Use the calculator below for instant, accurate conversions.
Our Accuracy Guarantee
All conversion formulas on UnitsConverter.io have been verified against NIST (National Institute of Standards and Technology) guidelines and international SI standards. Our calculations are accurate to 10 decimal places for standard conversions and use arbitrary precision arithmetic for astronomical units.
Byte to Megabyte Calculator
How to Use the Byte to Megabyte Calculator:
- Enter the value you want to convert in the 'From' field (Byte).
- The converted value in Megabyte will appear automatically in the 'To' field.
- Use the dropdown menus to select different units within the Data Storage category.
- Click the swap button (⇌) to reverse the conversion direction.
How to Convert Byte to Megabyte: Step-by-Step Guide
Converting Byte to Megabyte involves multiplying the value by a specific conversion factor, as shown in the formula below.
Formula:
1 Byte = 1.0000e-6 megabytesExample Calculation:
Convert 1024 bytes: 1024 × 1.0000e-6 = 0.001024 megabytes
Disclaimer: For Reference Only
These conversion results are provided for informational purposes only. While we strive for accuracy, we make no guarantees regarding the precision of these results, especially for conversions involving extremely large or small numbers which may be subject to the inherent limitations of standard computer floating-point arithmetic.
Not for professional use. Results should be verified before use in any critical application. View our Terms of Service for more information.
Need to convert to other data storage units?
View all Data Storage conversions →What is a Byte and a Megabyte?
What is a Byte?
A byte is a unit of digital information consisting of exactly 8 bits (binary digits), where each bit can be either 0 or 1. The byte is the smallest addressable unit of memory in modern computer architectures, meaning it's the fundamental building block that computers use to store and manipulate data.
Mathematical definition:
- 1 byte (B) = 8 bits (b)
- 1 byte can represent 2^8 = 256 distinct values (from 0 to 255 in unsigned representation, or -128 to +127 in signed representation)
Binary representation example:
- The byte value 65 (decimal) = 01000001 (binary) = 0x41 (hexadecimal) = ASCII character 'A'
- The byte value 255 (decimal) = 11111111 (binary) = 0xFF (hexadecimal) = maximum unsigned value
- The byte value 0 (decimal) = 00000000 (binary) = 0x00 (hexadecimal) = minimum value
Byte as the Universal Data Unit
The byte serves as the fundamental counting unit for digital information across all computing contexts:
Memory capacity:
- RAM: "16 GB of memory" = 16,000,000,000 bytes = 16 billion bytes
- SSD/HDD: "1 TB hard drive" = 1,000,000,000,000 bytes = 1 trillion bytes
File sizes:
- Text document: 50 KB = 50,000 bytes
- Digital photo: 8 MB = 8,000,000 bytes
- Video file: 2 GB = 2,000,000,000 bytes
Data transfer rates:
- Internet speed: "100 Mbps" = 100 megabits per second = 12.5 megabytes per second (divide by 8)
- USB 3.0 transfer: 5 Gbps = 625 MB/s = 625 million bytes per second
Important distinction:
- Byte (B) with uppercase 'B' = 8 bits
- bit (b) with lowercase 'b' = single binary digit
- 8 bits = 1 Byte, so 8 Mbps = 1 MB/s
Binary (Powers of 2) vs. Decimal (Powers of 10) Multiples
There are two different systems for byte multiples, causing widespread confusion:
Decimal prefixes (SI units, base-10):
- Used by storage manufacturers (hard drives, SSDs, USB drives)
- Based on powers of 1,000 (10³, 10⁶, 10⁹, etc.)
- 1 kilobyte (KB) = 1,000 bytes
- 1 megabyte (MB) = 1,000,000 bytes
- 1 gigabyte (GB) = 1,000,000,000 bytes
- 1 terabyte (TB) = 1,000,000,000,000 bytes
Binary prefixes (IEC units, base-2):
- Used by operating systems (Windows, macOS, Linux) for memory and file sizes
- Based on powers of 1,024 (2¹⁰, 2²⁰, 2³⁰, etc.)
- 1 kibibyte (KiB) = 1,024 bytes
- 1 mebibyte (MiB) = 1,048,576 bytes (1,024²)
- 1 gibibyte (GiB) = 1,073,741,824 bytes (1,024³)
- 1 tebibyte (TiB) = 1,099,511,627,776 bytes (1,024⁴)
The confusion:
- You buy a "1 TB" hard drive (1,000,000,000,000 bytes in decimal)
- Windows shows "931 GB" available (because it calculates 1,000,000,000,000 ÷ 1,024³ = 931.32 GiB, but displays it as "GB")
- You didn't lose 69 GB—it's just a difference in counting systems!
Difference grows at larger scales:
- 1 GB (decimal) vs. 1 GiB (binary): 7.4% difference (1,000,000,000 vs. 1,073,741,824)
- 1 TB (decimal) vs. 1 TiB (binary): 9.95% difference (1 trillion vs. 1.1 trillion)
Byte and Character Encoding
Historically, one byte = one character in ASCII encoding (American Standard Code for Information Interchange):
ASCII (7-bit, extended to 8-bit):
- Uses values 0-127 (originally 7 bits)
- Extended ASCII: 0-255 (full 8 bits)
- Examples: 'A' = 65, 'a' = 97, '0' = 48, space = 32, newline = 10
Modern Unicode (variable-length encoding):
-
UTF-8 (most common on the web): 1-4 bytes per character
- ASCII characters (English): 1 byte ('A' = 0x41)
- Latin extended, Greek, Cyrillic: 2 bytes ('é' = 0xC3 0xA9)
- Chinese, Japanese, Korean (CJK): 3 bytes ('中' = 0xE4 0xB8 0xAD)
- Emoji and rare symbols: 4 bytes ('😀' = 0xF0 0x9F 0x98 0x80)
-
UTF-16 (used internally by Windows, Java, JavaScript): 2-4 bytes per character
-
UTF-32 (fixed-width): exactly 4 bytes per character (wasteful but simple)
Practical impact:
- "Hello" in ASCII: 5 bytes
- "Hello" in UTF-8: 5 bytes (same as ASCII for English)
- "Привет" (Russian "hello") in UTF-8: 12 bytes (6 characters × 2 bytes)
- "你好" (Chinese "hello") in UTF-8: 6 bytes (2 characters × 3 bytes)
- "Hello😀" in UTF-8: 9 bytes (5 ASCII + 4 emoji)
Why 8 Bits?
The 8-bit byte became standard for several technical and practical reasons:
1. ASCII compatibility:
- ASCII uses 7 bits (128 characters: A-Z, a-z, 0-9, punctuation, control codes)
- 8th bit originally used for parity checking (error detection)
- Extended ASCII (8-bit) accommodated 256 characters including accented letters, symbols
2. Hexadecimal convenience:
- 8 bits = 2 hexadecimal digits (each hex digit = 4 bits)
- Easy mental conversion: 0xFF = 11111111 = 255
- Simplified debugging and memory addresses
3. Power-of-2 scaling:
- 256 values (2⁸) aligns with computer's binary nature
- Efficient for addressing and indexing (0-255 fits cleanly in registers)
4. Data type efficiency:
- Perfect for representing small integers (-128 to +127 signed, 0-255 unsigned)
- RGB color: 3 bytes = 16.7 million colors (256³)
- IP addresses (IPv4): 4 bytes = 4.3 billion addresses (256⁴)
5. Hardware implementation:
- 8-bit data buses and registers were cost-effective in 1960s
- Balanced between functionality and transistor count
A megabyte (MB) is a multiple of the unit byte for digital information. The International System of Units (SI) defines the prefix mega- (M) as 1,000,000 (106). Therefore, one megabyte is exactly 1,000,000 bytes (or 1000 kilobytes).
Similar to the kilobyte, the term "megabyte" has historically been used ambiguously in computing to represent 1,048,576 (220 or 10242) bytes. This binary usage correctly refers to a mebibyte (MiB), a unit defined by the International Electrotechnical Commission (IEC) to eliminate confusion.
Note: The Byte is part of the imperial/US customary system, primarily used in the US, UK, and Canada for everyday measurements. The Megabyte belongs to the imperial/US customary system.
History of the Byte and Megabyte
Pre-Byte Era: Variable Word Sizes (1940s-1950s)
Early digital computers had no standardized "byte"—each machine used its own word size (the natural unit of data):
ENIAC (1945): Operated on 10-digit decimal numbers (no binary bytes)
UNIVAC I (1951): 12-character words, each character 6 bits (72-bit words)
IBM 701 (1952): 36-bit words, 6-bit characters (no explicit byte concept)
Characteristics of this era:
- Character sizes varied: 5-bit (Baudot code), 6-bit (IBM BCD), 7-bit (ASCII draft)
- No byte portability: Data from one computer couldn't directly transfer to another
- Software non-portable: Programs written for 36-bit words wouldn't run on 48-bit machines
- Memory addressing: By word, not by character (inefficient for text processing)
Example problem: Storing the text "HELLO" (5 characters):
- 36-bit word machine with 6-bit chars: Packed into one word (6 chars max), wasting 6 bits
- 48-bit word machine with 6-bit chars: Could fit 8 chars per word
- No standard way to represent the same text across different computers
Birth of the Byte: IBM Stretch (1956-1959)
Werner Buchholz at IBM coined the term "byte" in 1956 during the design of the IBM 7030 Stretch supercomputer:
Original definition (1956):
- "Byte": A group of bits processed as a unit (size could be 1-6 bits)
- Etymology: Intentional misspelling of "bite" to avoid confusion with "bit"
- Variable-length design: Different instructions operated on different byte sizes
IBM Stretch (1961 delivery):
- 64-bit words with variable byte boundaries
- Supported 1-bit, 2-bit, 3-bit, 4-bit, 5-bit, and 6-bit bytes
- Byte addressing: Could address individual bytes within a word
- Revolutionary concept: Allowed character manipulation at sub-word level
Why variable length?
- Flexibility for different data types (Boolean: 1 bit, BCD digit: 4 bits, character: 6 bits)
- Efficient packing of diverse data
- But: Complex to program, hardware overhead for variable-length logic
Impact: The Stretch introduced byte-addressable memory (addressing individual character positions), setting the stage for modern byte-oriented architectures, but its variable-length bytes proved too complex for widespread adoption.
The 8-Bit Revolution: IBM System/360 (1964)
The IBM System/360 (announced April 7, 1964) standardized the 8-bit byte and changed computing forever:
Design goals of System/360:
- Compatibility: Single software should run on entire range of computers (small to large)
- Scalability: From business data processing to scientific computing
- Future-proof: Support growing character sets beyond 64 characters
Why IBM chose 8 bits:
1. Extended character set requirement:
- 6-bit allowed only 64 characters (A-Z, 0-9, limited punctuation)
- Business computing needed: uppercase, lowercase, accented letters, more symbols
- 8 bits = 256 characters (ample room for international characters)
2. ASCII alignment:
- ASCII (developed 1963, standardized 1968) used 7 bits (128 characters)
- 8th bit available for parity checking or future expansion
- Perfect fit for text processing
3. Hexadecimal simplicity:
- 8 bits = 2 hex digits (programmers loved this for debugging)
- Memory dumps easily readable: 0x41 = 'A', 0xFF = 255
4. Power-of-2 efficiency:
- 256 values aligned with binary nature of computers
- Efficient for addressing, indexing, and arithmetic
System/360 specifications (1964):
- Byte: Exactly 8 bits, addressable
- Halfword: 16 bits = 2 bytes
- Word: 32 bits = 4 bytes
- Doubleword: 64 bits = 8 bytes
- EBCDIC encoding: 8-bit character set (Extended Binary Coded Decimal Interchange Code), IBM's alternative to ASCII
Revolutionary impact:
- First time entire computer family used identical data format
- Software written for small System/360 ran on large System/360 (scalability)
- Industry followed IBM: 8-bit byte became de facto standard
- Byte-addressable memory became universal (instead of word-addressable)
Competing Standards and Consolidation (1965-1975)
Despite IBM's dominance, other architectures persisted temporarily:
Digital Equipment Corporation (DEC):
- PDP-6 (1964): 36-bit words, 6-bit or 9-bit bytes
- PDP-10 (1966): 36-bit words, supported variable byte sizes
- PDP-11 (1970): Adopted 8-bit bytes, 16-bit words—hugely successful, validated 8-bit standard
Control Data Corporation (CDC):
- CDC 6600 (1964): 60-bit words, no explicit bytes (6-bit or 10-bit character modes)
- Optimized for scientific computing, not commercial data processing
Burroughs, UNIVAC, Honeywell:
- Various word sizes (48-bit, 36-bit), gradually migrated to 8-bit byte compatibility in 1970s
Why 8-bit won:
- IBM market dominance: System/360 captured 70% of mainframe market by 1970
- Software portability: Businesses demanded compatibility with IBM
- ASCII adoption: U.S. government mandated ASCII (7-bit, extended to 8-bit) in 1968
- Microprocessor era: Intel 8008 (1972) and 8080 (1974) used 8-bit bytes, cementing standard
Microprocessor Era: 8-Bit Bytes Go Mainstream (1971-1985)
The advent of microprocessors embedded the 8-bit byte into consumer electronics:
Intel 4004 (1971): 4-bit microprocessor (nibble, half-byte)
Intel 8008 (1972): First 8-bit microprocessor
- 8-bit data bus, 8-bit registers
- Byte-addressable memory (16 KB max)
- Used in early terminals and control systems
Intel 8080 (1974): Improved 8-bit processor
- Powered Altair 8800 (1975), first personal computer kit
- CP/M operating system (1974) used 8-bit bytes for file systems
Zilog Z80 (1976): Enhanced 8080 clone
- Used in TRS-80, Sinclair ZX Spectrum, Game Boy
- Standardized 8-bit byte in consumer electronics
MOS Technology 6502 (1975): 8-bit processor
- Powered Apple II (1977), Commodore 64 (1982), NES (1983)
- Made 8-bit byte universal in home computing
Motorola 6800 (1974) and 68000 (1979):
- 8-bit and 16-bit processors with 8-bit byte addressing
- Used in early Macintosh, Atari ST, Sega Genesis
Impact:
- By 1980, 8-bit byte was universal in personal computers
- All programming languages (C, BASIC, Pascal) assumed 8-bit bytes
- File formats, disk storage, and memory all standardized on bytes
Formalization and Modern Era (1990s-Present)
IEC 60027-2 Standard (1993, revised 2000):
- International Electrotechnical Commission formally defined "octet" = exactly 8 bits
- Reserved "byte" for historical/ambiguous use, but "octet" never caught on colloquially
- Introduced binary prefixes: KiB, MiB, GiB, TiB (to distinguish from decimal KB, MB, GB, TB)
ISO/IEC 80000-13:2008:
- Reaffirmed 8-bit byte standard
- Clarified decimal vs. binary prefixes (kilo = 1000, kibi = 1024)
Modern developments:
- 64-bit computing (2000s): Processors still use 8-bit bytes, but operate on 64-bit words (8 bytes)
- Big data era (2010s): Petabytes (10¹⁵ bytes), exabytes (10¹⁸ bytes), zettabytes (10²¹ bytes)
- Cloud storage: Amazon S3, Google Cloud, Azure—all measure storage in bytes
- Data transfer protocols: HTTP, TCP/IP, USB, Ethernet—all byte-oriented
Current state (2020s):
- 8-bit byte is universal across all platforms (x86, ARM, RISC-V, etc.)
- Modern SSDs: 1-4 TB consumer drives (1-4 trillion bytes)
- RAM: 8-128 GB typical (8-128 billion bytes)
- Internet traffic: Exabytes per month globally (quintillions of bytes)
- No competing byte sizes—8 bits is permanent standard
The prefix 'mega-' (meaning million) was adopted as an SI prefix in 1960. As computer storage capacities grew beyond kilobytes in the 1970s and 1980s, megabyte became a common unit. However, because computer memory and architecture are often based on powers of two, 1024 * 1024 = 1,048,576 bytes became a convenient measure. This led to the widespread but conflicting use of "megabyte" for both 1,000,000 bytes (decimal) and 1,048,576 bytes (binary).
To address this ambiguity, the IEC introduced the binary prefixes (kibi-, mebi-, gibi-, etc.) in 1998. This standard designated MiB (mebibyte) specifically for 220 bytes and reaffirmed MB (megabyte) strictly for 106 bytes. Despite the standard, the dual usage persists, especially in marketing (using MB for 106) versus operating system reporting (often using MB ambiguously for 220, though sometimes correctly using MiB).
Common Uses and Applications: bytes vs megabytes
Explore the typical applications for both Byte (imperial/US) and Megabyte (imperial/US) to understand their common contexts.
Common Uses for bytes
1. Computer Memory (RAM)
Random Access Memory (RAM) capacity is measured in gigabytes:
Typical RAM sizes (2024):
- Smartphones: 4-12 GB RAM
- Budget phones: 4-6 GB
- Flagship phones: 8-16 GB (Samsung Galaxy S24: 12 GB)
- Laptops: 8-32 GB RAM
- Budget: 8 GB (sufficient for web browsing, office)
- Mid-range: 16 GB (recommended for multitasking)
- Performance: 32 GB (content creation, gaming)
- Desktops: 16-128 GB RAM
- Gaming: 16-32 GB
- Workstation (video editing, CAD): 64-128 GB
- Servers: 128 GB - 2 TB RAM
- Enterprise database servers: 512 GB - 1 TB common
Why RAM size matters:
- Each running program consumes RAM (bytes of memory)
- Modern OS reserves 2-4 GB just for itself
- Web browser: 500 MB - 2 GB (multiple tabs can use 8+ GB)
- Video editing (4K): Requires 32+ GB for smooth performance
- Insufficient RAM → slow performance (system swaps data to slower storage)
RAM speed (data transfer rate):
- DDR4-3200: Transfers 3,200 megatransfers/sec = ~25 GB/s (25 billion bytes/second)
- DDR5-4800: ~38 GB/s
- Faster RAM = more bytes moved per second = better performance
2. Storage Capacity (SSD, HDD, Cloud)
Solid State Drives (SSD):
- Laptop/desktop (2024): 512 GB - 2 TB typical
- 256 GB: Minimum for modern OS + applications
- 512 GB: Comfortable for most users
- 1 TB: Recommended for gaming, photography
- 2 TB+: Content creators, large media libraries
Hard Disk Drives (HDD):
- Desktop/NAS: 1-20 TB (cheaper per byte than SSD, but slower)
- Enterprise drives: Up to 24 TB (2024)
- Usage: Bulk storage (videos, backups, archives)
Cloud storage pricing (per byte cost):
- Google Drive: $1.99/month for 100 GB = ~$0.02 per GB per month
- Dropbox: $9.99/month for 2 TB = ~$0.005 per GB per month
- Amazon S3 (enterprise): $0.023 per GB per month (first 50 TB)
- Economies of scale: Cost per byte decreases massively at petabyte scale
Storage trends:
- SSD capacity doubling every ~2 years
- Price per GB declining: $0.10/GB (2024) vs. $1/GB (2010)
3. File Sizes and Formats
Text and documents:
- Plain text (.txt): ~1 byte per character (ASCII/UTF-8 for English)
- 10,000-word essay: ~60,000 characters = ~60 KB
- Microsoft Word (.docx): ~10-50 KB base + embedded images
- 50-page thesis with images: 5-20 MB
- PDF: Highly variable
- Text-only: ~20-50 KB per page
- With images: 100-500 KB per page
Images:
- JPEG (lossy compression): 5-15 bits per pixel compressed
- 12 MP photo: 4000×3000 = 12 million pixels = 5-10 MB typical
- PNG (lossless): Larger than JPEG, varies by complexity
- Screenshot (1920×1080): 200 KB - 2 MB
- GIF (animated): 256 colors max, 500 KB - 5 MB for short animations
- RAW (uncompressed camera): 20-50 MB per photo (professional photography)
Audio:
- MP3 (lossy): 128-320 kbps (kilobits per second)
- 128 kbps × 3 minutes = 128,000 bits/sec × 180 sec = 23,040,000 bits = 2.88 MB
- 320 kbps × 3 min = 7.2 MB
- AAC (Apple, similar to MP3): 128-256 kbps
- FLAC (lossless): 700-1,000 kbps = 20-30 MB for 3-minute song
- WAV (uncompressed, CD quality): 1,411 kbps = ~30 MB for 3 minutes
Video:
- 1080p (Full HD): 3-8 Mbps compressed (megabits per second) = 0.375-1 MB/s (megabytes)
- 2-hour movie: 3-8 GB
- 4K (2160p): 15-25 Mbps = 1.875-3.125 MB/s
- 2-hour movie: 15-25 GB
- 8K: 50-100+ Mbps = 6.25-12.5+ MB/s (rarely used yet)
4. Data Transfer Rates
Internet speeds (bits vs. bytes):
Important: Internet Service Providers (ISPs) advertise speeds in megabits per second (Mbps), not megabytes per second (MB/s).
Conversion: Divide Mbps by 8 to get MB/s
Common internet speeds:
- 25 Mbps (basic broadband): 25 ÷ 8 = 3.125 MB/s (3.125 million bytes/second)
- Downloads 1 GB file in: 1,000 MB ÷ 3.125 MB/s = ~320 seconds = 5 minutes
- 100 Mbps (standard cable/fiber): 100 ÷ 8 = 12.5 MB/s
- Downloads 1 GB in: ~80 seconds = 1.3 minutes
- 1 Gbps (gigabit fiber): 1,000 Mbps ÷ 8 = 125 MB/s
- Downloads 1 GB in: ~8 seconds
Upload speeds (often slower):
- Cable internet: 10-50 Mbps upload (1.25-6.25 MB/s)
- Fiber (symmetric): Upload = download speed
Physical media transfer rates:
- USB 2.0: 480 Mbps theoretical = 60 MB/s max (real-world: ~30 MB/s)
- USB 3.0 (3.2 Gen 1): 5 Gbps = 625 MB/s max (real-world: ~400 MB/s)
- USB 3.1 (3.2 Gen 2): 10 Gbps = 1,250 MB/s (1.25 GB/s)
- USB 4 / Thunderbolt 3: 40 Gbps = 5 GB/s
- SATA SSD: ~550 MB/s read/write
- NVMe SSD (PCIe 4.0): 7,000+ MB/s = 7 GB/s
Practical impact:
- Transferring 100 GB video project:
- USB 2.0: 100 GB ÷ 0.03 GB/s = ~3,333 seconds = 55 minutes
- USB 3.0: 100 GB ÷ 0.4 GB/s = ~250 seconds = 4 minutes
- NVMe SSD: 100 GB ÷ 7 GB/s = ~14 seconds
5. Image and Video Resolution
Image resolution (pixels × bytes per pixel):
RGB color image (24-bit color = 3 bytes per pixel):
- 1920×1080 (Full HD): 2,073,600 pixels × 3 bytes = 6.2 MB uncompressed
- JPEG compressed: 500 KB - 2 MB (compression ratio 3:1 to 12:1)
- 3840×2160 (4K): 8,294,400 pixels × 3 bytes = 24.9 MB uncompressed
- JPEG compressed: 2-8 MB
- 7680×4320 (8K): 33,177,600 pixels × 3 bytes = 99.5 MB uncompressed
Smartphone photo (12 MP = 4000×3000):
- Uncompressed: 12 million pixels × 3 bytes = 36 MB
- JPEG (compressed): 5-10 MB (compression ratio ~4:1)
Video bitrate (bytes per second):
- YouTube 1080p: ~8 Mbps = 1 MB/s
- 10-minute video: 1 MB/s × 600 sec = 600 MB
- Netflix 4K: ~25 Mbps = 3.125 MB/s
- 2-hour movie: 3.125 MB/s × 7,200 sec = 22.5 GB
Frame rate impact:
- 1080p @ 30 fps: ~5 Mbps
- 1080p @ 60 fps: ~8-10 Mbps (higher frame rate = more bytes)
6. Database and Big Data
Database sizes:
Relational databases (SQL):
- Small business (e-commerce): 10-100 GB
- Customer records, orders, inventory
- Enterprise CRM (Salesforce, SAP): 1-10 TB
- Millions of customer interactions
- Banking/finance: 10-100+ TB
- Transaction history, account data
NoSQL/Big Data:
- Social media (Facebook, Twitter): Petabytes
- User profiles, posts, relationships, media
- E-commerce (Amazon): Petabytes
- Product catalog, user behavior, recommendations
Data growth rates:
- Typical enterprise database: Grows 20-40% per year
- Social media: Can grow 1+ TB per day
Data types and byte consumption:
- Integer (32-bit): 4 bytes (range: -2 billion to +2 billion)
- Long integer (64-bit): 8 bytes
- Float (32-bit): 4 bytes (decimal numbers)
- Double (64-bit): 8 bytes (higher precision decimals)
- Timestamp: 8 bytes (date + time to microsecond)
- VARCHAR(255): Up to 255 bytes + 1-2 byte length prefix
Example: 1 million user records
- Each record: 500 bytes average (name, email, password hash, timestamps)
- Total: 1,000,000 × 500 bytes = 500 MB
- With indexes (for fast lookup): ×1.5-2 = 750 MB - 1 GB
7. Programming and Data Structures
Primitive data types (bytes in memory):
C/C++, Java, C#:
char: 1 byte (8-bit integer, or single character in ASCII)short: 2 bytes (16-bit integer: -32,768 to +32,767)int: 4 bytes (32-bit: -2.1 billion to +2.1 billion)long: 8 bytes (64-bit: huge range)float: 4 bytes (32-bit floating-point)double: 8 bytes (64-bit floating-point, more precision)bool: 1 byte (only needs 1 bit, but 7 bits wasted due to byte addressing)
Pointers/references:
- 32-bit system: Pointer = 4 bytes (can address 4 GB max)
- 64-bit system: Pointer = 8 bytes (can address 16 exabytes theoretically)
Data structures memory usage:
Array of 1,000 integers:
- 1,000 × 4 bytes = 4,000 bytes = 4 KB
String "Hello, World!":
- ASCII: 13 characters × 1 byte = 13 bytes (+ null terminator = 14 bytes in C)
- UTF-16 (Java, JavaScript): 13 × 2 bytes = 26 bytes
Linked list node (integer data + pointer):
- Data: 4 bytes (int)
- Next pointer: 8 bytes (64-bit system)
- Total: 12 bytes per node (+ overhead from memory allocator)
Object overhead (Java, Python):
- Empty Python object: ~16-24 bytes overhead (metadata, type info, reference count)
- Empty Java object: ~8-16 bytes overhead (object header)
- Impact: 1 million small objects can consume 100+ MB just in overhead
When to Use megabytes
The megabyte (MB), representing 1,000,000 bytes, is commonly used for:
- Measuring the size of medium-sized files (e.g., high-resolution images, MP3 audio files, short video clips, documents with embedded images).
- Quantifying the capacity of older storage media like floppy disks and CDs.
- Specifying the size of software downloads or application components.
- Used by storage device manufacturers (hard drives, SSDs, USB drives) to define capacity based on the decimal system (106 bytes).
- Measuring data transfer rates in megabytes per second (MB/s or MBps).
The informal use representing 1,048,576 bytes (correctly MiB) appeared frequently in:
- Quantifying computer RAM capacity (though MiB is the precise term).
- Reporting file sizes or disk space by many operating systems and software, leading to discrepancies with advertised storage capacities.
Additional Unit Information
About Byte (B)
How many bits are in a byte?
Exactly 8 bits = 1 byte by the modern standard definition.
Each bit is a binary digit (0 or 1), so 1 byte can represent 2^8 = 256 distinct values (from 0 to 255 in unsigned representation, or -128 to +127 in signed representation).
Historical context: Early computers (1950s-1960s) used varying byte sizes:
- 6-bit bytes (64 values)
- 7-bit bytes (128 values, for early ASCII)
- 9-bit bytes (some mainframes)
Modern standard (1964-present):
- 8 bits = 1 byte universally across all computers, operating systems, and programming languages
- Standardized by IBM System/360 (1964) and formalized by IEC as an "octet"
Binary representation:
- 1 byte = 8 positions: [bit 7][bit 6][bit 5][bit 4][bit 3][bit 2][bit 1][bit 0]
- Example: 01001001 = decimal 73 = ASCII character 'I'
What's the difference between a bit (b) and a byte (B)?
Bit (b):
- Smallest unit of digital information: single binary digit (0 or 1)
- Symbol: Lowercase 'b'
- Used for: Data transfer rates (Mbps, Gbps)
Byte (B):
- Group of 8 bits (fundamental addressable unit in computers)
- Symbol: Uppercase 'B'
- Used for: File sizes, storage capacity, memory (KB, MB, GB, TB)
Key relationship: 1 Byte = 8 bits
Practical differences:
Internet speed:
- Advertised as Mbps (megabits per second), not MB/s
- "100 Mbps" connection = 100 ÷ 8 = 12.5 MB/s (megabytes per second) actual download speed
File sizes:
- Always measured in Bytes (B): MB, GB, TB
- Never in bits (would be confusing: no one says "this photo is 80 million bits")
Why the distinction exists:
- Historical: Early telecommunications used bits (telegraph, modems)
- Bytes emerged later as computer memory/storage unit
- Industry inertia: ISPs still advertise in bits (makes speeds sound 8× bigger!)
Memory trick:
- Little 'b' = little bit (smaller)
- Big 'B' = Big Byte (8× larger)
How many values can a byte represent?
A byte can represent 2^8 = 256 distinct values.
Unsigned interpretation (0 to 255):
- Minimum: 00000000 binary = 0 decimal
- Maximum: 11111111 binary = 255 decimal
- Total: 256 possible values (0 through 255)
Signed interpretation (-128 to +127):
- Uses "two's complement" representation
- Minimum: 10000000 binary = -128 decimal
- Maximum: 01111111 binary = +127 decimal
- Zero: 00000000 = 0
- Total: Still 256 possible values (-128 through +127)
Practical uses of 256 values:
1. ASCII characters:
- Extended ASCII uses 0-255 to represent letters, digits, punctuation, control codes
- Example: 'A' = 65, 'a' = 97, '0' = 48
2. RGB color components:
- Red: 0-255 (1 byte)
- Green: 0-255 (1 byte)
- Blue: 0-255 (1 byte)
- Total colors: 256 × 256 × 256 = 16,777,216 colors (24-bit "true color")
3. Grayscale images:
- 0 = pure black
- 255 = pure white
- 1-254 = 254 shades of gray
4. Small integers:
- Age (0-255 years): 1 byte sufficient
- Volume level (0-255): Common in audio mixers
- Percentage × 2.55 (0-100% mapped to 0-255)
Why 256? Power of 2 (2^8) aligns perfectly with binary computers. Each bit doubles the possibilities: 1 bit = 2 values, 2 bits = 4 values, ..., 8 bits = 256 values.
Why is it called a byte and not something else?
The term "byte" was coined by Werner Buchholz at IBM in 1956 during the design of the IBM Stretch supercomputer.
Etymology:
- Intentional misspelling of "bite" (a small amount)
- The 'y' was inserted to avoid accidental transcription errors or confusion with "bit"
- Original pronunciation: "bite" (rhymes with "kite")
Original meaning (1956):
- A byte was a group of bits treated as a single unit
- Size varied depending on data type (1-6 bits in Stretch)
- Smallest addressable unit of memory
Evolution to 8 bits:
- IBM System/360 (1964) standardized byte = 8 bits exactly
- This definition became universal across computing
- Alternative term: "octet" (meaning 8, from Latin "octo") used in international standards (IEC), but "byte" dominates in practice
Why not other names?
- "Octet" is technically more precise (always 8 bits), but "byte" was already entrenched by 1960s
- Some early alternatives existed but didn't stick:
- "Slab" (used at IBM briefly)
- "Catena" (chain of bits)
- "Syllable" (group of bits forming unit)
Modern usage:
- "Byte" is universal: All programming languages (C, Java, Python), operating systems (Windows, Linux, macOS), and documentation use "byte"
- "Octet" appears in networking standards (TCP/IP RFCs) and international telecom, but even there "byte" is understood
How do I convert megabits to megabytes?
Divide megabits (Mb) by 8 to get megabytes (MB).
Formula: MB = Mb ÷ 8
Examples:
- 100 megabits (Mb) ÷ 8 = 12.5 megabytes (MB)
- 1,000 megabits (1 gigabit, Gb) ÷ 8 = 125 megabytes (MB)
- 8 megabits ÷ 8 = 1 megabyte
Reverse conversion (megabytes to megabits): Multiply by 8
Formula: Mb = MB × 8
Examples:
- 10 megabytes (MB) × 8 = 80 megabits (Mb)
- 125 megabytes × 8 = 1,000 megabits (1 gigabit)
Practical application: Internet speed to download speed
Internet advertised speed:
- "100 Mbps" (megabits per second)
- Actual download speed: 100 Mbps ÷ 8 = 12.5 MB/s (megabytes per second)
How long to download 1 GB file?
- 1 GB = 1,000 MB
- 100 Mbps connection = 12.5 MB/s
- Time: 1,000 MB ÷ 12.5 MB/s = 80 seconds (~1.3 minutes)
Why this matters:
- ISPs advertise in megabits (sounds bigger: "100 Mbps" > "12.5 MB/s")
- File sizes shown in megabytes (browsers, download managers)
- You must divide by 8 to match units
Quick reference:
- 10 Mbps = 1.25 MB/s
- 25 Mbps = 3.125 MB/s
- 50 Mbps = 6.25 MB/s
- 100 Mbps = 12.5 MB/s
- 200 Mbps = 25 MB/s
- 1 Gbps (1,000 Mbps) = 125 MB/s
Why does my 1 TB drive show as 931 GB?
You got all 1 trillion bytes—it's just measured differently.
Explanation:
Storage manufacturer definition (decimal, base-10):
- 1 TB = 1,000 GB = 1,000,000 MB = 1,000,000,000,000 bytes (exactly 1 trillion)
- Uses powers of 1,000 (10³, 10⁶, 10⁹, 10¹²)
Operating system calculation (binary, base-2):
- Windows/macOS calculate using powers of 1,024 (2¹⁰, 2²⁰, 2³⁰, 2⁴⁰)
- 1,000,000,000,000 bytes ÷ 1,024 ÷ 1,024 ÷ 1,024 = 931.32 GiB (gibibytes)
- But displays as "931 GB" (using GB label incorrectly for GiB value)
The math:
- 1 trillion bytes ÷ (1,024³) = 1,000,000,000,000 ÷ 1,073,741,824 = 931.32
- Difference: ~7% for GB, ~10% for TB
Why manufacturers use decimal:
- Simplicity: Matches metric system (kilo = 1,000, mega = 1,000,000)
- Historical: Storage always used decimal (disks measured in thousands of sectors)
- Marketing: Larger numbers (1,000 GB sounds better than 931 GiB)
Why OS uses binary:
- Computer hardware is binary (powers of 2: 2¹⁰, 2²⁰, etc.)
- Memory addressing uses binary boundaries (1,024, not 1,000)
- Legacy: Before IEC standardized "gibibyte," everyone misused "gigabyte" for 1,024³
Technically correct terminology:
- Manufacturer: 1 TB (decimal terabyte) = 1,000,000,000,000 bytes ✓
- OS should show: 931.32 GiB (gibibytes, binary) ✓
- OS actually shows: 931 GB (incorrect label, should say GiB) ❌
You didn't lose storage—it's all there: Every one of those 1 trillion bytes is usable. It's purely a measurement system difference, like kilometers vs. miles.
Similar examples:
- 500 GB drive → shows as ~465 GB (actually 465 GiB)
- 2 TB drive → shows as ~1.81 TB (actually 1.81 TiB)
- 64 GB USB → shows as ~59 GB (actually 59.6 GiB)
How much storage do I need for photos and videos?
Storage requirements depend on resolution and format:
Photos (JPEG compressed):
Smartphone photos:
- 8 MP (megapixels): 2-4 MB per photo
- 12 MP (modern phones): 5-10 MB per photo
- 48 MP (flagship phones): 10-15 MB per photo
DSLR/Mirrorless cameras:
- 12-24 MP (JPEG): 5-15 MB per photo
- RAW format (uncompressed): 20-50 MB per photo (professional photographers)
Storage calculation:
- 1 GB = ~200 smartphone photos (5 MB each)
- 10 GB = ~2,000 photos
- 100 GB = ~20,000 photos
- 1 TB = ~200,000 smartphone photos
Videos (compressed):
Smartphone video:
- 1080p (Full HD) @ 30 fps: ~130 MB per minute = ~7.8 GB per hour
- 1080p @ 60 fps: ~200 MB per minute = ~12 GB per hour
- 4K @ 30 fps: ~350 MB per minute = ~21 GB per hour
- 4K @ 60 fps: ~400-500 MB per minute = ~25-30 GB per hour
Action camera (GoPro):
- 4K @ 60 fps: ~30-40 GB per hour
Professional video (uncompressed/ProRes):
- 4K ProRes: 200-300 GB per hour
Storage calculation:
- 10 GB = ~1 hour of 1080p smartphone video
- 100 GB = ~5 hours of 4K video
- 1 TB = ~50 hours of 4K video or ~130 hours of 1080p
Recommendations by use case:
Casual user (photos + occasional video):
- 64-128 GB: Sufficient if regularly backing up to cloud
- 256 GB: Comfortable for 1-2 years before cleanup
Photography enthusiast:
- 512 GB - 1 TB: Several thousand photos, room for editing
- External drive: 2-4 TB for long-term archive
Videographer / Content creator:
- 1-2 TB internal storage (active projects)
- 8-20 TB external/NAS (archive)
- 4K video fills storage fast!
Professional photographer:
- 2-4 TB working drive
- 10-50 TB archive (RAW files accumulate)
- Redundant backup (RAID, cloud)
What's the difference between MB and MiB?
MB (megabyte, decimal) and MiB (mebibyte, binary) are different units for measuring data size.
MB (Megabyte) - Decimal/SI:
- 1 MB = 1,000,000 bytes exactly (10⁶)
- Based on powers of 1,000 (like metric system: kilo = 1,000, mega = 1,000,000)
- Used by: Storage manufacturers (HDD, SSD, USB drives), internet speeds, file sizes
MiB (Mebibyte) - Binary:
- 1 MiB = 1,048,576 bytes exactly (2²⁰ = 1,024 × 1,024)
- Based on powers of 1,024 (binary: 2¹⁰, 2²⁰, 2³⁰)
- Used by: Operating systems (Linux accurately, Windows mislabels as "MB"), RAM
Size difference:
- 1 MiB = 1,048,576 bytes
- 1 MB = 1,000,000 bytes
- Difference: 4.86% (MiB is ~5% larger)
All binary prefixes (IEC standard, 1998):
- KiB (kibibyte) = 1,024 bytes
- MiB (mebibyte) = 1,024² = 1,048,576 bytes
- GiB (gibibyte) = 1,024³ = 1,073,741,824 bytes
- TiB (tebibyte) = 1,024⁴ = 1,099,511,627,776 bytes
Pronunciation:
- MiB = "MEB-ee-byte" or "MEG-a-binary-byte"
- GiB = "GIB-ee-byte" or "GIG-a-binary-byte"
Why two systems?
- Decimal (MB): Matches metric system, easier for humans (1,000 is rounder than 1,024)
- Binary (MiB): Matches computer architecture (memory addresses are powers of 2)
The confusion:
- Historically, "MB" was used for both meanings (sloppy)
- IEC created "-bi-" prefixes (KiB, MiB, GiB) in 1998 to clarify
- Windows still mislabels: Shows "GB" but means "GiB"
- Linux tools (e.g.,
df,du) increasingly use correct MiB/GiB labels
Practical impact:
- 8 GB RAM stick: Actually 8 GiB = 8,589,934,592 bytes (not 8,000,000,000)
- 1 TB hard drive: Exactly 1,000,000,000,000 bytes (decimal), shown as 931 GiB by OS
Which should you use?
- Technically correct: MiB/GiB when referring to memory, binary quantities
- Common practice: MB/GB understood colloquially, context determines meaning
- Storage advertising: Always decimal (MB, GB, TB)
How many bytes in a kilobyte, megabyte, gigabyte?
Depends on whether you use decimal (storage manufacturers) or binary (computer science) definitions:
Decimal (SI units, powers of 1,000):
- 1 kilobyte (KB) = 1,000 bytes (10³)
- 1 megabyte (MB) = 1,000,000 bytes (10⁶)
- 1 gigabyte (GB) = 1,000,000,000 bytes (10⁹)
- 1 terabyte (TB) = 1,000,000,000,000 bytes (10¹²)
Binary (IEC units, powers of 1,024):
- 1 kibibyte (KiB) = 1,024 bytes (2¹⁰)
- 1 mebibyte (MiB) = 1,048,576 bytes (2²⁰ = 1,024²)
- 1 gibibyte (GiB) = 1,073,741,824 bytes (2³⁰ = 1,024³)
- 1 tebibyte (TiB) = 1,099,511,627,776 bytes (2⁴⁰ = 1,024⁴)
Comparison table:
| Unit | Decimal (Storage) | Binary (Computer) | Difference | |------|-------------------|-------------------|------------| | Kilo/Kibi | 1,000 B | 1,024 B | 2.4% | | Mega/Mebi | 1,000,000 B | 1,048,576 B | 4.9% | | Giga/Gibi | 1,000,000,000 B | 1,073,741,824 B | 7.4% | | Tera/Tebi | 1,000,000,000,000 B | 1,099,511,627,776 B | 9.95% (~10%) |
Which to use?
- Hard drives, SSDs, USB drives: Manufacturers use decimal (KB, MB, GB, TB)
- RAM: Always binary (though often mislabeled as "GB" instead of "GiB")
- Operating systems: Calculate in binary (1,024-based) but often mislabel as decimal units
Historical note: Before 1998, "kilobyte" was ambiguous (sometimes 1,000, sometimes 1,024). IEC created the "-bi-" prefixes (kibi, mebi, gibi) to eliminate confusion, but adoption has been slow. Most people still say "gigabyte" when they technically mean "gibibyte."
Does file compression save bytes?
Yes—file compression reduces the number of bytes required to store data, often dramatically.
How compression works:
- Finds repeating patterns in data
- Replaces repetitions with shorter references
- Lossless: Original data perfectly reconstructed (ZIP, PNG, FLAC)
- Lossy: Some data discarded to save more space (JPEG, MP3, H.264 video)
Lossless compression (no data loss):
Text files:
- Plain text (.txt): 50-70% compression typical
- Example: 1 MB text file → 300-500 KB compressed (ZIP)
- Best for: Documents, code, data files
Images (lossless):
- PNG: 10-50% compression vs. BMP (uncompressed)
- Example: 10 MB BMP screenshot → 2-3 MB PNG
Audio (lossless):
- FLAC: 40-60% compression vs. WAV
- Example: 30 MB WAV song → 15-20 MB FLAC (identical quality)
Lossy compression (discards some data):
Images (lossy):
- JPEG: 90-95% compression vs. uncompressed
- Example: 36 MB uncompressed photo → 5 MB JPEG (high quality) or 1 MB (medium quality)
- Tradeoff: Smaller size, but quality loss (artifacts, blurriness)
Audio (lossy):
- MP3 (128 kbps): ~90% compression vs. CD quality WAV
- Example: 30 MB WAV → 3 MB MP3
- Tradeoff: Smaller, but loses high frequencies (most people don't notice)
Video (lossy):
- H.264/H.265: 95-99% compression vs. uncompressed
- Example: 500 GB uncompressed 1080p movie → 4-8 GB compressed
- Tradeoff: Smaller, but encoding artifacts in fast motion
Already-compressed files:
- ZIP a JPEG: Minimal savings (~5% at best)
- ZIP an MP3: Almost no savings
- ZIP a PNG: Little benefit (PNG already compressed)
- Compressing compressed data doesn't help!
Practical storage savings:
- Documents (ZIP): Save 50-70% space
- Photo library (JPEG vs. RAW): Save 70-85% space
- Music collection (MP3 vs. FLAC): Save 40-60% space (lossy vs. lossless)
- Backups (compressed): Save 30-60% space
Cloud storage example:
- 100 GB photo library (RAW): Costs $2/month
- Compress to JPEG: ~20 GB → Costs $0.40/month
- Save ~80% on storage costs (but lose editing flexibility)
Bottom line: Compression significantly reduces bytes needed, saving storage space and transfer time—but lossy compression sacrifices quality.
About Megabyte (MB)
How many bytes are in a megabyte (MB)?
According to the official SI standard, 1 megabyte (MB) = 1,000,000 bytes (106 bytes). However, in some computing contexts, particularly older ones or relating to RAM, "megabyte" was informally used to mean 1,048,576 bytes (220 bytes). The correct term for 1,048,576 bytes is 1 mebibyte (MiB). Context is key if the specific symbol (MB vs. MiB) isn't used.
How many kilobytes (KB) are in a megabyte (MB)?
Based on the SI standard, 1 megabyte (MB) = 1000 kilobytes (KB) (since 1 MB = 1,000,000 bytes and 1 KB = 1000 bytes). If using the binary interpretation (which should correctly use MiB and KiB), then 1 mebibyte (MiB) = 1024 kibibytes (KiB) (since 1 MiB = 1,048,576 bytes and 1 KiB = 1024 bytes).
What is the difference between a megabyte (MB) and a mebibyte (MiB)?
- MB (megabyte): Based on the decimal prefix 'mega-', meaning 1,000,000 bytes (106 bytes). This is the SI standard.
- MiB (mebibyte): Based on the binary prefix 'mebi-', meaning 1,048,576 bytes (220 bytes). This is the IEC standard for binary multiples.
A mebibyte (MiB) is approximately 4.86% larger than a megabyte (MB) (1 MiB ≈ 1.0486 MB). Using MiB when referring to 1,048,576 bytes avoids ambiguity, especially in contexts like RAM measurement or OS file size reporting.
What is the difference between a megabyte (MB) and a megabit (Mb)?
- A megabyte (MB) measures data storage in bytes. 1 MB = 1,000,000 bytes (SI standard).
- A megabit (Mb) measures data storage or transfer speed in bits. 1 Mb = 1,000,000 bits (SI standard).
Since 1 byte = 8 bits, 1 megabyte (MB) is equal to 8 megabits (Mb). File sizes are typically measured in MB, while internet speeds are often measured in Mbps (megabits per second).
Conversion Table: Byte to Megabyte
| Byte (B) | Megabyte (MB) |
|---|---|
| 0.5 | 0 |
| 1 | 0 |
| 1.5 | 0 |
| 2 | 0 |
| 5 | 0 |
| 10 | 0 |
| 25 | 0 |
| 50 | 0 |
| 100 | 0 |
| 250 | 0 |
| 500 | 0.001 |
| 1,000 | 0.001 |
People Also Ask
How do I convert Byte to Megabyte?
To convert Byte to Megabyte, enter the value in Byte in the calculator above. The conversion will happen automatically. Use our free online converter for instant and accurate results. You can also visit our data storage converter page to convert between other units in this category.
Learn more →What is the conversion factor from Byte to Megabyte?
The conversion factor depends on the specific relationship between Byte and Megabyte. You can find the exact conversion formula and factor on this page. Our calculator handles all calculations automatically. See the conversion table above for common values.
Can I convert Megabyte back to Byte?
Yes! You can easily convert Megabyte back to Byte by using the swap button (⇌) in the calculator above, or by visiting our Megabyte to Byte converter page. You can also explore other data storage conversions on our category page.
Learn more →What are common uses for Byte and Megabyte?
Byte and Megabyte are both standard units used in data storage measurements. They are commonly used in various applications including engineering, construction, cooking, and scientific research. Browse our data storage converter for more conversion options.
For more data storage conversion questions, visit our FAQ page or explore our conversion guides.
Helpful Conversion Guides
Learn more about unit conversion with our comprehensive guides:
📚 How to Convert Units
Step-by-step guide to unit conversion with practical examples.
🔢 Conversion Formulas
Essential formulas for data storage and other conversions.
⚖️ Metric vs Imperial
Understand the differences between measurement systems.
⚠️ Common Mistakes
Learn about frequent errors and how to avoid them.
All Data Storage Conversions
Other Data Storage Units and Conversions
Explore other data storage units and their conversion options:
Verified Against Authority Standards
All conversion formulas have been verified against international standards and authoritative sources to ensure maximum accuracy and reliability.
International Electrotechnical Commission — Binary prefixes for digital storage (KiB, MiB, GiB)
International Organization for Standardization — International standards for quantities and units
Last verified: December 3, 2025