IP Subnetting Calculator
Calculate IPv4 subnetting from CIDR with network address, broadcast, subnet mask and usable host range.
Subnet decomposition
| Subnet CIDR | Mask | Host bits | Binary representation |
|---|---|---|---|
| 192.168.1.0/24 | 255.255.255.0 | 8 bits | 11111111.11111111.11111111.00000000 |
| 192.168.1.0/25 | 255.255.255.128 | 7 bits | 11111111.11111111.11111111.10000000 |
| 192.168.1.128/25 | 255.255.255.128 | 7 bits | 11111111.11111111.11111111.10000000 |
What is IP subnetting
Subnetting divides one physical network into smaller logical subnets to optimize IP space, reduce broadcasts and improve security. This calculator automates network decomposition for technical precision.
"Segmentation is the foundation of a scalable and secure network."
How to calculate a subnet mask
A subnet mask uses 1s for the network part and 0s for the host part. The CIDR prefix indicates how many leading bits belong to the network.
- Identify the IP class and base network block.
- Choose the CIDR prefix based on required size.
- Get mask, network, broadcast and usable hosts.
Common subnet configurations
Standard Class C mask
254 usable hostsDepartment segmentation
30 usable hostsPoint-to-point links
2 usable hostsFrequently asked questions
What is a subnet mask?
It is the value that separates the network part from the host part in an IPv4 address.
What is the difference between network and broadcast?
The network address identifies the subnet. The broadcast address targets all hosts in that subnet.
How is the usable host range calculated?
It starts at network + 1 and ends at broadcast - 1, except for /31 and /32 where special rules apply.
What is wildcard mask used for?
It is the inverse of the subnet mask and is commonly used in ACLs and network filtering rules.
What class and type is this IP?
This IP is class C and is classified as private.
What is the wildcard of this subnet?
The resulting wildcard is 0.0.0.255, useful for ACL and filtering rules.
What is the current binary mask?
The binary mask is: 11111111.11111111.11111111.00000000.
How many IPs and hosts does this subnet have?
Total IPs: 256. Usable hosts: 254.
What is the usable host range?
The usable host range goes from 192.168.1.1 to 192.168.1.254.
What are the calculated network and broadcast?
Network address: 192.168.1.0/24. Broadcast: 192.168.1.255.
Which decimal mask corresponds to this prefix?
For /24, the decimal mask is 255.255.255.0.
Does this calculator support IPv6?
It is currently focused on IPv4. IPv6 support can be added in a next phase.
How do I avoid common subnetting mistakes?
Validate prefixes, avoid using network/broadcast as hosts and check overlaps between adjacent subnets.
What should I document when creating subnets?
Segment name, VLAN, CIDR, gateway, DHCP, ACL and operational purpose of each network.