How to use the subnet calculator
Enter an IPv4 address and a prefix length (0–32) to calculate the full subnet details. You can also paste a CIDR notation address like 10.0.0.0/8 directly into the IP field — the prefix is parsed automatically. Results include network address, broadcast address, usable host range, subnet mask, wildcard mask, and total host count.
What is a subnet?
A subnet (subnetwork) is a logical subdivision of an IP network. Subnetting divides a larger network into smaller, isolated segments — each with its own range of IP addresses. Devices on the same subnet can communicate directly; traffic between subnets passes through a router.
Subnets are used to improve network performance (by limiting broadcast traffic to the subnet), enhance security (by isolating sensitive systems), and manage IP address space efficiently. In cloud environments like AWS VPCs or Azure VNets, every resource lives in a subnet.
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. It is written as four octets (e.g. 255.255.255.0) or as a prefix length after a slash (e.g. /24). All bits set to 1 in the mask identify the network; bits set to 0 identify hosts within that network.
For example, a subnet mask of 255.255.255.0 (prefix /24) means the first 24 bits are the network address and the remaining 8 bits identify up to 254 usable hosts.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation writes an IP address followed by a slash and the prefix length — for example, 192.168.1.0/24. The prefix length is the number of consecutive 1-bits in the subnet mask, ranging from 0 (matches all IPs) to 32 (a single host).
A CIDR block is the range of IP addresses that falls within a given CIDR notation. The CIDR range for 192.168.1.0/24 runs from 192.168.1.0 to 192.168.1.255 — 256 total addresses, 254 usable hosts. Smaller prefix numbers mean larger ranges: /8 covers 16 million addresses; /32 covers exactly one.
Subnet cheat sheet — common prefix sizes
| CIDR | Subnet mask | Usable hosts | Common use |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 | Large enterprise / ISP block |
| /16 | 255.255.0.0 | 65,534 | Large campus / cloud VPC |
| /24 | 255.255.255.0 | 254 | Typical office / home subnet |
| /25 | 255.255.255.128 | 126 | Half a /24 |
| /26 | 255.255.255.192 | 62 | Small department VLAN |
| /28 | 255.255.255.240 | 14 | Small server group |
| /30 | 255.255.255.252 | 2 | Point-to-point link |
| /32 | 255.255.255.255 | 1 | Single host route |
Related reference pages
Frequently asked questions
What is a /24 subnet?
A /24 subnet (subnet mask 255.255.255.0) contains 256 total IP addresses and 254 usable host addresses. It is the most common subnet size for office and home networks — for example, 192.168.1.0/24 runs from 192.168.1.0 (network address) to 192.168.1.255 (broadcast address), with usable hosts from .1 to .254.
What is the difference between a subnet mask and a prefix length?
They represent the same thing in different formats. A prefix length like /24 is the count of consecutive 1-bits in the subnet mask. The equivalent dotted-decimal subnet mask is 255.255.255.0 (24 ones followed by 8 zeros). Modern networking almost exclusively uses prefix length (CIDR notation); subnet masks are still used in older systems and some router interfaces.
What is a CIDR block?
A CIDR block is a contiguous range of IP addresses defined by a network address and a prefix length — e.g. 10.0.0.0/8. Cloud providers like AWS and Azure use CIDR blocks to define VPC address space and subnet ranges. The prefix determines how many addresses the block contains: a /24 block has 256 addresses; a /16 block has 65,536.
What is subnetting?
Subnetting is the process of dividing a network into smaller sub-networks (subnets). You take a block of IP addresses and split it by borrowing bits from the host portion of the address to create a larger network portion. For example, splitting a /24 into two /25s gives you two subnets of 126 usable hosts each instead of one of 254.
Does this calculator support IPv6?
This calculator handles IPv4 addresses (0–32 prefix lengths). IPv6 subnetting uses the same CIDR notation but with 128-bit addresses and prefix lengths up to /128. For IPv6, prefix lengths below /64 are rare in practice; /64 is the standard subnet size assigned to a single link.