TCP MSS Calculator
Calculate TCP Maximum Segment Size from MTU for IPv4 or IPv6, compare the standard advertised MSS with actual payload capacity for custom TCP or IP header sizes, and measure packet header overhead.
—
—
—
What Is TCP MSS?
TCP MSS means Maximum Segment Size. It represents the maximum amount of TCP application data that a host is willing to receive in a single TCP segment. The MSS value does not include the IP header or TCP header.
TCP endpoints normally exchange an MSS option during the SYN phase of connection establishment.
TCP MSS Formula
For the common case with no unusual headers, TCP MSS can be estimated directly from the IP MTU.
IPv4:
MSS =
MTU
− 20-byte IPv4 header
− 20-byte TCP header
IPv6:
MSS =
MTU
− 40-byte IPv6 header
− 20-byte TCP headerIPv4 MSS for MTU 1500
MTU:
1500 bytes
IPv4 Header:
20 bytes
TCP Header:
20 bytes
TCP MSS:
1500 − 20 − 20
= 1460 bytesTherefore, 1460 bytes is the familiar TCP MSS associated with a standard 1500-byte IPv4 MTU.
IPv6 MSS for MTU 1500
MTU:
1500 bytes
IPv6 Header:
40 bytes
TCP Header:
20 bytes
TCP MSS:
1500 − 40 − 20
= 1440 bytesCommon TCP MSS Values
| Network | MTU | IP | Typical MSS |
|---|---|---|---|
| Ethernet | 1500 | IPv4 | 1460 |
| Ethernet | 1500 | IPv6 | 1440 |
| PPPoE | 1492 | IPv4 | 1452 |
| PPPoE | 1492 | IPv6 | 1432 |
| Jumbo MTU | 9000 | IPv4 | 8960 |
| Jumbo MTU | 9000 | IPv6 | 8940 |
TCP MSS vs MTU
MTU specifies the maximum complete IP packet size that can traverse a link without requiring a smaller packet. MSS instead represents only the TCP data portion.
IP Packet:
+-------------------+
| IP Header |
+-------------------+
| TCP Header |
+-------------------+
| TCP Data / MSS |
+-------------------+
MTU covers all three.
MSS covers only TCP data.TCP Header Options and Payload Capacity
The normal TCP header is 20 bytes, but its Data Offset field allows a TCP header as large as 60 bytes. Options such as timestamps can therefore reduce the amount of application data that fits into a specific MTU-sized packet.
MTU:
1500
IPv4 Header:
20
TCP Header with options:
32
Actual payload fitting this packet:
1500 − 20 − 32
= 1448 bytesThis calculator displays that packet payload capacity separately from the traditional MSS calculation so the two concepts are not confused.
IPv4 Options and MSS
An IPv4 header can be longer than the usual 20 bytes when options are present. That also reduces the amount of TCP application data that can fit inside a packet of a fixed total size.
MTU:
1500
Actual IPv4 Header:
24
Actual TCP Header:
20
Packet payload capacity:
1500 − 24 − 20
= 1456 bytesIPv6 Extension Headers
IPv6 starts with a fixed 40-byte base header, but extension headers can appear between the IPv6 header and TCP. Those bytes consume packet space and can therefore reduce the TCP payload that fits in a specific packet.
You can represent such additional IPv6 header overhead by increasing the Actual IP Header Length field in this calculator.
TCP MSS Clamping
MSS clamping changes the advertised TCP MSS so endpoints avoid creating TCP segments that would be too large for a known path MTU. It is often encountered on networks involving tunnels, VPNs or PPPoE where the available IP MTU is smaller than ordinary Ethernet.
Example:
Path MTU:
1400
IPv4:
MSS =
1400 − 20 − 20
= 1360Peer Advertised MSS
The MSS advertised by the receiving TCP endpoint limits how much TCP data the sender should place in one segment toward that peer.
Local path-based MSS:
1460
Peer advertised MSS:
1360
Effective sending limit:
min(1460, 1360)
= 1360The calculator includes an optional Peer MSS field to make this comparison.