TCP Window Size Calculator
Size the TCP receive window for a given bandwidth and RTT, and find the window scale factor it needs.
About TCP Window Size Calculator
A sender may have at most one window of unacknowledged data outstanding, so the window has to cover everything the pipe holds for one round trip. The 16-bit window field stops at 65,535 bytes, so anything larger needs the RFC 7323 window scale option, which multiplies the advertised value by 2^shift. On any long fat pipe the window, not the link, sets the ceiling: a 64 KB window over 40 ms RTT tops out near 13 Mbit/s no matter how much bandwidth you bought.
Formulas
TCP Window Size
window = bandwidth × RTT ÷ 8, and the scale factor is ceil(log2(window ÷ 65535)).
- 65535
- Largest window the 16-bit header field can express
- window
- Receive window in bytes
- RTT
- Round-trip time in seconds
Throughput ceiling
throughput ceiling = window ÷ RTT
- window
- Advertised receive window in bits
- RTT
- Round-trip time in seconds
Worked example
With the default values below, TCP Window Size Calculator returns Required Window Size of 2 MiB. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Link bandwidthminimum 0.1 Mbit/s
- 500 Mbit/s
- Round-trip timeminimum 0.1 ms
- 40 ms
- Maximum segment sizeaccepts 88–9,000 bytes
- 1,460 bytes
Results
- Required Window Size
- 2 MiB
- Window Scale Factor (shift)
- 6
- Window Available With That Scale
- 4 MiB
- Throughput Ceiling Without Scaling
- 13.11 Mbit/s
- Segments In Flight
- 1,712
Step by step
- 1Values used
- 2TCP Window Size
- 3Throughput ceiling
- 4Required Window Size= 2,500,000
- 5Window Scale Factor (shift)= 6
- 6Window Available With That Scale= 4,194,240
- 7Throughput Ceiling Without Scaling= 13.11 Mbit/s
- 8Segments In Flight= 1,712
Assumptions and limits
- The result is derived only from the 3 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
How is TCP Window Size calculated?
window = bandwidth × RTT ÷ 8, and the scale factor is ceil(log2(window ÷ 65535)). A sender may have at most one window of unacknowledged data outstanding, so the window has to cover everything the pipe holds for one round trip. The 16-bit window field stops at 65,535 bytes, so anything larger needs the RFC 7323 window scale option, which multiplies the advertised value by 2^shift.
Why does TCP Window Size matter?
On any long fat pipe the window, not the link, sets the ceiling: a 64 KB window over 40 ms RTT tops out near 13 Mbit/s no matter how much bandwidth you bought.
What values do I need to enter?
This calculator takes 3 inputs: Link bandwidth, Round-trip time, Maximum segment size. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Why does a fast link still transfer slowly?
Because throughput is capped at window ÷ RTT. If the receive window or the socket buffer is small, a single TCP stream cannot fill the link regardless of its capacity — the fix is window scaling and larger buffers, not more bandwidth.
