Subnet Mask Calculator
Compute network addresses, broadcast addresses, and usable host ranges from any IPv4 and prefix.
About Subnet Mask Calculator
A subnet calculator takes an IP address and a subnet mask and returns the network address, broadcast address, and usable host range, the basic facts anyone needs when planning or troubleshooting a network. Doing binary arithmetic by hand for every subnet is slow and error-prone.
CIDR prefixes like /24 describe how many leading bits identify the network. Host bits are the remainder: a /24 has 8 host bits, giving 2^8 − 2 = 254 usable addresses after subtracting the network and broadcast addresses. The tool accepts dotted masks or prefix notation and derives network and broadcast by applying the mask to the address, which also reveals whether an address is even valid for a given prefix.
Network admins plan subnets for VLANs and office segments, IT students verify their subnetting homework, and home users with multiple routers or IoT devices can see which addresses are actually available. Anyone debugging a 'can't reach the device' issue benefits from confirming an address sits in the correct subnet.
How to Use
- Enter an IPv4 address.
- Set the subnet mask or CIDR prefix.
- Read the network, broadcast, and usable host range.
Example
192.168.1.37/24 Network 192.168.1.0 · Broadcast 192.168.1.255 · 254 usable hosts
A /24 mask uses 24 bits for the network, leaving 8 bits for hosts — 254 usable addresses after network and broadcast.
FAQ
What is CIDR notation?
CIDR writes the subnet mask as a prefix length, like /24, meaning the first 24 bits identify the network.
How many usable hosts does /28 give?
2^(32-28) - 2 = 14 usable addresses, after subtracting the network and broadcast addresses.
Can it convert between masks and prefixes?
Yes, enter either a dotted mask like 255.255.255.0 or a prefix like /24 and the tool shows the equivalent.
What does /24 mean in practical terms?
A /24 uses the first 24 bits for the network, leaving 8 bits for hosts: 256 addresses, of which 254 are usable. It is the classic office LAN, commonly written as 255.255.255.0.
Why are two addresses always unusable in every subnet?
The lowest address is the network identifier and the highest is the broadcast address, used to reach all hosts on the segment at once. Both are reserved, so usable hosts are always the total minus two.