IP Subnet Calculator

CIDR ranges, masks and host counts.

Free. Runs in your browser: nothing you enter or open is uploaded.

BinaryNetwork bits in bold, host bits plain

Everything is worked out in your browser with plain arithmetic; no address you type is looked up or sent anywhere. For /31 and /32 the tool follows RFC 3021 and RFC 4632: a /31 point to point link has two usable addresses and a /32 is a single host.

How to use it

  1. Type an address with its prefix, such as 192.168.1.10/26, or pick the mask from the list.
  2. Read the network, broadcast, host range and host count, and the binary view if you want to see where the split falls.
  3. To divide a range, open Split a network and choose how many subnets or how many hosts each needs. IPv6 has its own tab.

Questions

Why are there two fewer usable hosts than addresses?

In a normal IPv4 subnet the first address names the network and the last is the broadcast address, so neither can be given to a device. A /26 has 64 addresses and 62 usable hosts. The exceptions are /31, used for links between two routers, and /32, a single address.

What is a wildcard mask?

The subnet mask with every bit flipped. Cisco access lists and OSPF use it: 0.0.0.63 matches the 64 addresses of a /26.

Which ranges are private?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are for private networks and are not routed on the internet. 100.64.0.0/10 is shared address space used by carrier grade NAT, and 169.254.0.0/16 is what a device gives itself when it gets no address.

Why does IPv6 not have a broadcast address?

IPv6 replaced broadcast with multicast, so every address in a prefix can be used. A /64 is the standard size for a single network, which gives about 18 quintillion addresses.