Calculate optimal TCP window sizes based on bandwidth-delay product. Optimize network throughput for high-latency links.
On long-distance (high-latency) networks, a TCP connection often runs far slower than the link can support — not because of bandwidth, but because the default window size limits how much data can be in flight at once. This calculator computes the optimal TCP window size and the underlying bandwidth-delay product, then gives you OS-specific commands to apply the tuning.
The core concept is the bandwidth-delay product (BDP): the amount of data that can be "on the wire" at any moment.
The TCP window must be at least as large as the BDP to keep the pipe full. If the window is smaller, the sender stalls waiting for acknowledgments before it can transmit more — leaving most of the bandwidth unused. This is why a fast WAN link can feel sluggish for a single large transfer.
Default OS buffer sizes were tuned for typical LAN-scale latency. Across continents or over satellite, the RTT climbs and the required window grows well beyond those defaults, so you must raise the socket buffer (receive/send) limits to realize the link's full throughput. Window scaling (RFC 1323) must also be enabled to allow windows above 64 KB.
The calculator outputs commands for Linux (sysctl net.ipv4.tcp_rmem/wmem), Windows (netsh autotuning), and macOS so you can set buffers that match your BDP. Apply changes on both ends of the connection — a large receive buffer on one side does nothing if the other side's send buffer is small.
All math runs locally in your browser from the bandwidth and latency values you enter; nothing is sent to a server. For the addressing side of network planning, the Subnet Calculator is a useful companion.
Calculate optimal TCP window size for your network conditions to maximize throughput.
Window Size = Bandwidth × Round Trip Time
The bandwidth-delay product is the amount of data that can be in transit on a network path at any given time. It is calculated by multiplying the link bandwidth by the round-trip time (RTT). Understanding your BDP is essential because your TCP window size must be at least equal to the BDP to fully utilize your available bandwidth.
TCP window scaling is an extension that allows window sizes larger than 64 KB. It is required when your BDP exceeds 64 KB, which is common on high-bandwidth or high-latency links. Without window scaling enabled, your throughput will be severely limited regardless of your actual bandwidth.
Packet loss significantly reduces TCP throughput because the protocol must retransmit lost packets and reduce its sending rate. The Mathis formula shows that throughput is roughly proportional to 1 divided by the square root of the loss rate. Even a 1 percent loss rate can reduce throughput to a fraction of the available bandwidth.
MTU (Maximum Transmission Unit) is the largest packet size that can be sent on a network link, typically 1500 bytes for Ethernet. MSS (Maximum Segment Size) is the largest amount of TCP data that can fit in a packet after subtracting IP and TCP headers. For IPv4 with standard headers, MSS equals MTU minus 40 bytes.
Each operating system has different commands for TCP tuning. On Linux, use sysctl commands to adjust tcp_rmem and tcp_wmem values. On Windows, use netsh interface tcp commands to configure auto-tuning levels. On macOS, use sysctl to modify net.inet.tcp settings. The Buffer Tuning tab provides specific commands for each OS.
BBR (Bottleneck Bandwidth and Round-trip propagation time) is recommended for high-latency or lossy networks as it adapts better to real-world conditions. CUBIC is the default on most Linux systems and works well for general use. The Congestion Control tab helps you choose the right algorithm based on your network characteristics and operating system.