MTU and MSS calculator for tunnels and VPNs

Enter the MTU of the underlying link and choose the encapsulation. The calculator subtracts the header overhead and shows the MTU to set on the tunnel interface, the TCP MSS to clamp to and the ping payload size that tests the path without fragmentation.

B
Tunnel runs over
Traffic inside
B
MTU inside1,440 B
TCP MSS1,400 B
Largest ping payload
1,412 B
Total overhead
60 B

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Enter the MTU of the link under the tunnel, usually 1500 for Ethernet.
  2. Choose the encapsulation and, for IP tunnels, whether the tunnel itself runs over IPv4 or IPv6.
  3. Choose the IP version of the traffic inside, and add extra bytes for VLAN tags (4 each) or MPLS labels (4 each) on the path.

Formulas

  • MTU inside = link MTU − overhead
  • Overhead: PPPoE 8; GRE outer IP + 4; IP-in-IP outer IP; WireGuard outer IP + 8 UDP + 32; VXLAN outer IP + 8 UDP + 8 VXLAN + 14 inner Ethernet. Outer IP is 20 bytes for IPv4, 40 for IPv6.
  • TCP MSS = MTU inside − IP header − 20
  • Ping payload = MTU inside − IP header − 8

Worked example

WireGuard over IPv4 on a 1500-byte link, IPv4 inside:

  • Overhead: 20 + 8 + 32 = 60 B.
  • MTU inside: 1,500 − 60 = 1,440 B.
  • TCP MSS: 1,440 − 20 − 20 = 1,400 B.
  • Largest ping payload: 1,440 − 20 − 8 = 1,412 B.

Tips

  • Clamp the MSS on the router when you cannot change every host: tools like iptables TCPMSS or nftables rewrite the MSS in SYN packets to the value above.
  • Headers without options are assumed. IPv4 options, IPv6 extension headers and TCP options such as timestamps take a few more bytes, so real segments are often slightly smaller.
  • Stacked tunnels add up. For WireGuard over PPPoE, enter 1492 as the link MTU.

Frequently asked questions

What MTU should I use for WireGuard?

On a 1500-byte link, WireGuard over IPv4 adds 60 bytes (20 IP + 8 UDP + 32 WireGuard), so 1440 fits. Over IPv6 it adds 80 bytes, giving 1420, which is why wg-quick uses 1420 by default: it works whichever IP version carries the tunnel.

What is the difference between MTU and MSS?

MTU is the largest IP packet a link carries, headers included. MSS is the largest TCP payload, so MSS = MTU − IP header − TCP header: 1500 − 20 − 20 = 1460 for IPv4, 1500 − 40 − 20 = 1440 for IPv6.

How do I test the path MTU with ping?

Send pings that must not be fragmented, with the payload this calculator shows: ping -M do -s 1472 host on Linux, ping -f -l 1472 host on Windows, for a 1500-byte path over IPv4. The payload is the MTU minus 28 bytes (20 IP + 8 ICMP). If it fails, lower the size until replies come back.

Why is PPPoE MTU 1492?

PPPoE puts a 6-byte PPPoE header and a 2-byte PPP protocol field inside each Ethernet frame, so 1500 − 8 = 1492 bytes are left for IP. The TCP MSS on such a line is 1452.

More in Developer

All tools in this category: Developer ·Updated November 7, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.