# Bandwidth and download time calculator

> Download or upload time for a file at a given speed, the data a link moves in a set time, and a website's monthly bandwidth from page views.

Phiên bản tương tác: https://www.calcopenly.com/vi/programming/bandwidth-data-transfer-calculator
Chủ đề: Máy tính lập trình và công nghệ

Transfer time is the size in bits divided by the speed in bits per second: t = 8 × bytes ÷ (rate × (1 − overhead)). The factor of 8 is there because internet plans quote megabits per second while files are measured in bytes. The other two modes run the same equation the other way, for the data a link moves in a set time, or multiply page views by page weight for a website's monthly traffic.

The default, a 50 GB download on a 100 Mbit/s plan with 5% protocol overhead, takes 1 h 10 min 10 s; with no overhead it would take 1 h 6 min 40 s. A site with 100,000 monthly views of a 2 MB page serves 200 GB a month.

Real downloads can be slower than the result when the server, Wi-Fi or a congested route caps the speed below the plan's rate. Sizes follow IEC 80000-13: 1 GB is 10^9 bytes and 1 GiB is 2^30 bytes.

## Dữ liệu đầu vào

- **Tôi muốn tính** (lựa chọn: Transfer time, Data moved in a time, Website monthly bandwidth)
- **Data size**
- **Connection speed**: Internet plans quote megabits per second (Mbit/s); download dialogs often show megabytes per second (MB/s), 8 times smaller.
- **Time spent transferring**
- **Protocol overhead**: Share of the line rate lost to packet headers. TCP/IPv4 over Ethernet carries 1460 payload bytes per 1538 bytes on the wire, about 5%.
- **Page views per month**
- **Average page weight**: Everything one view downloads (HTML, scripts, images). Your browser's network panel shows the total.
- **Days in the month**

## Kết quả

- Transfer time — kết quả chính
- Transfer time in seconds (s)
- Data
- Data
- Payload speed after overhead (Mbit/s)
- Data per day (GB)
- Average speed needed (Mbit/s)

## Công thức

$$
\begin{aligned} t &= \frac{8 \times \text{bytes}}{\text{rate} \times (1 - \text{overhead})} \\[4pt] \text{monthly} &= \text{views} \times \text{page weight}\end{aligned}
$$

## Ví dụ có lời giải

### 50 GB at 100 Mbit/s with no overhead

- Tôi muốn tính: Transfer time
- Data size: 50 GB
- Connection speed: 100 Mbit/s
- Protocol overhead: 0%
- **Transfer time in seconds: 4,000 s**
- **Transfer time: 1 h 6 min 40 s**
- Nguồn đối chiếu: Python 3.8: 50e9 × 8 / 100e6 = 4000 s

### Same transfer with 5% overhead

- Tôi muốn tính: Transfer time
- Data size: 50 GB
- Connection speed: 100 Mbit/s
- Protocol overhead: 5%
- **Transfer time in seconds: 4,210.53 s**
- **Payload speed after overhead: 95 Mbit/s**
- Nguồn đối chiếu: Python 3.8 decimal: 4000 / 0.95 = 4210.526315…

### 1 GiB at 1 Gbit/s (binary size, edge)

- Tôi muốn tính: Transfer time
- Data size: 1 GiB
- Connection speed: 1 Gbit/s
- Protocol overhead: 0%
- **Transfer time in seconds: 8.59 s**
- Nguồn đối chiếu: Python 3.8: 2**30 × 8 / 1e9 = 8.589934592 s

### One hour at 100 Mbit/s

- Tôi muốn tính: Data moved in a time
- Connection speed: 100 Mbit/s
- Time spent transferring: 1 h
- Protocol overhead: 0%
- **Data: 45 GB**
- **Data: 41.91 GiB**
- Nguồn đối chiếu: Python 3.8: 100e6 × 3600 / 8 = 45e9 B; 45e9 / 2**30 = 41.90951 GiB

### 100,000 views of a 2 MB page

- Tôi muốn tính: Website monthly bandwidth
- Page views per month: 100,000
- Average page weight: 2 MB
- Days in the month: 30
- **Data: 200 GB per month**
- **Data per day: 6.667 GB**
- **Average speed needed: 0.617 Mbit/s**
- Nguồn đối chiếu: Python 3.8 decimal: 1e5 × 2e6 = 2e11 B; 2e11 × 8 / (30 × 86400) = 617 283.95 bit/s

### Speed given in megabytes per second

- Tôi muốn tính: Transfer time
- Data size: 700 MB
- Connection speed: 10 MB/s
- Protocol overhead: 0%
- **Transfer time in seconds: 70 s**
- **Payload speed after overhead: 80 Mbit/s**
- Nguồn đối chiếu: Python 3.8: 700e6 / 10e6 = 70 s; 10 MB/s × 8 = 80 Mbit/s

## Câu hỏi

### How long does it take to download 1 GB at 100 Mbps?

About 80 seconds at the full line rate: 1 GB is 8,000 megabits, and 8,000 ÷ 100 = 80 s. With 5% protocol overhead it takes about 84 s. At 10 Mbit/s the same file takes 13 min 20 s, and at 1 Gbit/s about 8 s, as long as the server and Wi-Fi keep up.

### What is the difference between Mbps and MB/s?

Mbps (megabits per second) measures network speed, while MB/s (megabytes per second) is how browsers and download managers show progress. One byte is 8 bits, so divide Mbps by 8: a 100 Mbit/s plan tops out at 12.5 MB/s, and 1 Gbit/s at 125 MB/s. Protocol overhead lowers the figure you see by a further few percent.

### Why is my download slower than my internet speed?

Part of the gap is protocol overhead: over Ethernet, TCP/IPv4 carries 1,460 bytes of data in each full 1,538-byte frame on the wire, so about 5% of the line rate goes to headers, preamble and inter-frame gap. The rest comes from the server's own limit, Wi-Fi signal, congestion on the route, or other devices sharing the connection.

### How much bandwidth does a website need per month?

Multiply monthly page views by the average page weight, which your browser's network panel shows. 100,000 views of a 2 MB page is 200 GB a month, about 6.7 GB a day or an average of 0.62 Mbit/s. Visits bunch up in busy hours, so size hosting and caching for several times that average.

### Is 1 GB 1,000 MB or 1,024 MB?

Under the SI and IEC 80000-13 prefixes, 1 GB is 1,000 MB, or 10^9 bytes, while 1 GiB (gibibyte) is 1,024 MiB, or 2^30 = 1,073,741,824 bytes. Network speeds and drive labels use decimal units. Windows counts in binary units but labels them GB, so a 50 GB file shows there as 46.57.

### “Bandwidth and download time calculator” chính xác đến mức nào?

Độ chính xác phụ thuộc vào dữ liệu nhập và giả định của phương pháp. Phép tính thập phân dùng 50 chữ số có nghĩa, nhưng ước lượng, phương pháp số và dữ liệu nguồn có thể kém chính xác hơn; làm tròn khi hiển thị không loại bỏ các giới hạn đó. Ví dụ có lời giải đã đối chiếu với nguồn độc lập: 6. Ví dụ, “50 GB at 100 Mbit/s with no overhead” được kiểm tra bằng Python 3.8: 50e9 × 8 / 100e6 = 4000 s.

### Phương pháp này lấy từ đâu?

IEC 80000-13:2008 — decimal (kB, MB, GB) and binary (KiB, MiB, GiB) prefixes for bytes; IEEE 802.3 Ethernet: 8-byte preamble, 14-byte header, 1500-byte payload, 4-byte FCS and 12-byte inter-frame gap (1538 bytes per full frame); NIST — Prefixes for binary multiples.

## Nguồn

- IEC 80000-13:2008 — decimal (kB, MB, GB) and binary (KiB, MiB, GiB) prefixes for bytes
- IEEE 802.3 Ethernet: 8-byte preamble, 14-byte header, 1500-byte payload, 4-byte FCS and 12-byte inter-frame gap (1538 bytes per full frame)
- [NIST — Prefixes for binary multiples](https://physics.nist.gov/cuu/Units/binary.html)
