ops@toolbox:~$ ipcalc --advanced

Subnet Calculator

Advanced IPv4 CIDR calculator: network details, visual subnet bar, subnet splitter, and find-prefix-by-host-count. Everything runs locally.

Divide a network block into equal subnets of a longer prefix.

Enter the number of hosts you need, get the smallest CIDR that fits, with options.

PrefixNetmaskAddressesUsable hostsUse case
/8255.0.0.016,777,21616,777,214Class A block
/16255.255.0.065,53665,534Class B block / large campus
/20255.255.240.04,0964,094Large VPC subnet
/21255.255.248.02,0482,046Large segment
/22255.255.252.01,0241,022Medium segment
/23255.255.254.0512510Medium segment
/24255.255.255.0256254Typical LAN / VLAN
/25255.255.255.128128126Half a /24
/26255.255.255.1926462Quarter of a /24
/27255.255.255.2243230Small server segment
/28255.255.255.2401614Small subnet
/29255.255.255.24886Tiny subnet / DMZ
/30255.255.255.25242Point-to-point link
/31255.255.255.25422P2P: RFC 3021 (both usable)
/32255.255.255.25511Single host / loopback route

CIDR in thirty seconds

The /26 in 192.168.1.130/26 says the first 26 bits identify the network, leaving 6 bits for hosts: 26 = 64 addresses, of which 62 are usable once the network and broadcast addresses are reserved. Widening the prefix by one bit doubles the block; that's the whole system. The calculator shows the binary mask precisely because seeing 11111111.11111111.11111111.11000000 once makes the arithmetic stop feeling like magic.

Numbers worth keeping in your head

Most day-to-day work uses a handful of sizes: a /24 is 254 usable hosts, a /25 is 126, a /26 is 62, a /27 is 30, a /28 is 14, and a /30 is 2, the classic point-to-point link. Modern gear also supports /31 for point-to-point (RFC 3021), where both addresses are usable and nothing is wasted; the calculator handles that special case correctly.

Subnet splitting

The Split tab answers "I have a /22, how do I carve it into /25s?" It lists every child subnet with its network address, broadcast, and host range. Useful when allocating VLANs, planning AWS VPC subnets, or documenting an IP scheme. The tool caps output at 256 rows to stay fast; for very large splits only the structure is meaningful anyway.

Find prefix by host count

The Find Prefix tab answers the other common question: "I need 50 hosts, what prefix do I use?" It recommends the smallest block that fits and shows the trade-offs of going one size larger (wasted addresses vs. room to grow). Always add a generous buffer: the gateway, VRRP/HSRP address, monitoring, future VMs, and the inevitable exceptions eat your headroom faster than expected.

Wildcard masks

The wildcard row is the netmask inverted, 0.0.0.63 for a /26, and exists because Cisco ACLs and OSPF network statements use wildcards rather than netmasks. If you write firewall rules on that ecosystem, copying the wildcard straight from here avoids the mental inversion step where off-by-one errors love to live.

RFC address space annotations

The RFC annotation row tells you which special-purpose range your network falls in: RFC 1918 private, RFC 6598 CGNAT (100.64.0.0/10), loopback (127.0.0.0/8), link-local (169.254.0.0/16), documentation ranges, or multicast. Knowing you're in CGNAT space matters when you're troubleshooting NAT hairpin issues behind a carrier-grade device.

Related tools

Common Ports Reference
Searchable table of the network ports sysadmins actually meet, with notes.
IPv6 Calculator
Expand, compress and subnet IPv6 addresses: network, range and address count.
IP Range โ†’ CIDR Converter
Convert an IPv4 address range into the minimal list of CIDR blocks.
Firewall Rule Builder
Build iptables, nftables and ufw rules with a GUI and get copy-ready commands instantly.