Subnet Calculator

Enter an IP address and CIDR prefix to see the full subnet breakdown.

Last updated April 2026
Network Address-
Broadcast Address-
Subnet Mask-
Wildcard Mask-
First Usable Host-
Last Usable Host-
Usable Hosts-
Total Addresses-
CIDR Notation-
IP Class-
Binary Subnet Mask-
Disclaimer: This calculator is for educational and network planning purposes only. Always verify subnet configurations with your network administrator before making changes to production networks. See our full Disclaimer.

How Subnetting Works

Every IPv4 address is a 32-bit number divided into a network portion and a host portion. The subnet mask determines where that division falls. In the address 192.168.1.100/24, the /24 means the first 24 bits (192.168.1) identify the network, and the remaining 8 bits (.100) identify the specific host on that network. This creates a subnet with 256 total addresses (2^8), of which 254 are usable for devices (the first is the network address and the last is the broadcast address).

Usable Hosts = 2^(32 - CIDR prefix) - 2
Example: /24 = 2^(32-24) - 2 = 254 usable hosts
Example: /27 = 2^(32-27) - 2 = 30 usable hosts

Common Subnet Sizes

CIDRSubnet MaskUsable HostsTotal Addresses
/8255.0.0.016,777,21416,777,216
/16255.255.0.065,53465,536
/24255.255.255.0254256
/25255.255.255.128126128
/26255.255.255.1926264
/27255.255.255.2243032
/28255.255.255.2401416
/29255.255.255.24868
/30255.255.255.25224
/32255.255.255.25511

Private vs. Public IP Ranges

Three address ranges are reserved for private (internal) networks and are not routable on the public internet. 10.0.0.0/8 provides over 16 million addresses and is commonly used in large corporate networks. 172.16.0.0/12 (172.16.0.0 through 172.31.255.255) offers about 1 million addresses. 192.168.0.0/16 (commonly subnetted as 192.168.0.0/24 or 192.168.1.0/24) is the default for most home routers. If you see one of these ranges, the device is behind a NAT (Network Address Translation) gateway and shares a single public IP address with other devices on the same network.

Why Subnetting Matters

Subnetting divides a large network into smaller, more manageable segments. This improves security by isolating groups of devices (e.g., separating guest WiFi from internal servers), reduces broadcast traffic (broadcasts stay within their subnet), and makes IP address allocation more efficient. For example, a company with 500 employees does not need an entire /16 (65,534 hosts). A /22 (1,022 usable hosts) or a few /24 subnets are more appropriate and easier to manage. Cloud providers like AWS and Azure use subnetting extensively to organize VPCs (Virtual Private Clouds) into public and private tiers. The Password Generator helps secure network devices, and the Binary Converter is useful for understanding IP addresses at the bit level.

VLSM and Classless Addressing

Variable Length Subnet Masking (VLSM) allows different subnets within the same network to use different prefix lengths. Instead of giving every subnet a /24 (254 hosts), you can assign a /30 (2 hosts) to a point-to-point link between routers and a /23 (510 hosts) to a large office floor. This efficient use of address space is why CIDR replaced the old classful system (Class A/B/C) in the 1990s. Modern networks almost exclusively use CIDR notation rather than classful addressing.

Subnet Calculator FAQ

What is a subnet mask?
A subnet mask is a 32-bit number that separates the network portion of an IP address from the host portion. The most common subnet mask is 255.255.255.0 (or /24 in CIDR notation), which means the first three octets identify the network and the fourth identifies the host. Each "255" in the mask means all 8 bits in that octet are network bits.
How many usable hosts in a /24?
A /24 subnet has 256 total addresses (2^8) but only 254 usable host addresses. The network address (e.g., 192.168.1.0) and broadcast address (e.g., 192.168.1.255) are reserved and cannot be assigned to devices.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation uses a slash and a number after an IP address to indicate the subnet size. The number represents how many bits are used for the network portion. For example, /24 means 24 network bits and 8 host bits. Higher numbers mean smaller subnets with fewer hosts.
What is the difference between network address and broadcast address?
The network address is the first address in a subnet (all host bits set to 0) and identifies the subnet itself. The broadcast address is the last address (all host bits set to 1) and is used to send data to all hosts on the subnet. Neither can be assigned to a device as a usable host address.

When You Need a Subnet Calculator

Subnetting by hand is tedious and error-prone, especially with non-standard CIDR prefixes. A /21 gives you 2,046 hosts across 8 contiguous /24 blocks. A /27 gives you 30 hosts per subnet. The math isn't hard, but doing it quickly and correctly under pressure (during an interview, on an exam, or while troubleshooting a production network) is where mistakes happen.

This calculator takes any IPv4 address and CIDR prefix and instantly returns the network address, broadcast address, usable host range, wildcard mask, total hosts, and binary representation. It handles every valid prefix from /1 to /32, including the tricky ones in the middle that don't align with octet boundaries.

For networking students preparing for the CompTIA Network+, CCNA, or similar certifications, this tool is useful for checking your manual subnetting work. For network administrators, it saves time when planning VLANs, firewall rules, or IP address schemes. For a deeper explanation of how subnet masks work, see our guide on subnet masks.