All tools

CIDR subnet calculator

Enter an IPv4 address with a prefix (10.0.0.5/22) or a dotted mask (10.0.0.5 255.255.252.0). /31 and /32 follow RFC 3021.

CIDR192.168.1.0/24
Network address192.168.1.0
Broadcast address192.168.1.255
First usable host192.168.1.1
Last usable host192.168.1.254
Usable hosts254
Total addresses256
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
Address typePrivate (RFC 1918)

Binary view

Address
11000000.10101000.00000001.00001010
Mask
11111111.11111111.11111111.00000000
Network
11000000.10101000.00000001.00000000
Broadcast
11000000.10101000.00000001.11111111

Indigo bits are the network part; grey bits are the host part.

Split into subnets

4 × /26

  1. 192.168.1.0/26192.168.1.0192.168.1.63
  2. 192.168.1.64/26192.168.1.64192.168.1.127
  3. 192.168.1.128/26192.168.1.128192.168.1.191
  4. 192.168.1.192/26192.168.1.192192.168.1.255

About the cidr subnet calculator

An IPv4 subnet calculator for network engineers, sysadmins and anyone setting up a VPC or home network. Enter an address in CIDR notation or with a dotted subnet mask to get the network and broadcast addresses, usable host range, host count, masks, a binary breakdown and whether the address is private or public. It can also split a block into equal smaller subnets.

How to use it

  1. Type an address with a prefix, such as 10.0.0.5/22, or an address followed by a mask, such as 10.0.0.5 255.255.252.0.
  2. Read the network, broadcast, first and last host, and host count.
  3. Check the binary view to see which bits are network and which are host.
  4. Enter a number under Split into subnets to divide the block into equal parts.

Questions

How many usable hosts are in a /24?
A /24 has 256 addresses. The first is the network address and the last is the broadcast address, leaving 254 usable hosts.
Why does a /31 show two usable hosts?
RFC 3021 allows /31 networks on point-to-point links, where no network or broadcast address is needed, so both addresses are usable. A /32 identifies a single host.
What is a wildcard mask?
It is the subnet mask with every bit inverted, so 255.255.255.0 becomes 0.0.0.255. Cisco access lists and OSPF configuration use wildcard masks.
Which IP ranges are private?
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks. The calculator also flags loopback (127.0.0.0/8), link-local (169.254.0.0/16) and carrier-grade NAT (100.64.0.0/10).
Why is 255.0.255.0 rejected as a mask?
A valid subnet mask is a run of 1 bits followed by a run of 0 bits. 255.0.255.0 mixes them, so it cannot describe a subnet.