Enter either CIDR prefix or subnet netmask. If both are entered, CIDR will be used.
What is a subnet netmask calculator?
A subnet netmask calculator is a networking tool that helps you quickly break down an IPv4 network into meaningful values: network address, broadcast address, usable host range, wildcard mask, and host capacity. Instead of doing binary math by hand, you enter an IP address and either a CIDR prefix (like /24) or a dotted-decimal netmask (like 255.255.255.0), and the calculator handles the rest.
This is useful for network engineers, sysadmins, cloud architects, students preparing for Cisco or CompTIA exams, and anyone configuring routers, firewalls, DHCP scopes, or VLANs.
How to use this subnet calculator
Step 1: Enter an IPv4 address
Type a valid IPv4 address such as 10.20.30.40 or 172.16.5.200.
Step 2: Enter CIDR prefix or netmask
You can provide either:
- CIDR: e.g.
/26or26 - Netmask: e.g.
255.255.255.192
The calculator validates the input and ensures your netmask is contiguous (valid subnet mask format).
Step 3: Read results
You will see all major subnetting outputs instantly, including host counts and usable IP range.
Understanding each output field
- Network Address — the first IP in the subnet; identifies the subnet itself.
- Broadcast Address — the last IP in the subnet; used to reach all hosts on that subnet.
- First/Last Usable Host — range assignable to devices (with common /31 and /32 exceptions).
- Subnet Mask — dotted-decimal mask, e.g. 255.255.254.0.
- Wildcard Mask — inverse mask, often used in ACLs.
- Total Addresses — total size of the subnet block.
- Usable Hosts — host addresses you can assign in typical subnet use.
- IP Class / Private Status — quick context for legacy classful range and RFC1918 private space.
Quick CIDR to netmask reference
- /8 = 255.0.0.0
- /16 = 255.255.0.0
- /24 = 255.255.255.0
- /25 = 255.255.255.128
- /26 = 255.255.255.192
- /27 = 255.255.255.224
- /28 = 255.255.255.240
- /29 = 255.255.255.248
- /30 = 255.255.255.252
Example subnet calculations
Example 1: 192.168.1.130/24
A /24 means 256 total addresses. The network address is 192.168.1.0, broadcast is 192.168.1.255, and usable hosts are from 192.168.1.1 to 192.168.1.254.
Example 2: 10.0.5.17 with mask 255.255.255.240
This equals /28. Subnets increment by 16 in the last octet. Since 17 falls in the 16–31 block, network is 10.0.5.16 and broadcast is 10.0.5.31.
Common subnetting mistakes to avoid
- Using invalid masks like 255.0.255.0 (non-contiguous bits).
- Assigning network or broadcast address to hosts in standard subnet usage.
- Forgetting that /31 and /32 are special cases with different host behavior.
- Mixing up wildcard mask and subnet mask in firewall ACLs.
Why this matters in real networks
Correct subnetting improves routing efficiency, security segmentation, and IP address utilization. Whether you are designing VLANs, planning VPC subnets in cloud platforms, or troubleshooting connectivity, subnet calculations are core operational skills.
Keep this calculator handy whenever you need fast subnet math without errors.