Subnet Calculator
Calculate an IPv4 subnet's range, mask, and host count.
Calculation runs in your browser. The address and mask are not sent to the server.
How to use this tool
- Enter an IPv4 address.
- Enter a CIDR prefix or dotted subnet mask.
- Calculate the network, range, mask, and host counts.
What the result means
A subnet mask separates the network bits from the host bits. The network address is the first address in the block; the last address is conventionally the broadcast address. For ordinary IPv4 subnets, those two addresses are excluded from the usable host count.
Example
For 192.168.1.42/24, the network is 192.168.1.0, the range ends at 192.168.1.255, and the conventional usable range is 192.168.1.1 through 192.168.1.254.
Limitations
A /31 point-to-point subnet can use both addresses and has no conventional directed broadcast. A /32 represents one address. Actual address assignment depends on your network configuration. This calculation runs locally in your browser.
Common questions
Can I enter a subnet mask instead of /24?
Yes. Enter a contiguous dotted mask such as 255.255.255.0. Noncontiguous masks are rejected.
Why does /31 show two usable addresses?
On a point-to-point link, both /31 addresses can identify endpoints. The ordinary network-and-broadcast subtraction does not apply.