IP Subnet
This free IP subnet calculator turns an IPv4 address and CIDR prefix into a subnet mask, wildcard mask, network address, broadcast address, and usable host range. Nothing you enter is sent anywhere or stored.
How to Use It
- Enter an IPv4 address.
- Enter a CIDR prefix length from 0 to 32.
- The subnet mask, network, broadcast, and usable host range update instantly, no submit button.
How It Works
An IPv4 address is 32 bits, and a CIDR prefix like /24 says how many of those bits are fixed as the network portion, leaving the rest as host bits that vary between devices on the subnet. The subnet mask is that same split written out as a dotted decimal number, with a 1 for every network bit and a 0 for every host bit. Everything else, from the network and broadcast addresses to the usable host range, follows directly from where that line between network bits and host bits falls.
A worked example: 192.168.1.10 with a /24 prefix has 24 network bits and 8 host bits. The subnet mask is 255.255.255.0, the network address is 192.168.1.0, the broadcast address is 192.168.1.255, and the 254 addresses in between, 192.168.1.1 through 192.168.1.254, are all usable.
Everything runs client-side in your browser. Nothing you enter is sent anywhere or stored.
Frequently Asked Questions
What does CIDR notation mean?
CIDR notation is the "/24" style suffix after an IP address, shorthand for how many leading bits of the 32 bit address are the network portion. A /24 means the first 24 bits are network bits, leaving 8 bits for host addresses within that network, the same information a dotted decimal subnet mask like 255.255.255.0 conveys, just more compactly.
What is the difference between the network address, broadcast address, and usable host addresses?
The network address (all host bits set to 0) identifies the subnet itself and is never assigned to a device. The broadcast address (all host bits set to 1) is reserved for sending a message to every device on the subnet at once. Every address between those two is a usable host address that can be assigned to an actual device.
Why is usable host count normally the total minus 2?
Every subnet reserves its lowest address for the network address and its highest address for the broadcast address, neither of which can be assigned to a device. So a subnet with 256 total addresses, like a /24, has 254 usable addresses left over once those two are set aside.
What makes /31 and /32 special cases?
A /31 has only 2 total addresses, too few to reserve one for network and one for broadcast and still have any usable addresses left, so RFC 3021 allows both addresses to be used directly, typically for a point to point link between two routers. A /32 has exactly 1 address, used to identify a single host rather than a range.