IP Subnet Calculator

Network address, broadcast address, host range and host count for an IPv4 address + CIDR prefix.

Equations used
Network address = IP AND Subnet mask
Broadcast = Network OR (NOT Mask)
Usable hosts = 2^32 - prefix - 2

Frequently Asked Questions

Why are usable hosts 2 fewer than total addresses?

For prefixes /30 and shorter, the first address in the range is reserved as the network address and the last is reserved as the broadcast address, so usable hosts = total addresses − 2. For /31 and /32, all addresses are shown as usable (point-to-point / single-host conventions).

What's the difference between the subnet mask and the wildcard mask?

The subnet mask (e.g. 255.255.255.0) marks the network bits as 1s and host bits as 0s. The wildcard mask is its bitwise complement — host bits as 1s — and is the form used in some router ACL and OSPF configurations.

How does this determine Private vs Public address type?

It checks the IP against the three reserved private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and the 127.x.x.x loopback block; anything outside those is labeled Public, regardless of whether that address is actually routed on the internet.