IP Subnet & VLSM Calculator

MAG212 CYBER · Tools

IP subnet & VLSM calculator.

Type any IPv4 address with a prefix, mask or wildcard. Get the network, broadcast, host range, binary view and ready-to-paste Cisco commands — then carve a block into right-sized subnets.

Subnet calculator

Accepts 10.20.20.77/26, 10.20.20.77 255.255.255.192 or a Cisco wildcard such as 10.20.20.0 0.0.0.63.

Try:

Enter an IPv4 address followed by /prefix (0–32), a subnet mask, or a wildcard mask.

Binary view — network bits · host bits

Cisco IOS / IOS XE snippets


The interface example uses the address you typed when it is a usable host, otherwise the first usable address. OSPF and ACLs use wildcard masks — learn more in the OSPF cheat sheet.

VLSM planner

Give a parent block and one line per subnet (name hosts). Subnets are allocated largest-first so every block lands on a valid boundary with no overlap.

Quick reference

PrefixSubnet maskWildcardUsable hosts
/8255.0.0.00.255.255.25516,777,214
/12255.240.0.00.15.255.2551,048,574
/16255.255.0.00.0.255.25565,534
/17255.255.128.00.0.127.25532,766
/18255.255.192.00.0.63.25516,382
/19255.255.224.00.0.31.2558,190
/20255.255.240.00.0.15.2554,094
/21255.255.248.00.0.7.2552,046
/22255.255.252.00.0.3.2551,022
/23255.255.254.00.0.1.255510
/24255.255.255.00.0.0.255254
/25255.255.255.1280.0.0.127126
/26255.255.255.1920.0.0.6362
/27255.255.255.2240.0.0.3130
/28255.255.255.2400.0.0.1514
/29255.255.255.2480.0.0.76
/30255.255.255.2520.0.0.32
/31255.255.255.2540.0.0.12 (point-to-point, RFC 3021)
/32255.255.255.2550.0.0.01 (host route)
Remember: usable hosts = 2(32 − prefix) − 2, because the network and broadcast addresses can’t be assigned. Exceptions: /31 gives two usable addresses on point-to-point links (RFC 3021) and /32 identifies a single host, such as a loopback.

🔒 Every calculation runs in your browser. Nothing you type is sent or stored.

⚖️ For education and use on systems you own or are authorised to test. Results are automated guidance, not a professional audit. See our terms of use and privacy policy.

Need expert help?

MAG212 CYBER offers network and cybersecurity consultation, plus security seminars for organisations around the world.

Explore our services →