IP Subnet Calculator
Enter an address and prefix to get the network, broadcast address, usable hosts and size of an IPv4 subnet, or the range of an IPv6 prefix.
Jump to toolTypical IPv4 subnets (CIDR reference)
| Prefix | Subnet mask | Usable hosts |
|---|---|---|
| /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 |
What Is an IP Subnet Calculator?
An IP subnet calculator works out the details of a network from an address and its prefix length: which addresses belong to the subnet, where it starts and ends, and how many hosts it can hold. It saves doing binary arithmetic by hand when you plan a network or write firewall rules.
For IPv4, enter an address and prefix such as 192.168.1.10/24 to get the network address, broadcast address and usable host range. The IPv6 tab returns the subnet address, the first and last addresses and the total address count. Everything runs in your browser.
How to Calculate a Subnet
- Choose IPv4 Subnet Calculator or IPv6 Subnet Calculator.
- Enter the IP address and the subnet, as a prefix such as /24 or a mask such as 255.255.255.0.
- Select Calculate.
- Read the network address, broadcast address, usable host range and host count.
The Parts of an IPv4 Subnet
| Part | Example for 192.168.1.10/24 |
|---|---|
| Network address | 192.168.1.0, the first address, which names the subnet |
| Broadcast address | 192.168.1.255, the last address, which reaches every host |
| Usable host range | 192.168.1.1 to 192.168.1.254 |
| Usable hosts | 254: the total of 256 minus the network and broadcast addresses |
| Subnet mask | 255.255.255.0, the same as the /24 prefix |
How Subnetting Works
A prefix such as /24 says how many bits at the start of the address identify the network; the rest identify hosts. Each extra network bit halves the subnet, so a /25 has 128 addresses and a /26 has 64.
To find the network address, keep the network bits of the address and set the host bits to 0; for the broadcast address, set them all to 1.
IPv6 Prefix Sizes
IPv6 subnets are planned differently: there is no broadcast address and hosts are never in short supply.
| Prefix | Typical use |
|---|---|
| /64 | One LAN or VLAN; the standard subnet size, needed for automatic addressing (SLAAC) |
| /56 | Often given to a home connection: 256 subnets of /64 |
| /48 | Often given to a business or site: 65,536 subnets of /64 |
| /128 | A single address |
Planning Tips
- Leave room to grow: size subnets for about twice today's devices.
- Use /30 or /31 for point-to-point links between routers.
- Keep server, user, guest and device networks in separate subnets.
- Write your plan down, including which ranges are reserved for later.
IP Subnet Calculator FAQ
Splitting a network into different sizes?
Plan several subnets from one block with the VLSM calculator.
Related Tools
Tools that often come next after this one