IPv4 Fragmentation Utility

IP Fragmentation Calculator

Calculate how an IPv4 packet is fragmented across a smaller MTU. Find the maximum fragment payload, fragment count, fragment offsets, MF flags, per-fragment total length and final transmitted size.

✓ MTU ✓ Fragment Offset ✓ MF / DF ✓ 8-Byte Alignment ✓ Header Length ✓ Fragment Table
IPv4
IP Fragmentation Calculation
● Ready
Total IPv4 packet length in bytes, including the original IP header.
Maximum IPv4 packet size that can be carried by the outgoing link.
IPv4 IHL can represent header sizes from 20 through 60 bytes.
Usually 0 for an original datagram. Value is entered in IPv4 8-byte offset units.
Useful when calculating re-fragmentation of an already fragmented IPv4 packet.
IPv4 offset rule: Fragment Offset is measured in units of 8 bytes. Therefore, every fragment except the final fragment must carry an information payload whose length is a multiple of 8 bytes.
IPv4 Fragmentation Result Calculated
Fragmentation Summary
Original Packet
Original Payload
MTU
IP Header
Max Raw Payload
Aligned Payload
Fragment Count
Final Fragment
Largest Fragment
Total Headers
Total Transmitted
Fragmentation Status
# Payload Bytes Total Length Offset Units Offset Bytes MF DF Payload Range
Calculation Breakdown
Validation

What Is IPv4 Fragmentation?

IPv4 fragmentation occurs when an IP datagram is larger than the Maximum Transmission Unit of the outgoing link and fragmentation is permitted. The original datagram payload is divided into smaller pieces, and each piece receives its own IPv4 header.

The destination uses fields such as Identification, Fragment Offset and the More Fragments flag to reassemble the pieces into the original datagram.

IPv4 Fragmentation Formula

Original Payload = Original Packet Size − IPv4 Header Length Maximum Raw Fragment Payload = MTU − IPv4 Header Length Maximum Non-final Payload = floor(Max Raw Payload / 8) × 8

The multiple-of-eight rounding is necessary because the IPv4 Fragment Offset field stores offsets in eight-byte units.

Example: 4000-Byte IPv4 Packet with MTU 1500

Assume a normal 20-byte IPv4 header.

Original Packet: 4000 bytes Header: 20 bytes Original Payload: 4000 − 20 = 3980 bytes MTU: 1500 bytes Maximum Raw Payload: 1500 − 20 = 1480 bytes 1480 is divisible by 8. Fragments: Fragment 1: Payload = 1480 Offset = 0 MF = 1 Total = 1500 Fragment 2: Payload = 1480 Offset = 1480 / 8 = 185 MF = 1 Total = 1500 Fragment 3: Payload = 1020 Offset = 2960 / 8 = 370 MF = 0 Total = 1040

IPv4 Fragment Offset

Fragment Offset is a 13-bit field that identifies where a fragment’s data belongs within the original datagram payload.

Fragment Offset Field = Payload Byte Offset / 8 Example: Payload begins at byte 1480 1480 / 8 = 185 Fragment Offset = 185

Why Must Fragment Payload Be a Multiple of 8?

The offset field does not store an arbitrary byte position. Instead, one offset unit represents eight payload bytes. Consequently, all fragments that have another fragment after them must end on an eight-byte boundary.

The final fragment does not need its payload length to be divisible by eight, because no later fragment needs to begin after it.

IPv4 MF Flag

MF means More Fragments. It indicates whether another fragment follows the current fragment.

MF Meaning
0No more fragments follow
1Additional fragments follow

For a newly fragmented datagram, every fragment except the last normally has MF=1.

IPv4 DF Flag

DF means Don’t Fragment. If DF is set and the IPv4 packet is larger than the outgoing MTU, a router cannot fragment the packet normally.

Packet: 2000 bytes MTU: 1500 bytes DF: 1 Result: Fragmentation prohibited

In normal IPv4 forwarding this condition can lead to an ICMP Destination Unreachable message indicating that fragmentation was needed.

IPv4 Header Overhead After Fragmentation

Fragmentation increases transmitted bytes because every fragment receives its own IPv4 header.

Original packet: 4000 bytes Original header: 20 bytes 3 fragments: 3 × 20 = 60 header bytes Extra header overhead: 60 − 20 = 40 bytes Total fragmented transmission: 3980 payload + 60 headers = 4040 bytes

IPv4 Fragmentation and MTU

The MTU determines the largest IP datagram that can cross a link without fragmentation at that link layer. Ethernet commonly has an MTU of 1500 bytes, although other values are possible.

The MTU applies to each resulting IP fragment’s complete IP packet size, including its IPv4 header.

Re-fragmenting an Existing Fragment

An IPv4 fragment can itself be fragmented again if it encounters a smaller MTU. In that case the new fragment offsets must remain relative to the original datagram, not relative merely to the fragment being split.

Existing offset units: 100 Existing byte offset: 100 × 8 = 800 bytes New fragment data begins 400 bytes later: New byte offset: 800 + 400 = 1200 New offset units: 1200 / 8 = 150

The calculator’s Existing Fragment Offset field can be used for this scenario.

Maximum IPv4 Fragment Offset

The IPv4 Fragment Offset field contains 13 bits.

Maximum field value: 2^13 − 1 = 8191 Maximum represented byte offset: 8191 × 8 = 65,528 bytes

Other IPv4 length constraints also apply, including the 16-bit Total Length field.

IP Fragmentation Calculator FAQs

How do I calculate IPv4 fragment size?
Subtract the IPv4 header length from the MTU. For every non-final fragment, round that payload capacity down to the nearest multiple of eight bytes.
How is IPv4 Fragment Offset calculated?
Divide the fragment’s payload starting byte position within the original datagram by eight.
Why is the fragment offset divided by 8?
The 13-bit IPv4 Fragment Offset field is defined in eight-byte units so it can represent a larger payload position than a simple 13-bit byte offset.
Does the last IPv4 fragment have to be divisible by 8?
No. Only fragments that are followed by additional fragment data need their payload length to end on an eight-byte boundary.
What does MF=1 mean?
MF=1 means More Fragments; additional fragment data belonging to the datagram follows.
What happens when DF=1 and the packet is larger than the MTU?
Normal IPv4 fragmentation is prohibited, so the packet cannot simply be split to fit that link MTU.
Does each IPv4 fragment have its own header?
Yes. Every resulting fragment is itself an IPv4 packet and therefore includes an IPv4 header.
Does this calculator support IPv6 fragmentation?
No. This calculator solves IPv4 fragmentation. IPv6 fragmentation uses a different mechanism involving the IPv6 Fragment extension header.
Scroll to Top