# MB

> The MB (megabyte) is a unit of digital information equal to 1,000 kilobytes.

## How many KB are in an MB?

The unit of digital data equal to 1,000 kilobytes in the SI standard. The binary value of 1,024 KiB is called a mebibyte (MiB), although many operating systems still label it MB. Commonly used to measure images, audio files and web page weight.

- Topic: Data Units
- Type: unit of measurement

## Common mistakes

- Mixing 1,000 and 1,024 between client and server checks, so a file passes one and fails the other.
- Confusing Mbps (megabits per second) with MB/s.

## Key points

- Size limits in code are written as exact byte counts, like `5 * 1000 * 1000` or `5 * 1024 * 1024`, matching the stated unit.
- Client-side and server-side size checks use the same limit and the same divisor.

## Interview questions

### MB vs MiB: what is the difference?

An MB is 1,000,000 bytes. An MiB (mebibyte) is 1,048,576 bytes, which is 1,024 KiB.

### How long does a 100 MB download take on a 100 Mbps connection?

About 8 seconds at full speed, because 100 MB is 800 megabits. Real downloads take longer due to overhead.

### How many MB is a typical web page?

Commonly a few MB in total, with images and JavaScript taking the largest share.

## Related cards

- [KB](https://wonderium.dev/engineering/kb.md)
- [GB](https://wonderium.dev/engineering/gb.md)
- [Byte](https://wonderium.dev/engineering/byte.md)
- [Bit](https://wonderium.dev/engineering/bit.md)
- [.jpeg](https://wonderium.dev/engineering/jpeg.md)

---

- Level: [Engineering](https://wonderium.dev/engineering.md)
- HTML version: https://wonderium.dev/engineering/mb
- Last updated: 2026-11-25
