This IP Subnet Calculator provides detailed information about IPv4 and IPv6 subnets, including possible network addresses, usable host ranges, subnet masks, IP classes, and more. Whether you’re a network administrator or student, this tool helps you quickly understand and calculate subnet information for any network, including setting a network configuration on your Windows 11 device.
IPv4 Subnet Calculator
IPv6 Subnet Calculator
What is a subnet?
A subnet (subnetwork) is a logical subdivision of an IP network. Instead of treating a large network as a single broadcast domain, subnetting breaks it into smaller, more manageable networks. This improves performance, security, and address management.
An IP network refers to the set of protocols used to transmit data across networks, commonly known as the TCP/IP stack (Transmission Control Protocol / Internet Protocol). Every device in a network is identified by an IP address, which is used to route traffic.
What is subnetting?
Subnetting is the process of dividing a larger network into two or more smaller networks. Each subnet operates as its own network segment, while routers connect and control traffic between them.
Routers act as boundaries between subnets. Devices on the same subnet can communicate directly, whereas traffic between subnets must pass through a router. This segmentation helps reduce congestion, improve security, and simplify network administration.
IPv4 has historically been the most widely used addressing system, but adoption of IPv6 has been increasing due to IPv4 address exhaustion.
| 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 |
How IP addresses are structured
Every IP address consists of two main parts, including the network prefix (network number) that
identifies the network or subnet the device belongs to, and the host identifier (host portion) that uniquely identifies a device or interface within that network.
All devices in the same subnet share the same network prefix, but each device has a unique host identifier.
Subnet masks and CIDR notation
In IPv4, a subnet mask specifies how many bits are assigned to the network portion and how many to the host portion. It is commonly written in dot-decimal format, such as 255.255.255.0 and 255.255.255.252.
The subnet mask determines how many subnets can be created and how many hosts each subnet can contain.
CIDR (Classless Inter-Domain Routing) is a modern way to represent the network prefix using a slash followed by the number of bits used for the network portion, for example, 192.168.1.0/24 and 10.0.0.0/16.
The number after the slash is called the prefix length. CIDR replaced the older class-based system and enables flexible subnet sizing rather than fixed class boundaries.
IPv6 does not use subnet masks like IPv4. Instead, it uses prefix lengths, which serve the same purpose. For example, 2001:db8::/64.
The prefix length indicates how many bits define the network. The remaining bits identify individual devices. IPv6 networks commonly use a /64 prefix for standard subnets.
Classful vs classless addressing (historical context)
Before CIDR, IPv4 used classful addressing, where the network prefix was determined by the address class:
- Class A: large networks
- Class B: medium networks
- Class C: small networks
Each class had a default subnet mask. However, this system was inefficient and wasted large numbers of IP addresses.
CIDR removed these fixed classes, allowing networks to be sized exactly as needed. Today, classful addressing is mostly historical, but the class terms are still used for reference and education.
This page makes subnet calculations simple for both beginners and advanced users. Enter an IP address and subnet or prefix length to instantly get detailed network information.