IP Subnet Calculator

Enter an IPv4 address with a CIDR prefix or subnet mask to get the network address, broadcast address, usable host range and more.

Subnet Details
Common CIDR Prefixes
CIDRSubnet MaskUsable Hosts
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
Quick Examples

Frequently Asked Questions

CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its subnet mask together, written as an address followed by a slash and a prefix length, for example 192.168.1.0/24. The prefix length is the number of bits used for the network portion of the address - the remaining bits identify hosts within that network.

Take 2 to the power of the number of host bits (32 minus the CIDR prefix), then subtract 2 for the network and broadcast addresses. For example, a /24 network has 8 host bits, giving 2^8 = 256 total addresses, minus 2 reserved addresses = 254 usable hosts. This calculator does that automatically. Note that /31 and /32 subnets are special cases with no separate broadcast address.

The network address is the first address in a subnet (all host bits set to 0) and identifies the subnet itself - it cannot be assigned to a device. The broadcast address is the last address in a subnet (all host bits set to 1) and is used to send data to every device on that subnet. Neither is normally usable as a host address.

A wildcard mask is the inverse of a subnet mask, commonly used in Cisco ACLs and OSPF configuration. Where a subnet mask has a 1 for network bits and 0 for host bits, a wildcard mask flips this - a 0 means "must match" and a 1 means "don't care". For example, the wildcard mask for 255.255.255.0 is 0.0.0.255.

RFC 1918 reserves three ranges for private networks: 10.0.0.0/8 (10.0.0.0 - 10.255.255.255), 172.16.0.0/12 (172.16.0.0 - 172.31.255.255), and 192.168.0.0/16 (192.168.0.0 - 192.168.255.255). These addresses are not routed on the public internet and are commonly used for home and office networks.