IP Subnet / CIDR Calculator

Get network, broadcast, host range, mask and wildcard for any IPv4 CIDR block.

Enter an address with /prefix, or an address and pick a mask. Dotted masks like 10.0.0.0/255.255.255.0 also work.

CIDR notation
Network address
Broadcast address
First usable host
Last usable host
Usable hosts
Total addresses
Subnet mask
Wildcard mask
Prefix length
Mask in binary
IP in binary
Address type

Divide into smaller subnets

#SubnetFirst hostLast hostBroadcast

How subnetting works

An IPv4 address is 32 bits. A CIDR prefix such as /24 says how many of those bits, counted from the left, identify the network; the rest identify hosts inside it. The subnet mask is the same idea written as four octets (255.255.255.0 for /24), and the wildcard mask is its inverse, which some router access lists use. ANDing the address with the mask gives the network address; ORing it with the wildcard gives the broadcast address. Everything between them is usable by hosts, except that /31 links have no broadcast and use both addresses (RFC 3021) and a /32 is a single host. This calculator does that arithmetic for you, shows the binary so you can see the boundary, tells you whether the range is private, loopback, link-local or public, and can split the block into equal smaller subnets for VLAN or cloud planning.

Prefix lengths and host counts

PrefixMaskUsable hosts
/8255.0.0.016,777,214
/12255.240.0.01,048,574
/16255.255.0.065,534
/20255.255.240.04,094
/22255.255.252.01,022
/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
/31255.255.255.2542
/32255.255.255.2551

Notes

Privacy

All calculations happen in your browser. The addresses you enter are not sent anywhere or stored.