MSS Calculator
Calculate maximum segment size from MTU by subtracting TCP/IP header overhead.
About MSS Calculator
TCP's Maximum Segment Size is the largest chunk of application data a single TCP segment can carry, derived by subtracting IP and TCP header overhead from the path MTU — 20 bytes of IPv4 header plus 20 bytes of base TCP header (40 total), or 40 bytes of IPv6 header plus 20 bytes of TCP header (60 total). Real connections often carry TCP options (timestamps, SACK-permitted, window scale) that consume additional bytes within the TCP header space beyond the base 20, further reducing the usable MSS below the theoretical MTU-minus-40/60 figure.
Formula
Maximum Segment Size
MSS = MTU − 40 (IPv4) or MTU − 60 (IPv6); MSS_effective = MSS − TCP_options_bytes
- H_{ip}
- 20 (IPv4) or 40 (IPv6) bytes
- H_{tcp}
- 20 bytes base TCP header
Worked example
With the default values below, MSS Calculator returns MSS — Base (bytes) of 1,460. Change any input above and every figure here is recalculated in your browser.
Inputs used
- MTU (bytes)minimum 68
- 1,500
- IP Versionone of IPv4 (20-byte header), IPv6 (40-byte header)
- IPv4 (20-byte header)
- TCP Options Size (bytes)accepts 0–40
- 20
Results
- MSS — Base (bytes)
- 1,460
- MSS — With TCP Options (bytes)
- 1,440
- Base Header Overhead (bytes)
- 40
Step by step
- 1Values used
- 2Maximum Segment Size
- 3MSS — Base (bytes)= 1,460
- 4MSS — With TCP Options (bytes)= 1,440
- 5Base Header Overhead (bytes)= 40
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 whole numbers, 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 do I see the negotiated MSS for an active connection?
`ss -i` on an established TCP connection shows the negotiated `mss` value directly. `ip route show` can also display a per-route MSS clamp if one has been configured with `advmss`.
Why is MSS important beyond just fitting within MTU?
Setting MSS correctly (often via MSS clamping on routers/firewalls, e.g. for PPPoE or VPN links with reduced MTU) prevents TCP from sending segments that require IP fragmentation downstream — fragmented TCP segments are inefficient and, on paths with PMTUD black holes, can cause connections to hang entirely.
Do both ends of a TCP connection negotiate the same MSS?
No — MSS is advertised independently in each direction during the SYN/SYN-ACK handshake, based on each side's own outbound MTU, so a connection's send and receive MSS can differ if the path has asymmetric MTU constraints.
