What an IP subnet mask calculator does
An IP subnet mask calculator helps you quickly determine how an IPv4 network is divided. Instead of manually converting binary and counting host bits, you can enter an IP address plus a subnet mask (or CIDR prefix) and instantly see the network address, broadcast address, host range, and host capacity.
This is useful for system administrators, students studying networking, DevOps engineers, help desk technicians, and anyone designing VLANs, VPN ranges, firewall rules, or cloud VPC segments.
How to use this calculator
- Enter an IPv4 address, such as
10.20.30.40. - Enter either:
- a CIDR prefix like
/16, or - a subnet mask like
255.255.0.0.
- a CIDR prefix like
- Click Calculate Subnet.
- Review the results: network ID, broadcast, first host, last host, wildcard mask, and number of addresses.
Subnet mask fundamentals
IPv4 addresses are 32 bits
An IPv4 address is 32 bits long and written as four octets, for example 192.168.1.34. A subnet mask tells us which bits belong to the network part and which bits belong to the host part.
For instance, in a /24 network, the first 24 bits are network bits and the final 8 bits are host bits.
CIDR and dotted mask are equivalent
These two notations represent the same thing:
/24=255.255.255.0/26=255.255.255.192/30=255.255.255.252
CIDR notation is shorter and easier for route summaries. Dotted mask notation is often seen in legacy equipment and interface configuration dialogs.
Understanding each output
Network address
The network address is the first address in the subnet. It identifies the subnet itself and is not assigned to normal hosts (except special design contexts).
Broadcast address
The broadcast address is the last address in the subnet. It is used to send traffic to all hosts in the subnet simultaneously.
First and last usable host
For typical subnets, usable hosts are everything between network and broadcast. Example: in 192.168.1.0/24, usable hosts run from 192.168.1.1 to 192.168.1.254.
Total addresses vs usable hosts
- Total addresses: all addresses in the subnet, including network and broadcast.
- Usable hosts: assignable addresses for endpoints in common subnetting models.
Special cases:
/31is commonly used for point-to-point links and provides 2 usable endpoint addresses./32represents a single host route.
Quick examples
Example 1: 192.168.10.77/24
- Network: 192.168.10.0
- Broadcast: 192.168.10.255
- Usable range: 192.168.10.1 - 192.168.10.254
- Usable hosts: 254
Example 2: 172.16.5.130/26
- Mask: 255.255.255.192
- Block size in 4th octet: 64
- Containing subnet: 172.16.5.128/26
- Broadcast: 172.16.5.191
- Usable range: 172.16.5.129 - 172.16.5.190
Example 3: 10.0.0.9/30
- Network: 10.0.0.8
- Broadcast: 10.0.0.11
- Usable hosts: 10.0.0.9 and 10.0.0.10
- Ideal for small point-to-point links
Common subnetting mistakes to avoid
- Using a non-contiguous subnet mask (invalid masks like 255.0.255.0).
- Assigning the broadcast address to a host.
- Mixing up total addresses with usable host counts.
- Forgetting that cloud providers may reserve addresses in each subnet.
- Choosing subnets that overlap existing ranges, which breaks routing.
Why subnetting matters in real networks
Subnetting is not just an exam topic. It directly affects performance, security, and manageability:
- Security: isolate departments or environments with ACLs and firewalls.
- Performance: reduce broadcast traffic and improve efficiency.
- Scalability: plan predictable growth with structured address blocks.
- Troubleshooting: faster diagnosis when network boundaries are clear.
Final takeaway
A reliable subnet calculator saves time and prevents addressing mistakes. Use it any time you plan a LAN, define VLANs, create VPN routes, or verify firewall scopes. If you are learning networking, pair this tool with binary practice so you understand the logic behind every result.