What is a netmask?
A netmask (subnet mask) is a 32-bit value used in IPv4 networking to separate the network portion of an IP address from the host portion. It tells devices which addresses are on the same local network and which must be reached through a router.
For example, with an IP address of 192.168.1.42 and a netmask of 255.255.255.0, the network is 192.168.1.0/24. Devices from 192.168.1.1 through 192.168.1.254 are on the same subnet.
CIDR and subnet masks: same concept, different format
CIDR notation is a compact way to express the mask using a prefix length. A /24 means the first 24 bits
are network bits and the remaining 8 are host bits.
- /8 = 255.0.0.0
- /16 = 255.255.0.0
- /24 = 255.255.255.0
- /30 = 255.255.255.252
This calculator accepts either format, validates your values, and outputs the full subnet details instantly.
What this netmask IP calculator gives you
After you enter an IPv4 address and CIDR/subnet mask, you get:
- Network address
- Broadcast address
- First and last usable host
- Total addresses and usable host count
- Wildcard mask (useful in ACL rules)
- Binary representation of IP and mask
- Address type (private/public, loopback, etc.)
Quick examples
Example 1: Typical home LAN
Input: 192.168.1.10 /24
Result: Network is 192.168.1.0, broadcast is 192.168.1.255, and there are 254 usable hosts.
Example 2: Point-to-point link
Input: 10.0.0.5 /30
A /30 provides 4 total addresses (2 usable hosts). This is common for older WAN point-to-point links.
Example 3: Large internal segment
Input: 172.16.44.200 /20
Resulting subnet spans multiple /24 blocks. This can simplify routing but may increase broadcast domain size.
Common subnetting mistakes to avoid
- Mixing up CIDR and dotted decimal values that do not match
- Using non-contiguous masks (invalid in standard IPv4 subnetting)
- Forgetting special behavior for
/31and/32 - Assigning network or broadcast addresses to hosts on normal subnets
- Ignoring private vs public IP boundaries in design
FAQ
Is /31 usable?
Yes. Under RFC 3021, /31 is valid for point-to-point links and allows two usable endpoints without network/broadcast overhead.
What about /32?
/32 identifies a single host address. It is often used for loopbacks, host routes, or specific firewall/routing entries.
Does this tool support IPv6?
This page is focused on IPv4 netmask calculations only. IPv6 uses prefix lengths too, but addressing behavior differs significantly.
Final takeaway
Understanding netmask math is essential for network planning, routing, firewall policy, and troubleshooting. Use this calculator as a fast way to verify subnet boundaries and avoid misconfigurations before deploying changes.