What is the MTU & MSS Calculator?
This tool converts a network's Maximum Transmission Unit (MTU) into the Maximum Segment Size (MSS) used by TCP. The MTU is the largest packet (in bytes) a link can carry; the MSS is how much actual TCP payload fits inside that packet after the IP and TCP headers are removed. Getting MSS right avoids fragmentation, retransmissions and the dreaded "PMTUD black hole" that stalls connections.
How to use it
Enter your link's MTU (1500 is the Ethernet default), choose IPv4 (20-byte base header) or IPv6 (40-byte base header), and optionally add bytes for IP options or TCP options such as timestamps and SACK (commonly 12 bytes). The calculator subtracts the total header overhead and returns the MSS in bytes.
The formula explained
The relationship is simply \(\text{MSS} = \text{MTU} - \text{IP header} - \text{TCP header}\). A standard TCP header is 20 bytes. A standard IPv4 header is also 20 bytes, so the classic shortcut is \(\text{MSS} = \text{MTU} - 40\). IPv6 uses a 40-byte fixed header, giving \(\text{MSS} = \text{MTU} - 60\). Any negotiated options add to the relevant header and reduce the payload further.
$$\text{MSS} = \text{MTU} - \left(20 + \text{IP Options}\right) - \left(20 + \text{TCP Options}\right)$$
Worked example
On standard Ethernet the MTU is 1500 bytes. With IPv4: IP header = 20, TCP header = 20, total overhead = 40. So $$\text{MSS} = 1500 - 40 = \mathbf{1460 \text{ bytes}}.$$ If TCP timestamps add 12 bytes of options, the TCP header becomes 32 and MSS drops to $$\text{MSS} = 1500 - 20 - 32 = \mathbf{1448 \text{ bytes}}.$$
FAQ
Why is my MSS often 1460? Because most links use a 1500-byte MTU and the standard 40 bytes of IPv4+TCP headers leave 1460 bytes for data.
Does MSS include the headers? No. MSS is strictly the TCP payload size; the IP and TCP headers are added on top of it to form the full packet.
What about PPPoE or tunnels? Encapsulation (PPPoE adds 8 bytes, giving MTU 1492; VPNs add more) lowers the effective MTU. Enter that reduced MTU here to get the correct MSS.