IPv4 Network Mask Calculator
Enter an IPv4 address and either a CIDR prefix or subnet mask. The calculator will return the network details instantly.
Tip: You can fill either CIDR or subnet mask. If both are filled, they must match.
Try examples: 10.10.12.44 /20 172.16.5.130 /27 192.168.50.9 /30
Supports IPv4 only. For /31 networks, usable host count follows RFC 3021 behavior.
Why an IP network mask calculator is useful
Subnetting is one of the most practical networking skills. Whether you are configuring routers, designing VLANs, setting firewall rules, or troubleshooting connectivity, you need to quickly answer questions like: “What is this host’s network?”, “What is the broadcast address?”, and “How many hosts fit in this subnet?”
This IP network mask calculator is designed to make those answers immediate. Instead of manually converting values to binary every time, you can enter an IP and mask (or CIDR notation) and instantly see all the important subnet details.
What the calculator returns
- Network address (the subnet ID)
- Broadcast address (last address in the subnet)
- Subnet mask in dotted-decimal form
- Wildcard mask (useful for ACLs)
- First and last usable host
- Total addresses and usable hosts
- Binary mask/network view for learning and verification
How subnet masks and CIDR work
Subnet mask basics
A subnet mask tells the system which part of an IP address is the network portion and which part is the host portion. In IPv4, it is a 32-bit value. The network bits are set to 1, and host bits are set to 0.
Example: 255.255.255.0 in binary is 11111111.11111111.11111111.00000000. That means the first 24 bits are network bits.
CIDR notation
CIDR notation writes the same information as a slash prefix, like /24. So 192.168.1.10/24 and 192.168.1.10 with mask 255.255.255.0 are equivalent.
Quick CIDR 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 walkthrough
Example: 192.168.10.34/27
A /27 mask means 27 network bits and 5 host bits. Five host bits produce 2^5 = 32 total addresses per subnet. In standard subnets, usable hosts are 32 - 2 = 30.
- Subnet mask: 255.255.255.224
- Network address: 192.168.10.32
- Broadcast address: 192.168.10.63
- Host range: 192.168.10.33 - 192.168.10.62
Common mistakes this tool helps prevent
- Using a non-contiguous subnet mask (invalid mask pattern)
- Mismatching CIDR and subnet mask values
- Assigning a network or broadcast address to a host by accident
- Incorrectly calculating host counts for /31 and /32
Practical use cases
Network planning
When carving up a larger block into multiple subnets, this calculator helps verify each subnet boundary and host capacity before deployment.
Firewall and ACL rules
Security engineers often need wildcard masks and exact network ranges to define policy rules accurately.
Troubleshooting
If two devices cannot communicate, a quick subnet check often reveals mismatched masks or addressing outside valid host ranges.
FAQ
Does this support IPv6?
No, this version is IPv4-focused.
What happens with /31 and /32?
For /31, the calculator treats both addresses as usable in point-to-point links (RFC 3021). For /32, the single address is a host route.
Can I enter only a mask and no CIDR?
Yes. The calculator derives CIDR automatically from a valid mask.