← field notes

Subnet Calculator: IPv4, IPv6, Splitting and VLSM

Sarooj Zawahir21 October 2026interactive tool

  • Networking

Subnetting comes up in a network engineer's life almost every day: planning a new VLAN, reading a firewall rule, checking why two hosts cannot see each other, or carving a block into links and server networks. The arithmetic is simple, but it is easy to slip by one bit under pressure. This page does the calculation instantly for IPv4 and IPv6, splits networks, plans VLSM allocations, and shows the binary behind every answer so you can check your own working instead of just copying a result.

IPv4 calculator

Type an address with a prefix (10.20.30.40/22), with a mask (10.20.30.40 255.255.252.0) or with a wildcard (10.20.30.40 0.0.3.255). Drag the slider, or click any bit below, to move the boundary between network and host.

/0/32
network bitshost bitsclick a bit to move the boundary

Split a network

Divide the network above into equal, smaller subnets. The subnet that contains your address is highlighted.

#NetworkUsable rangeBroadcastHosts

VLSM planner

Variable-length subnet masking gives each segment only the space it needs. List the segments and how many hosts each must hold; the planner allocates the largest first so every subnet stays aligned on its boundary, and shows how much of the block is left.

SegmentNeedsSubnetUsable rangeBroadcastUsableSpare

IPv6 calculator

IPv6 subnetting is mostly about prefixes on nibble (4-bit) boundaries: a site often receives a /48, every LAN gets a /64. Enter any IPv6 address with a prefix; shortened forms and embedded IPv4 (::ffff:192.0.2.1) are accepted.

/0/128

How subnetting works

An IPv4 address is 32 bits. The prefix length says how many of those bits, counted from the left, identify the network; the rest identify a host on that network. The subnet mask is the same thing written as an address: ones for network bits, zeros for host bits. A /26 is 26 ones followed by 6 zeros, which is 255.255.255.192.

To find the network, the device performs a bitwise AND of the address and the mask: every host bit is forced to zero. Setting every host bit to one instead gives the broadcast address. Everything in between is usable for hosts, so a subnet with h host bits holds 2h addresses and 2h − 2 usable hosts.

The block-size shortcut

You rarely need the binary in your head. Find the octet where the mask is neither 255 nor 0 (the “interesting” octet) and subtract its value from 256: that is the block size, and networks start at every multiple of it. For 192.168.10.37/26 the mask is 255.255.255.192, the block size is 256 − 192 = 64, so the networks in the last octet are .0, .64, .128 and .192. The address .37 falls in the first one: network 192.168.10.0, broadcast 192.168.10.63, hosts .1 to .62.

Wildcard masks

Access lists and OSPF network statements on many platforms use a wildcard mask, the inverse of the subnet mask: zeros mean “must match”, ones mean “any value”. The wildcard for 255.255.255.192 is 0.0.0.63. Subtract each octet of the mask from 255 to get it, or let the calculator above do it.

Cheat sheet

Every prefix from /8 to /32 with its mask, wildcard and size.

PrefixSubnet maskWildcardAddressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

Special-purpose ranges

Ranges the calculator recognises and labels, with the RFC that defines each one.

RangePurposeDefined in
0.0.0.0/8“This network”RFC 791
10.0.0.0/8PrivateRFC 1918
100.64.0.0/10Shared address space (carrier-grade NAT)RFC 6598
127.0.0.0/8LoopbackRFC 1122
169.254.0.0/16Link-local (APIPA)RFC 3927
172.16.0.0/12PrivateRFC 1918
192.0.0.0/24IETF protocol assignmentsRFC 6890
192.0.2.0/24Documentation (TEST-NET-1)RFC 5737
192.168.0.0/16PrivateRFC 1918
198.18.0.0/15BenchmarkingRFC 2544
198.51.100.0/24Documentation (TEST-NET-2)RFC 5737
203.0.113.0/24Documentation (TEST-NET-3)RFC 5737
224.0.0.0/4MulticastRFC 5771
240.0.0.0/4ReservedRFC 1112
255.255.255.255/32Limited broadcastRFC 919
fe80::/10IPv6 link-localRFC 4291
fc00::/7IPv6 unique local (ULA)RFC 4193
2001:db8::/32IPv6 documentationRFC 3849
ff00::/8IPv6 multicastRFC 4291

The calculator runs entirely in your browser; nothing you type is sent anywhere.

share this note

LinkedIn WhatsApp X Email