... LIVE
💻 IPv4 Subnet Tools
e.g. 192.168.1.100 or 10.0.0.1 Enter a valid IPv4 address (e.g. 192.168.1.1).
CIDR /0–/32 or dotted mask (e.g. 255.255.255.0) Enter a valid prefix length or subnet mask.
Network Address
⚠️ Disclaimer: This calculator is for educational and network planning purposes. Always verify subnet configurations with your network administrator before deployment in production environments.
Base network address of your block Enter a valid IPv4 network address.
e.g. /24 for the block to divide Enter a valid prefix length (e.g. /24).
Subnet size must be larger than network prefix Subnet size must be larger than network prefix.
Enter any IPv4 address to see its binary, hex, and decimal breakdown Enter a valid IPv4 address.

Sources & Methodology

All subnet calculations verified against RFC 950 and RFC 4632. Bitwise operations use 32-bit unsigned integer arithmetic consistent with how network devices compute subnet information.
📘
RFC 950 — Internet Standard Subnetting Procedure (IETF)
Original IETF standard defining IPv4 subnetting procedures, network address computation via bitwise AND, and broadcast address rules used in all modern IP networks.
📙
RFC 4632 — Classless Inter-Domain Routing (CIDR) — IETF
Defines CIDR notation, prefix-based routing, and the /0 through /32 prefix length system that replaced the Class A/B/C address scheme.
📊
IANA IPv4 Address Space Registry
Official registry of global IPv4 address allocations including private ranges (RFC 1918), multicast blocks, and special-use addresses referenced in this guide.
Methodology:
Network Address = IP AND Subnet Mask (bitwise) Broadcast = Network OR (NOT Subnet Mask) Usable Hosts = 2^(32 - prefix) - 2  |  Wildcard = 255.255.255.255 - Subnet Mask Prefix to mask: first N bits = 1, remaining = 0. /31 = 2 usable (RFC 3021). /32 = single host route. Subnet list iterates by block size 2^(32-subPrefix) from base network.

Last reviewed: April 2026

Complete IPv4 Subnetting Guide 2026

IP subnetting is the foundational skill of every network engineer, cloud architect, and system administrator. Understanding how to calculate network addresses, broadcast addresses, host ranges, and subnet masks is essential for designing LANs, configuring routers, building cloud VPCs, and writing security policies. This guide covers everything from basic concepts to real-world subnet planning techniques used in enterprise networks today.

What Is an IP Address and Subnet Mask?

An IPv4 address is a 32-bit number written in dotted-decimal notation such as 192.168.1.100. It has two parts: the network portion identifying which subnet it belongs to, and the host portion identifying which device within that subnet. The subnet mask defines where the network portion ends and the host portion begins.

Network Address = IP AND Subnet Mask
Example — 192.168.1.100/24:
IP binary: 11000000.10101000.00000001.01100100
Mask binary: 11111111.11111111.11111111.00000000
AND result: 11000000.10101000.00000001.00000000 = 192.168.1.0
Broadcast: all host bits = 1 → 192.168.1.255  |  Usable hosts: 192.168.1.1 – 192.168.1.254 (254 hosts)

Common Subnet Reference Table

CIDRSubnet MaskTotal IPsUsable HostsCommon Use Case
/30255.255.255.25242Point-to-point WAN links
/29255.255.255.24886Small server segments
/28255.255.255.2401614VLAN segments, small offices
/27255.255.255.2243230Department subnets
/26255.255.255.1926462Medium office floors
/25255.255.255.128128126Large building segments
/24255.255.255.0256254Standard LAN, home network
/23255.255.254.0512510Campus buildings
/22255.255.252.01,0241,022Enterprise departments
/20255.255.240.04,0964,094AWS VPC default subnet
/16255.255.0.065,53665,534Large campus, ISP block
/8255.0.0.016,777,21616,777,214Class A private (10.0.0.0/8)

RFC 1918 Private IP Address Ranges

BlockCIDR RangeTotal AddressesTypical Use
Class A private10.0.0.0/816,777,216Large enterprise, cloud VPCs (AWS, GCP, Azure)
Class B private172.16.0.0/121,048,576Medium networks, Docker bridge networks
Class C private192.168.0.0/1665,536Home routers, small office LANs

How to Plan Subnets for Your Network

Start with your requirements: how many subnets do you need, and how many hosts must each support? Choose the smallest prefix length that fits your host count with 20–30% headroom for growth. Always remember that each subnet loses 2 addresses to the network and broadcast addresses.

💡 Subnet sizing tip: If you need 50 hosts, a /26 gives 62 usable hosts — enough headroom. A /27 gives only 30, which is too few. Always size up by one prefix if you are near the boundary to allow future growth without renumbering your entire network.

Subnetting in AWS, Azure, and Google Cloud

Cloud providers use subnetting extensively in virtual networking. In AWS, a VPC is assigned a CIDR block (typically /16) and divided into subnets per availability zone (typically /24 or /20). AWS reserves 5 addresses per subnet: the network address, VPC router (.1), DNS (.2), future use (.3), and broadcast. A /24 AWS subnet therefore gives 251 usable addresses, not 254. Azure and GCP use the same 5-address reservation. Understanding this is critical for security group rules, route tables, and NAT gateway placement.

Special Prefix Lengths: /31 and /32

RFC 3021 defines /31 subnets for point-to-point links, containing exactly 2 addresses — both usable with no network or broadcast wasted. This is used on router WAN interfaces. A /32 represents a single host route used for loopback interfaces, BGP next-hop entries, host-specific ACLs, and routing table entries for individual hosts.

Wildcard Masks in ACLs and OSPF

A wildcard mask is calculated by subtracting each subnet mask octet from 255. For mask 255.255.255.0, wildcard = 0.0.0.255. In a wildcard mask, a 0 bit means the corresponding IP bit must match exactly, while a 1 bit means that bit is ignored. Wildcard masks are used in Cisco ACL permit/deny statements, OSPF network commands, and firewall rules to match ranges of addresses efficiently.

Subnetting Quick Reference for CCNA and Network+ Exams

The magic number method is the fastest subnet calculation technique for certification exams: subtract the last non-255 octet of the subnet mask from 256 to get the block size. For /26 (mask 255.255.255.192): 256 - 192 = 64. Subnets fall at 0, 64, 128, 192. For 192.168.1.100/26: the containing block starts at .64, so network = 192.168.1.64, broadcast = 192.168.1.127, usable range = 192.168.1.65 – 192.168.1.126. Our subnet calculator gives all these values instantly for any prefix.

Frequently Asked Questions
An IP subnet calculator takes an IPv4 address and subnet mask or CIDR prefix and computes the network address, broadcast address, usable host range, wildcard mask, total hosts, and binary representation. It is used by network engineers to plan IP address allocation, configure routers, and design network segments without doing manual binary arithmetic.
CIDR (Classless Inter-Domain Routing) notation expresses an IP address and prefix length together, such as 192.168.1.0/24. The number after the slash tells you how many bits are used for the network portion. CIDR replaced the old Class A/B/C system in 1993 and allows any prefix from /1 to /32, making IP address space allocation far more efficient for ISPs and enterprises.
The network address is calculated using a bitwise AND between the IP address and subnet mask. For 192.168.1.100 with mask 255.255.255.0, the host portion bits (where mask = 0) are zeroed out, giving network address 192.168.1.0. Enter your IP and prefix in the IPv4 Subnet tab above and the calculator does this instantly and shows the full binary breakdown.
The broadcast address is the last address in a subnet, formed by setting all host bits to 1. A packet sent to the broadcast address is delivered to every host on that subnet simultaneously. For 192.168.1.0/24 the broadcast is 192.168.1.255. The broadcast address cannot be assigned to any device and is used by protocols like ARP, DHCP discovery, and some routing protocols.
A /24 subnet has 256 total addresses (2 to the power of 8). Subtracting the network address and broadcast address leaves 254 usable host addresses from .1 to .254. The formula is usable hosts = 2 to the power of (32 minus prefix length) minus 2. For /24: 256 - 2 = 254. For /25: 128 - 2 = 126. For /26: 64 - 2 = 62.
A wildcard mask is the bitwise inverse of a subnet mask, calculated by subtracting each octet from 255. For subnet mask 255.255.255.0, the wildcard is 0.0.0.255. Wildcard masks are used in Cisco ACL statements, OSPF network commands, and firewall rules. A 0 bit means that bit must match; a 1 bit means it is ignored during address matching.
A /32 uses all 32 bits for the network, leaving zero bits for hosts. It represents exactly one IP address. It is used for loopback interfaces (127.0.0.1/32), host-specific routes in routing tables, BGP next-hop entries, and ACL entries that target a single specific IP address. A /32 has 1 total address and 1 usable address.
RFC 1918 defines three private IPv4 blocks: 10.0.0.0/8 with about 16.7 million addresses for enterprise and cloud VPCs, 172.16.0.0/12 with about 1 million addresses for medium networks and Docker, and 192.168.0.0/16 with 65,536 addresses for home and small office networks. These are not routable on the public internet and require NAT to access external networks.
Click the Subnet List tab, enter a base network address (e.g. 192.168.1.0) and its prefix (e.g. /24), then choose the subnet size to divide into (e.g. /26). The calculator generates every subnet within that block showing each subnet network address, broadcast, first and last host, and usable host count. Useful for IP address planning, VLAN design, and cloud VPC subnet allocation.
AWS reserves 5 IP addresses in every subnet: network address, VPC router (.1), DNS server (.2), reserved for future use (.3), and broadcast address. A /24 AWS subnet therefore has 251 usable addresses instead of the standard 254. Azure and GCP use the same 5-address reservation. Always factor this in when sizing cloud subnets to avoid running out of IP addresses unexpectedly.
The magic number method: subtract the interesting octet of the subnet mask from 256 to get the block size. For /26 (mask 255.255.255.192): 256 - 192 = 64. Subnets start at 0, 64, 128, 192. For IP 192.168.1.100/26: it falls in the .64 block, so network = .64, broadcast = .127, hosts = .65 to .126. Memorize the powers of 2 (128, 64, 32, 16, 8, 4, 2) for quick mental calculations.
The Binary Converter tab converts any IPv4 address into its binary and hexadecimal representation showing each octet as 8 bits. This is useful for understanding how subnet mask bitwise AND operations work, studying for CCNA or CompTIA Network+ exams, verifying subnet boundary calculations manually, and teaching subnetting concepts where seeing the actual bit patterns is essential.
Related Networking Calculators
🧮

Missing a Networking Calculator?

Can’t find the networking tool you need? Tell us — we build new ones every week.