Subnet Calculator

IPv4 Network Planning & Analysis
Any Class
Class A (/8 - /15)
Class B (/16 - /23)
Class C (/24 - /30)
Quick:
Common:
2 subnets
4 subnets
8 subnets
16 subnets
32 subnets
64 subnets
128 subnets
256 subnets
CIDR Quick Reference
CIDR Subnet Mask Wildcard Total IPs Usable Hosts Notes
Subnet Design Quick Tips
RFC 1918 Private Ranges
10.0.0.0/8 — Class A, 16M hosts
172.16.0.0/12 — Class B, 1M hosts
192.168.0.0/16 — Class C, 65K hosts
Point-to-Point Links (/31)
RFC 3021 allows /31 for P2P links with 2 usable IPs and no broadcast. Use for router-to-router connections to save address space.
Host Routes (/32)
A /32 represents a single host. Used for loopback addresses, specific route entries, and ACL rules.
Common Subnet Boundaries
/24 = 256 IPs (254 usable)
/25 = 128 IPs (126 usable)
/26 = 64 IPs (62 usable)
/27 = 32 IPs (30 usable)
/28 = 16 IPs (14 usable)
VLSM Best Practice
When using Variable Length Subnet Masks, always allocate larger subnets first to avoid fragmentation and wasted address space.
Reserved Addresses
Network address (first) and broadcast (last) are reserved in standard subnets. Gateway typically uses first or last usable IP.
Growth Planning
Allocate 50-100% more addresses than currently needed. Moving to a larger subnet later requires renumbering all devices.
Documentation
Document all subnet allocations including: VLAN ID, purpose, gateway IP, DHCP range, and static reservations.
Supernetting (CIDR)
Combine contiguous networks into one route. E.g., four /24s can be summarized as one /22 if aligned on /22 boundary.
Special IPs to Avoid
127.0.0.0/8 — Loopback
169.254.0.0/16 — APIPA/Link-local
224.0.0.0/4 — Multicast
Subnet Zero
Modern networks allow "subnet zero" (first subnet). Enable ip subnet-zero on older Cisco devices if needed.
DHCP Scope Sizing
Reserve 10-20% of addresses for static assignments (servers, printers, network devices). Place DHCP pool after statics.
Additional Tools

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation is a compact way to specify an IP address and its associated subnet mask. It appends a slash and a number to the IP address (e.g., 192.168.1.0/24), where the number indicates how many bits of the address are used for the network portion. A /24 means the first 24 bits are the network, leaving 8 bits for host addresses (254 usable hosts).

What is VLSM and why does it matter?

VLSM (Variable Length Subnet Masking) allows you to divide a network into subnets of different sizes, rather than using a single subnet mask for the entire network. This is critical for efficient IP address allocation — for example, a point-to-point link only needs a /30 (2 hosts), while a LAN might need a /22 (1,022 hosts). VLSM prevents wasting large address blocks on small segments.

What is a subnet mask?

A subnet mask is a 32-bit number that divides an IP address into the network portion and the host portion. For example, 255.255.255.0 (or /24) means the first three octets identify the network and the last octet identifies individual hosts. Subnet masks are essential for routing — they tell devices which addresses are on the local network versus which need to be sent through a gateway.