MTU, MSS and Packet Fragmentation Calculator
Estimate TCP segments or UDP/IPv4 fragments and header overhead from IP-layer MTU and header lengths.
TCP assumes the same header length for every segment. UDP/IPv4 uses a 20-byte IP header and an 8-byte UDP header.
Results
—packets
—%
- MTU-based TCP MSS estimate
- —bytes
- Maximum payload per TCP segment
- —bytes
- IP payload length of first fragment
- —bytes
- IP payload length of last fragment
- —bytes
- Total IP and TCP/UDP header bytes
- —bytes
- Total transmitted IP bytes
- —bytes
Results update automatically when the required values are entered.
Method, applicability and sources
Calculation method
TCP: MSS estimate=MTU−fixed IP header (IPv4 20/IPv6 40)−fixed TCP header 20. Payload capacity=MTU−actual IP header−actual TCP header. For positive payload size, segments=ceil(payload size/capacity); for 0 bytes, segments=0. UDP/IPv4: datagram IP payload length=UDP payload+8. If this exceeds MTU−20 and DF=0, each nonfinal fragment carries floor((MTU−20)/8)×8 bytes and the last fragment carries the remainder. If DF=1 and the limit is exceeded, transmission is not possible. Transmitted IP bytes=payload size+sum of all IP header lengths+sum of TCP/UDP header lengths. Payload efficiency=payload size/transmitted IP bytes×100, undefined when 0 bytes are transmitted.
Worked example (hypothetical values)
TCP/IPv4 with MTU 1500 bytes, IP and TCP headers of 20 bytes each, and payload 3000 bytes gives MSS estimate 1460 bytes, 3 segments, 3120 transmitted IP bytes, and payload efficiency 96.1538%. For UDP/IPv4 with the same MTU and payload, the 3008-byte IP payload splits into 1480+1480+48 bytes: 3 fragments and 3068 transmitted bytes.
Applicability and limitations
Design checks for TCP with known path MTU and header lengths, or for a single UDP/IPv4 datagram. Excludes the peer's advertised MSS, Path MTU Discovery, TCP send/receive windows, delayed ACKs, retransmissions and control packets, IPv6 fragmentation, IP extension headers, IPv4 options in UDP mode, and tunnel, TLS, Ethernet, or other overhead.
Methods used
- TCP/IPv4 and TCP/IPv6 (RFC 9293/6691/8200): scope Arithmetic using the IP-layer limit and a fixed header length for every TCP segment; region Global
- UDP/IPv4 (RFC 791/768): scope No IPv4 options; 1 UDP datagram; DF=0/1; region Global
Method and sources
Method: RFC 9293 §3.7.1 (2022), RFC 6691 §2 (2012), RFC 791 §2.3 and §3.1 (1981), RFC 768 (1980), RFC 8200 §5 and §8.3 (2017). Data recorded: 2026-11-13.