Calculators2026-05-10

IP Subnet Calculator: Master CIDR Notation, Subnet Masks, and Network Planning

IP subnetting is the art of dividing a network address space into smaller, manageable segments — and it remains one of the most tested (and most feared) topics on networking certification exams for good reason. Every packet that traverses the internet is routed based on subnet calculations performed by routers in real time: does this destination IP belong to my local network, or must I forward it upstream? A subnet calculator answers this question instantly by showing you the network address, broadcast address, usable host range, total host count, and wildcard mask for any IP and CIDR prefix combination. Whether you're setting up a home lab with 192.168.1.0/24, provisioning an AWS VPC with a 10.0.0.0/16 CIDR block, configuring Docker bridge networks, or studying for your CCNA, our free online IP subnet calculator handles IPv4 subnetting with visual breakdowns and supports IPv6 prefix calculations.

lan

IP / Subnet Calculator

Free · No registration

Try this tool for free →open_in_new

Step-by-Step Guide

1

Enter an IP Address and CIDR Prefix

Type any valid IPv4 address (e.g., 192.168.1.100) and a CIDR prefix length from /0 to /32 (e.g., /24). The CIDR notation combines the network address and the number of bits in the network portion: /24 means the first 24 bits are the network, leaving 8 bits for hosts (2⁸−2 = 254 usable addresses). The calculator also accepts traditional subnet mask notation (255.255.255.0) and converts it to CIDR automatically.

2

Review the Complete Subnet Breakdown

Result cards display every subnet property simultaneously: Network Address (the base of the subnet, e.g., 192.168.1.0), Broadcast Address (the all-ones host address, e.g., 192.168.1.255), Usable Host Range (first to last assignable IP, e.g., 192.168.1.1 - 192.168.1.254), Total Hosts (2^(32-prefix)), Usable Hosts (total minus 2 for network and broadcast), Subnet Mask in dotted-decimal and hex, and Wildcard Mask (inverse of subnet mask, used in ACLs and OSPF).

3

Explore Subnet Visualisation and Splitting

A visual bar divides the 32-bit address space into network and host portions at the selected prefix boundary. The "Subdivide" feature shows how a larger block can be split into smaller subnets: a /24 can become two /25s (128 hosts each), four /26s (64 hosts each), or eight /27s (32 hosts each). For each division, the calculator shows the exact network address, range, and broadcast address — essential for VLSM (Variable Length Subnet Masking) planning.

Tips & Best Practices

check_circle

Memorise the CIDR-to-mask mapping for common prefixes: /8 = 255.0.0.0 (class A, 16.7M hosts), /16 = 255.255.0.0 (class B, 65,534 hosts), /24 = 255.255.255.0 (class C, 254 hosts). Between these, each increment in prefix length doubles or halves the number of subnets and hosts: /25 has 128 addresses, /26 has 64, /27 has 32, /28 has 16, /29 has 8, /30 has 4 (exactly 2 usable — for point-to-point links).

check_circle

Private IP ranges (RFC 1918) are not routable on the public internet. They exist for internal networks: 10.0.0.0/8 (a single class A block with 16.7 million addresses — ideal for large enterprises), 172.16.0.0/12 (16 class B blocks from 172.16.0.0 to 172.31.255.255 — ideal for mid-size deployments), and 192.168.0.0/16 (256 class C blocks — ideal for home and small office networks).

check_circle

AWS VPC networking: the smallest VPC CIDR is /28 (16 addresses, AWS reserves 5 per subnet, leaving 11 usable). The largest is /16 (65,536 addresses). Subnets within a VPC cannot overlap. Leave room in your CIDR allocation for future subnets — a /24 VPC fills up faster than you think when you add RDS instances, Lambda ENIs, and load balancer nodes.

check_circle

Docker's default bridge network uses 172.17.0.0/16. Docker Compose creates a new network per project on 172.18.0.0/16, 172.19.0.0/16, etc. If your corporate VPN or office network also uses the 172.16.0.0/12 range, you'll get routing conflicts. Know your subnets before troubleshooting connectivity.

check_circle

VLSM (Variable Length Subnet Masking) lets you divide a network into differently sized subnets rather than equal slices. Start with the largest required subnet (by host count), allocate the smallest CIDR block that fits it, then move the starting address past that block for the next largest subnet. This conserves address space — critical for IPv4 given the exhaustion of unallocated addresses.

check_circle

The /31 prefix (RFC 3021) is a special case for point-to-point links: it has exactly 2 addresses, both usable (no network or broadcast address needed on a point-to-point link). Using /31 instead of /30 doubles the efficiency of your point-to-point link addressing — important for ISPs with thousands of customer links.

check_circle

IPv6 subnetting is conceptually simpler: the standard subnet size is /64, and you almost always receive at least a /48 from your ISP (leaving 16 bits for subnetting — that's 65,536 /64 subnets). The 128-bit address space is so vast that host counting is irrelevant; focus on subnet boundaries and the Interface ID portion (the lower 64 bits, often EUI-64 from MAC address).

Frequently Asked Questions

CIDR (Classless Inter-Domain Routing) notation appends a slash and a number to an IP address to indicate how many of the 32 bits belong to the network portion. /24 means the first 24 bits (3 bytes) are the network prefix and the remaining 8 bits (1 byte) are for hosts. In subnet mask terms, /24 = 255.255.255.0. The number of usable hosts = 2^(32-prefix) − 2. For /24: 2⁸−2 = 256−2 = 254. You subtract 2 because the all-zeros host address is the network address itself, and the all-ones host address is the broadcast address. /23 gives 2⁹−2=510 hosts, /25 gives 2⁷−2=126.

IP subnetting stops being intimidating the moment you visualise the 32-bit address split between network and host portions. Our subnet calculator makes that split explicit — showing you the network, broadcast, host range, and CIDR math for any IP/Prefix combination. Whether you're provisioning cloud infrastructure or studying for a certification, subnet with confidence.

Try this tool for free →open_in_new