Skip to content
ENExplore Calculators

TCP Window Size Calculator

Calculate optimal TCP window size from bandwidth-delay product for maximum throughput.

About TCP Window Size Calculator

To fully utilize a network link, the TCP window must be at least as large as the bandwidth-delay product (BDP) — the amount of data that can be in flight before the first acknowledgment returns. The base TCP header only supports a 16-bit window field, capping it at 65,535 bytes, so any link with a BDP above that threshold needs the TCP window scaling option (RFC 1323), which the Linux kernel enables by default via net.ipv4.tcp_window_scaling.

Formula

Bandwidth-delay product

window = bandwidth × RTT

B
bandwidth in bytes/sec
T
round-trip time in seconds

Worked example

With the default values below, TCP Window Size Calculator returns Optimal Window (Bandwidth-Delay Product) of 10,000,000. Change any input above and every figure here is recalculated in your browser.

Inputs used

Link Bandwidthminimum 0 Mbps
1,000 Mbps
Round-Trip Time (RTT)minimum 0 ms
80 ms

Results

Optimal Window (Bandwidth-Delay Product)
10,000,000 bytes
Optimal Window
9,765.63 KB
TCP Window Scaling Required
true
Recommended Scale Factor
8
Max Window With Scale Factor
16,776,960 bytes

Step by step

  1. 1Values used
  2. 2Bandwidth-delay product
  3. 3Optimal Window (Bandwidth-Delay Product)= 10,000,000 bytes
  4. 4Optimal Window= 9,765.63 KB
  5. 5TCP Window Scaling Required= Yes
  6. 6Recommended Scale Factor= 8
  7. 7Max Window With Scale Factor= 16,776,960 bytes

Assumptions and limits

  • The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

What happens if the TCP window is smaller than the bandwidth-delay product?

Throughput gets capped well below the link's actual capacity, because the sender must stop and wait for acknowledgments before the pipe is full — this is the classic 'long fat network' problem on high-bandwidth, high-latency links.

Is TCP window scaling enabled by default on Linux?

Yes, modern Linux kernels enable window scaling by default (net.ipv4.tcp_window_scaling = 1), and it is negotiated automatically during the TCP handshake if both endpoints support it.

How do I tune the actual buffer sizes on Linux?

The relevant sysctls are net.core.rmem_max/wmem_max (system-wide caps) and net.ipv4.tcp_rmem/tcp_wmem (min/default/max per-socket buffer sizes) — set the max values at or above your calculated optimal window for the link.

TCP Window Size Calculator (Networking) | Calcrivo