Free tool · runs in your browser

Bandwidth calculator

Free bandwidth calculator: the port a video stream needs for your viewers, how long a file takes to transfer, and Mbit/s to TB a month and back.

Streaming: viewers × bitrate

Typical H.264 bitrates:
Average egress
3 Gbit/s500 × 6 Mbit/s
Port to plan for
3.75 Gbit/swith 25% headroom
Traffic a month
162 TB4 h a day for 30 days
The port classes for the rate with headroom
PortLoadFits
1 Gbit/s
375%
too small
10 Gbit/s
38%
smallest fit
40 Gbit/s
9.4%
yes
100 Gbit/s
3.8%
yes
2×100 Gbit/s
1.9%
yes

The bitrate is per viewer, video and audio together. With adaptive streaming (HLS or DASH) each viewer pulls one rendition at a time, so use the bitrate most of them watch, or the highest for the worst case. The upload from your encoder to the server is one stream per rendition and is small next to the egress.

Transfer time: file size ÷ link speed

Protocol overhead (an estimate)

TCP over Ethernet, 1500-byte MTU.

50 GB (50 GB) over 1 Gbit/s takes about 7 min 5 s, at 941 Mbit/s of payload.

LinkSame file
100 Mbit/s1 h 10 min 49 s
1 Gbit/s7 min 5 s
10 Gbit/s42.5 s
100 Gbit/s4.2 s

Link speeds are in bits, file sizes in bytes: divide by 8, so 1 Gbit/s is 125 MB a second before overhead. A transfer runs only as fast as the slowest part of the path, the disk at either end included.

Sustained rate ↔ monthly traffic

1 Gbit/s for 30 days moves 324 TB.

100 TB spread evenly over 30 days is an average of 309 Mbit/s. Peaks run well above the average.

The port classes for the average rate
PortLoadFits
1 Gbit/s
100%
smallest fit
10 Gbit/s
10%
yes
40 Gbit/s
2.5%
yes
100 Gbit/s
1.0%
yes
2×100 Gbit/s
0.5%
yes
On this page

The formulas

Short answer: a stream needs viewers × bitrate of egress, plus headroom; a transfer takes size in bits ÷ link speed; and a rate held for a month adds up to rate × seconds in the month ÷ 8 bytes. Everything else on this page is those three lines with units attached.

Bandwidth arithmetic
egress (Mbit/s)     = viewers × bitrate per viewer
port to plan for    = egress × 1.25                 (25 % headroom)
transfer time (s)   = size (bytes) × 8 ÷ (link (bit/s) × payload share)
traffic (bytes)     = rate (bit/s) × seconds ÷ 8
30-day month        = 2,592,000 seconds

1 Gbit/s × 2,592,000 s ÷ 8 = 324,000,000,000,000 bytes = 324 TB

Video bitrates and what they add up to

The bitrates below are common targets for H.264 at 30 frames a second, not a standard: an encoder set to a different rate, 60 frames a second, HEVC or AV1 change them. Per hour is for one viewer; the last two columns are the port to plan for, with 25% headroom.

StreamBitratePer viewer per hour100 viewers1,000 viewers
480pSD, 854×4801.5 Mbit/s675 MB188 Mbit/s1.88 Gbit/s
720pHD, 1280×7203 Mbit/s1.35 GB375 Mbit/s3.75 Gbit/s
1080pFull HD, 1920×10806 Mbit/s2.7 GB750 Mbit/s7.5 Gbit/s
4KUHD, 3840×2160, HEVC or AV120 Mbit/s9 GB2.5 Gbit/s25 Gbit/s

With adaptive streaming (HLS or DASH) the player switches between renditions, so the egress is a mix: plan with the rendition most viewers watch, and with the highest one for the worst case. Audio adds about 0.1 to 0.2 Mbit/s per viewer, which the presets include.

Port classes in numbers

What each common port speed carries per second, what it moves running flat out for a 30-day month, and how many viewers of a 1080p stream at 6 Mbit/s it serves with 25% headroom.

PortPer secondIn 30 days, flat out1080p viewers
1 Gbit/s125 MB/s324 TB133
10 Gbit/s1.25 GB/s3.24 PB1,333
40 Gbit/s5 GB/s13 PB5,333
100 Gbit/s12.5 GB/s32.4 PB13,333
2×100 Gbit/s25 GB/s64.8 PB26,666

Bits and bytes

Links and ports are sold in bits per second (Mbit/s, Gbit/s, often written Mbps and Gbps); files and download dialogs count bytes (MB, GB). A byte is 8 bits, so divide a link speed by 8 to get bytes a second: 100 Mbit/s is 12.5 MB/s and 1 Gbit/s is 125 MB/s. Both use decimal prefixes in networking. Operating systems often print file sizes in binary units (1 GiB = 1,073,741,824 bytes) under the name GB, which is why the calculator offers MiB, GiB and TiB as well.

Why 25% headroom

  • Bitrates peak. A variable-bitrate encode averages its target but runs above it in fast scenes; a constant-bitrate encode still fluctuates at the segment level.
  • Viewers arrive together. The start of an event, a goal or a link shared in a chat sends hundreds of players to the same segments within seconds.
  • A full port queues. Near line rate, packets wait in buffers and are dropped, TCP slows down, and players fall back to a lower rendition or stall. Every viewer sees it, not only the last one in.

25% is a planning figure, not a law: an audience that grows during an event needs more, a steady 24/7 channel with a known audience less.

Protocol overhead

A link never carries its full rate as file data. With TCP over Ethernet and the usual 1500-byte MTU, each full frame takes 1538 bytes of wire time (1500 bytes plus 14 header, 4 checksum, 8 preamble and 12 inter-frame gap) and carries 1448 bytes of data (1500 minus 20 for IP, 20 for TCP and 12 for the timestamp option, which Linux uses by default). That is 94.1%, so about 6% goes to headers. TLS, acknowledgements and retransmissions take a little more, which is what the “about 10%” setting allows for. Both are estimates; a measured transfer is the real answer.

Measuring a server’s real throughput

The figures above are arithmetic. To see what a server and the path to it really carry, measure with iperf3 between two machines you control, and watch the interface counters while real traffic flows (the options are in the iperf3(1) and vnstat(1) man pages):

Measure throughput and count traffic
iperf3 -s                         # on the receiving server
iperf3 -c SERVER_IP -P 4 -t 30    # from the client: 4 parallel streams for 30 s
iperf3 -c SERVER_IP -P 4 -t 30 -R # the other direction (server sends)
vnstat -m                         # traffic per month on a server running vnstat

Testing a VPS or server’s network step by step with speedtest, iperf3 and mtr, and reading the results, is in how to test VPS network speed. A fast port does not make a far-away server feel close: bandwidth vs latency explains the difference.

One server or a CDN

A single origin serves about a hundred viewers of a 1080p stream on a 1 Gbit/s port and over a thousand on a 10 Gbit/s port, as the table above shows. Past that, or for viewers spread across continents, a CDN caches the segments close to them and the origin only feeds the CDN, which needs a small fraction of the egress. To run the origin yourself, setting up an nginx RTMP server takes a stream from OBS and serves it as HLS.

Frequently asked

How much bandwidth do I need to stream to 1,000 viewers?

Multiply the viewers by the bitrate each one receives. 1,000 viewers of a 1080p stream at 6 Mbit/s need 6 Gbit/s on average, 7.5 Gbit/s with 25% headroom, which is a 10 Gbit/s port. At 720p and 3 Mbit/s it is 3 Gbit/s, or 3.75 Gbit/s with headroom. Above a few thousand viewers a CDN usually carries the delivery instead of one server.

How much data does 1 Gbit/s transfer in a month?

About 324 TB in a 30-day month if it runs flat out: 1 Gbit/s is 125 MB a second, and a 30-day month has 2,592,000 seconds. 10 Gbit/s moves about 3.24 PB. Real traffic has a daily curve, so a port that peaks at 1 Gbit/s typically moves a fraction of that.

How long does it take to transfer 100 GB over 1 Gbit/s?

13 min 20 s at the full line rate (100 GB is 800 gigabits), about 14 min 10 s after the roughly 6% that TCP and Ethernet headers take, and closer to 15 minutes in practice. That assumes the disks and the slowest link on the path keep up; a transfer runs only as fast as its slowest part.

What is the difference between Mbps and MB/s?

Mbps (Mbit/s) counts bits, the unit of link and port speeds; MB/s counts bytes, the unit of file sizes and download dialogs. One byte is 8 bits, so 100 Mbit/s is 12.5 MB/s and 1 Gbit/s is 125 MB/s, before protocol overhead.

How much data does a 1080p stream use per hour?

About 2.7 GB per viewer per hour at 6 Mbit/s (6 Mbit/s × 3,600 s ÷ 8). A 720p stream at 3 Mbit/s uses about 1.35 GB, a 4K stream at 20 Mbit/s about 9 GB. The bitrate the encoder is set to decides it, not the resolution alone.

More free tools

All tools