IP Subnet Calculator
This calculator returns a variety of information regarding Internet Protocol version 4 (IPv4) and IPv6 subnets including possible network addresses, usable host ranges, subnet mask, and IP class, among others.
IPv4 Subnet Calculator
IPv6 Subnet Calculator
A subnet partitions an IP network—a set of communication protocols used on the Internet and similar networks—into smaller segments. This concept belongs to the TCP/IP suite (Transmission Control Protocol/Internet Protocol).
Dividing a network into two or more distinct parts is called subnetting. Routers serve as the bridge between these parts, acting as a physical boundary. IPv4 is still the most widely used addressing scheme, although IPv6 adoption has been increasing since 2006.
An IP address is made up of a network identifier (routing prefix) and a host identifier. The host identifier uniquely marks a specific device or interface. The routing prefix is usually expressed with Classless Inter-Domain Routing (CIDR) notation for both IPv4 and IPv6. CIDR offers a systematic way to assign unique IDs to networks and individual hosts. In IPv4, the network portion can also be described by a subnet mask, often shown in dotted‑decimal form, as displayed in the "Subnet" field of the calculator. All devices on the same subnetwork share the identical network prefix, while each host retains its own distinct identifier. Subnet masks in IPv4 separate the network number from the host part, and in IPv6 the prefix length performs a similar role, indicating how many bits belong to the network segment.
Before CIDR was introduced, IPv4 network prefixes were derived directly from the address class (A, B, or C), which dictated the address range and associated mask. With CIDR, assigning an address to an interface now requires specifying both the IP address and its network mask.
Below is a table providing typical subnets for IPv4.
| Prefix size | Network mask | Usable hosts per subnet |
| /1 | 128.0.0.0 | 2,147,483,646 |
| /2 | 192.0.0.0 | 1,073,741,822 |
| /3 | 224.0.0.0 | 536,870,910 |
| /4 | 240.0.0.0 | 268,435,454 |
| /5 | 248.0.0.0 | 134,217,726 |
| /6 | 252.0.0.0 | 67,108,862 |
| /7 | 254.0.0.0 | 33,554,430 |
| Class A | ||
| /8 | 255.0.0.0 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,574 |
| /13 | 255.248.0.0 | 524,286 |
| /14 | 255.252.0.0 | 262,142 |
| /15 | 255.254.0.0 | 131,070 |
| Class B | ||
| /16 | 255.255.0.0 | 65,534 |
| /17 | 255.255.128.0 | 32,766 |
| /18 | 255.255.192.0 | 16,382 |
| /19 | 255.255.224.0 | 8,190 |
| /20 | 255.255.240.0 | 4,094 |
| /21 | 255.255.248.0 | 2,046 |
| /22 | 255.255.252.0 | 1,022 |
| /23 | 255.255.254.0 | 510 |
| Class C | ||
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
| /31 | 255.255.255.254 | 0 |
| /32 | 255.255.255.255 | 0 |