TCP Window Size Calculator

Calculate optimal TCP window size and maximum throughput based on bandwidth and round-trip latency (bandwidth-delay product).

Link capacity
Mbps
Ping latency
ms
0 = ideal, 0.1% typical WAN
%
Test a specific window size
bytes
Bandwidth-Delay Product
5.96 MB
Optimal window = 6,250,000.00 bytes (4,281.00 segments)
Window Scale Factor
7
Max window = 8,388,480.00 bytes (2^7 ร— 64 KB)
Default Window (64 KB)
10.5 Mbps
0.01% utilization โ€” no window scaling
Optimal Throughput
1,000.00 Mbps
Window = BDP โ€” 100% link utilization
Custom Window
10.5 Mbps
65,536.00 byte window โ€” 0.01% utilization
Loss-Limited (Mathis)
9.0 Mbps
With 0.1% loss โ€” 0.01% effective utilization

Link Utilization

Default (64 KB)0.01%
Custom (64 KB)0.01%
Loss-Limited0.01%
Optimal (BDP)1.00%
Throughput Comparison
ConfigurationWindow SizeThroughputUtilization
Default (no scaling)64 KB10.5 Mbps0.01%
Custom64 KB10.5 Mbps0.01%
Loss-Limited (Mathis)โ€”9.0 Mbps0.01%
Optimal (BDP)5.96 MB1,000.00 Mbps100%
Common Scenarios Reference
ScenarioTypical RTTBDP (1 Gbps)Scale FactorNotes
Local LAN< 1 ms~0.6 KB0No scaling needed
Same Region5โ€“15 ms~0.6โ€“1.8 MB4Window scaling helps
Cross-Country30โ€“70 ms~3.6โ€“8.4 MB7Scaling required
Transatlantic80โ€“150 ms~10โ€“18 MB8Large buffers critical
Satellite (GEO)500โ€“700 ms~6โ€“8 MB7BDP dominates
Planning notes, formulas, and examples

About the TCP Window Size Calculator

TCP throughput is fundamentally limited by the TCP window size and network round-trip time (RTT). The Bandwidth-Delay Product (BDP) determines the optimal window size: the amount of data that can be in flight (sent but not yet acknowledged) to fully utilize the available bandwidth.

If the TCP window is smaller than the BDP, the connection cannot fill the pipe: the sender must wait for acknowledgments before transmitting more data, leaving bandwidth unused. This is especially impactful for high-bandwidth, high-latency links (WAN, satellite, cross-region cloud).

This calculator computes the BDP for your link parameters and determines the required TCP window size to achieve maximum throughput. It also estimates the maximum achievable throughput with the default and optimal window sizes.

When This Page Helps

Default TCP window sizes are often too small for high-bandwidth or high-latency links. This calculator determines the optimal window size to maximize throughput on your specific network path.

How to Use the Inputs

  1. Enter the link bandwidth in Mbps.
  2. Enter the round-trip time (RTT) in milliseconds.
  3. Review the bandwidth-delay product and required window size.
  4. Configure OS TCP buffers to at least the BDP value.
Formula used
BDP (bytes) = bandwidth_bps ร— RTT_sec / 8 BDP (bits) = bandwidth_bps ร— RTT_sec Max Throughput = window_size ร— 8 / RTT_sec (bps)

Example Calculation

Result: BDP: 6.25 MB, optimal window: 6.25 MB

BDP = 1,000 Mbps ร— 50 ms = 1,000,000,000 ร— 0.050 / 8 = 6,250,000 bytes (6.25 MB). A TCP window of 6.25 MB is needed to fully utilize a 1 Gbps link with 50 ms RTT. Default 64 KB window would limit throughput to ~10 Mbps.

Tips & Best Practices

  • Enable TCP window scaling (RFC 7323) for windows larger than 64 KB.
  • Set OS socket buffer sizes (SO_RCVBUF, SO_SNDBUF) to at least the BDP.
  • Modern Linux auto-tunes window size โ€” verify with ss -i.
  • WAN links (cross-region cloud) benefit most from window tuning.
  • Satellite links (500+ ms RTT) require windows of 10s of MB.
  • Monitor TCP retransmissions alongside window size for complete picture.

The Bandwidth-Delay Product Explained

Imagine a pipe: bandwidth is the pipe's width, RTT is its length. The BDP is the pipe's volume โ€” the amount of data needed to fill it. If you send less than BDP, the pipe has empty space (wasted bandwidth). The TCP window must be at least as large as the BDP to keep the pipe full.

Real-World Impact

A 10 Gbps link between US East and US West (RTT ~60 ms) has BDP = 75 MB. Default 64 KB windows would achieve only 8.5 Mbps on a 10,000 Mbps link โ€” 0.085% utilization. Proper tuning achieves near-wire speed.

Modern TCP Congestion Control

BBR (Google's TCP congestion control) probes for optimal window size automatically, adjusting based on measured bandwidth and RTT. It performs better than traditional Cubic on high-BDP links. Consider enabling BBR on servers (net.ipv4.tcp_congestion_control=bbr).

Sources & Methodology

Last updated:

Frequently Asked Questions

  • Without window scaling, the maximum TCP window is 64 KB (2^16). With window scaling (standard on modern OS), windows can reach 1 GB. Most OS auto-tune the window size, but may not optimize for high-BDP paths without configuration.