How to Use
- Enter IP address
Input an IPv4 address (e.g., 192.168.1.0).
- Enter subnet mask
Provide a CIDR prefix (/24) or dotted-decimal mask (255.255.255.0).
- View results
Click Calculate to see the network range, usable host count, wildcard mask, and more.
What Is a Subnet?
A subnet is a smaller logical division of a single larger IP network. A 32-bit IPv4 address is split into a network portion and a host portion; the boundary between them is set by the subnet mask, and expressing that mask as a number of bits gives you the CIDR prefix (such as /24).
There are three main reasons to subnet a network.
- Address conservation: Carve up the address space to match the number of hosts you actually need, reducing wasted IPs.
- Broadcast isolation: Separate networks to contain unnecessary broadcast traffic.
- Security and management: Split networks by department or purpose to simplify access control and routing.
Just enter an IP and a CIDR, and this calculator shows the network address, broadcast address, usable host range, IP class, and whether the address is private all at once.
Calculation Formula
Every value is derived from 32-bit bitwise operations.
Subnet mask = 0xFFFFFFFF << (32 - CIDR)Network address = IP AND subnet maskWildcard mask = NOT subnet maskBroadcast = network address OR wildcard maskTotal hosts = 2^(32 - CIDR),Usable hosts = 2^(32 - CIDR) - 2
Example: 192.168.1.10/24 → mask 255.255.255.0, network 192.168.1.0, broadcast 192.168.1.255, usable hosts 192.168.1.1 to 192.168.1.254, giving 254 addresses (= 2^8 - 2). The -2 accounts for the network address and the broadcast address, which are reserved.