Break down an IPv4 CIDR into network, broadcast, and hosts

Break down an IPv4 CIDR.

Type an IPv4 CIDR; see the network address, broadcast, usable range, host count, and wildcard mask. Useful for planning small networks. Pure browser; no login.

Network address

192.168.1.0

Broadcast

192.168.1.255

First usable

192.168.1.1

Last usable

192.168.1.254

Host count

254

Wildcard mask

0.0.0.255

Netmask

255.255.255.0

IPv4 subnets and CIDR notation

Every device on an IPv4 network has a 32-bit address, written as four numbers from 0 to 255 such as 192.168.10.77. A subnet groups a block of consecutive addresses, and CIDR notation says how big that block is: the number after the slash is how many leading bits are fixed for the network. /24 fixes 24 bits and leaves 8 for hosts, which is 256 addresses.

Type any address with a prefix length and this calculator shows the network it belongs to, the broadcast address, the first and last usable host, the number of usable hosts, the subnet mask and the wildcard mask.

How to use it

  1. Type an address and prefix in the form 192.168.10.77/26.
  2. Read the network address: the first address of the block, which identifies the subnet itself.
  3. Read the broadcast address and the usable range between them.
  4. Copy the subnet mask for interface settings, or the wildcard mask for router access lists and OSPF configuration.

Example: which /26 does an address sit in?

Input
192.168.10.77/26
Output
Network: 192.168.10.64
Broadcast: 192.168.10.127
Usable: 192.168.10.65 – 192.168.10.126 (62 hosts)
Netmask: 255.255.255.192
Wildcard: 0.0.0.63

A /26 leaves 6 host bits, so each block is 64 addresses long. 77 falls in the block that starts at 64.

Masks, hosts and the two reserved addresses

The subnet mask is the prefix written as an address: 24 one-bits make 255.255.255.0, and 26 make 255.255.255.192. The wildcard mask is its inverse and is what Cisco-style access lists expect. A block of 2 to the power of the host bits contains that many addresses, but the first is the network address and the last is the broadcast address, so a /26 has 64 addresses and 62 usable hosts.

Common sizes: /30 gives 2 usable hosts, /29 gives 6, /28 gives 14, /27 gives 30, /24 gives 254, /16 gives 65,534.

Point-to-point links and single hosts

A /32 is one single address, used for loopbacks and host routes. A /31 has only two addresses. RFC 3021 allows both to be used on point-to-point links between two routers, since such a link needs no broadcast address. This calculator marks the usable range for /31 and /32 as not applicable, so check your equipment's documentation when you use them.

Private ranges

RFC 1918 reserves three blocks for private networks that are never routed on the internet: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Home routers and office networks use them behind NAT. When you plan subnets for VPNs or cloud networks, pick blocks that do not overlap with the networks people will connect from, such as the very common 192.168.0.0/24 and 192.168.1.0/24.

Questions

Does it support IPv6?

No, IPv4 only. IPv6 subnets are usually a fixed /64 per network, so host counting is rarely needed there.

What if I type a host address instead of the network address?

That is fine. The calculator works out which network the address belongs to, as in the example above.

Is a /24 the same as a Class C network?

It is the same size. Network classes were retired in 1993 when CIDR was introduced, but the old names still appear in conversations.