Skip to main content

Subnet calculator

Comprehensive IPv4 (and basic IPv6) subnet workbench. Analyse a CIDR, check if an IP belongs to it, equal-split a parent block, run a VLSM allocation against a list of host requirements, aggregate scattered subnets into a supernet, convert an IP range to the minimum CIDR list, and swap between mask / wildcard / prefix formats. All math runs locally — nothing leaves the browser.

⚠ Disclaimer This tool is provided as-is, for educational and planning purposes only. Always cross-check subnetting decisions against the network design document and your IPAM (e.g. Men & Mice / Infoblox / phpIPAM) before committing changes. The Tech Space makes no warranty and accepts no liability. Full disclaimer →

1. Analyse a CIDR

Enter any IPv4 CIDR (or bare IP — assumes /32). Get network, broadcast, usable range, mask, wildcard, binary and hex.

2. Does this IP belong to this subnet?

Yes/no membership check with the math underneath. Helpful when troubleshooting ACL hits, firewall sources, route summarisation.

3. Equal-split a parent CIDR

Carve a parent CIDR into N equal subnets of the same size. Useful for VLAN groups, lab sub-allocations, anything where every child needs the same capacity.

4. VLSM allocator

Variable-length subnet masking. Enter the parent CIDR and a comma-separated list of host requirements (or one per line). The allocator sorts largest-first, picks the smallest subnet that fits each, and packs them sequentially from the start of the parent block.

5. Supernet / aggregate

Find the smallest single CIDR that contains all of your input subnets. Includes a "waste" figure — how many addresses the supernet covers that aren't in any input — handy for route-summarisation trade-offs.

6. IP range → minimum CIDR list

Cover an arbitrary IP range with the smallest set of properly-aligned CIDR blocks. Useful for firewall rules and ACL aggregation when you can't change the range.

7. Prefix / mask / wildcard converter

Pop any one of the three formats in and the other two compute live. Wildcard masks are used in Cisco ACLs (inverse of the subnet mask).

8. IPv6 subnet basics

IPv6 subnetting cheat: enter a prefix and a new (longer) prefix to split into, get the count of child subnets and the first / last few subnet addresses.

Reference

IPv4 CIDR cheat sheet

/MaskHostsWildcard

RFC 1918 private ranges

  • 10.0.0.0/8 16,777,216 addresses — single Class A block
  • 172.16.0.0/12 1,048,576 addresses — 16 contiguous Class B blocks
  • 192.168.0.0/16 65,536 addresses — 256 contiguous Class C blocks

Other notable IPv4 ranges

  • 100.64.0.0/10 CGNAT (RFC 6598) — used by carrier-grade NAT
  • 127.0.0.0/8 Loopback
  • 169.254.0.0/16 Link-local (APIPA) — failed DHCP fallback
  • 224.0.0.0/4 Multicast (Class D)
  • 240.0.0.0/4 Reserved (Class E) — don't use

Special-case prefixes

  • /31 Point-to-point links — RFC 3021 allows both addresses as usable (no network/broadcast). Saves IPs on transit links.
  • /32 Single host — used for loopback IPs, BGP next-hops, /32 routes.
  • /30 Classic point-to-point — 2 usable hosts. Legacy of pre-RFC 3021.

Common IPv6 prefixes

  • /32 Allocation to a RIR or large ISP
  • /48 Site allocation — typical enterprise customer
  • /56 Small site / residential — 256 × /64 subnets
  • /64 Standard subnet — SLAAC requires this
  • /127 P2P link (RFC 6164) — IPv6 equivalent of /31

References: RFC 1918 (private ranges) · RFC 3021 (/31 P2P) · RFC 6598 (CGNAT) · RFC 4291 (IPv6 addressing).